Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Node.js CI

on:
push:
branches: ['develop']
pull_request:
branches: ['develop']

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [22.x]

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run build --if-present

1 change: 0 additions & 1 deletion dist/1326.9e5d3c0d4b2d6a47.js

This file was deleted.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
<body class="mat-typography">
<df-root></df-root>
<script type="text/javascript" src="https://assets.calendly.com/assets/external/widget.js"></script>
<script src="runtime.1adb24c16ff25b9a.js" type="module"></script><script src="polyfills.def0190516b19e6b.js" type="module"></script><script src="main.1b31dd8117704925.js" type="module"></script></body>
<script src="runtime.92e02248302e3724.js" type="module"></script><script src="polyfills.def0190516b19e6b.js" type="module"></script><script src="main.1b31dd8117704925.js" type="module"></script></body>
</html>
5 changes: 0 additions & 5 deletions dist/runtime.1adb24c16ff25b9a.js

This file was deleted.

1 change: 1 addition & 0 deletions dist/runtime.92e02248302e3724.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<df-engagement-banner></df-engagement-banner>
<ng-container
*ngIf="(licenseCheck$ | async)?.disableUi === 'true'; else enabled">
<router-outlet />
Expand Down
9 changes: 8 additions & 1 deletion src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
NavigationEnd,
} from '@angular/router';
import { DfSideNavComponent } from './shared/components/df-side-nav/df-side-nav.component';
import { DfEngagementBannerComponent } from './shared/components/df-engagement-banner/df-engagement-banner.component';
import { DfLicenseCheckService } from './shared/services/df-license-check.service';
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
import { AuthService } from './shared/services/auth.service';
Expand All @@ -22,7 +23,13 @@ import { filter } from 'rxjs/operators';
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss'],
standalone: true,
imports: [DfSideNavComponent, RouterOutlet, NgIf, AsyncPipe],
imports: [
DfSideNavComponent,
DfEngagementBannerComponent,
RouterOutlet,
NgIf,
AsyncPipe,
],
})
export class AppComponent implements OnInit {
title = 'df-admin-interface';
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<ng-container *ngIf="showBanner">
<div class="engagement-banner">
<div class="banner-content">
<span class="banner-text">
{{ 'engagementBanner.message' | transloco }}
</span>
<button class="cta-button" (click)="openCalendly()">
{{ 'engagementBanner.ctaButton' | transloco }}
</button>
</div>
</div>
<div class="banner-spacer"></div>
</ng-container>
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
.engagement-banner {
background-color: #ffd9b3;
color: #2d2d2d;
padding: 12px 20px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
font-family: inherit;
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 1100;

.banner-content {
display: flex;
align-items: center;
justify-content: center;
gap: 15px;
max-width: 1200px;
margin: 0 auto;
position: relative;
}

.banner-text {
font-size: 14px;
font-weight: 500;
line-height: 1.4;
}

.cta-button {
background-color: #7c3aed;
color: white;
border: none;
padding: 8px 20px;
border-radius: 4px;
font-size: 14px;
font-weight: 600;
cursor: pointer;
transition: background-color 0.2s ease;
white-space: nowrap;

&:hover {
background-color: #6a28d9;
}

&:focus {
outline: 2px solid #7c3aed;
outline-offset: 2px;
}
}
}

.banner-spacer {
height: 56px;
}

@media (max-width: 768px) {
.banner-spacer {
height: 72px;
}
.engagement-banner {
padding: 10px 15px;

.banner-content {
flex-direction: column;
gap: 10px;
padding-right: 40px;
}

.banner-text {
font-size: 13px;
text-align: center;
}

.cta-button {
padding: 8px 16px;
font-size: 13px;
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import { Component, OnInit } from '@angular/core';
import { CommonModule } from '@angular/common';
import { DfSystemConfigDataService } from '../../services/df-system-config-data.service';
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
import { TranslocoModule } from '@ngneat/transloco';

@UntilDestroy({ checkProperties: true })
@Component({
selector: 'df-engagement-banner',
templateUrl: './df-engagement-banner.component.html',
styleUrls: ['./df-engagement-banner.component.scss'],
standalone: true,
imports: [CommonModule, TranslocoModule],
})
export class DfEngagementBannerComponent implements OnInit {
showBanner = false;
calendlyUrl =
'https://calendly.com/dreamfactory-platform/expert-consultation-lab-setup';

constructor(private systemConfigService: DfSystemConfigDataService) {}

ngOnInit() {
this.systemConfigService.environment$
.pipe(untilDestroyed(this))
.subscribe(environment => {
const license = environment.platform?.license?.toUpperCase();
const isTrial = environment.platform?.isTrial ?? false;

this.showBanner = license === 'OPEN SOURCE' || isTrial;
});
}

openCalendly() {
window.open(this.calendlyUrl, '_blank');
}
}
4 changes: 4 additions & 0 deletions src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -442,5 +442,9 @@
"language": "Change language",
"languages": {
"en": "English"
},
"engagementBanner": {
"message": "Testing DreamFactory? Let's show you what's possible. Book your free walkthrough",
"ctaButton": "Schedule Now"
}
}