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
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
uses: ./.github/workflows/reusable-build-editor-application.yml
with:
artifact-name: editor
documentation-url: https://${{ inputs.build-name }}.facturxdotnet.org/docs
api-url: https://${{ inputs.build-name }}.facturxdotnet.org/api
version: ${{ needs.compute-version.outputs.version }}

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/reusable-build-editor-application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ on:
type: string
required: true

documentation-url:
description: The URL at which the FacturX.NET Documentation will be served
type: string
required: true

version:
description: The version of the application
type: string
Expand Down Expand Up @@ -50,6 +55,7 @@ jobs:
echo " version: '${{ inputs.version }}'," >> src/environments/environment.ts
echo " buildDate: new Date('$(date +'%Y-%m-%d')')," >> src/environments/environment.ts
echo " apiUrl: '${{ inputs.api-url }}'," >> src/environments/environment.ts
echo " documentationUrl: '${{ inputs.documentation-url }}'," >> src/environments/environment.ts
echo "};" >> src/environments/environment.ts
echo "Environment is"
cat src/environments/environment.ts
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Component, input } from '@angular/core';
import { RouterLink } from '@angular/router';
import { NgbDropdown, NgbDropdownItem, NgbDropdownMenu, NgbDropdownToggle } from '@ng-bootstrap/ng-bootstrap';
import { environment } from '../../../../../environments/environment';

@Component({
selector: 'app-editor-about-menu',
Expand All @@ -9,6 +10,9 @@ import { NgbDropdown, NgbDropdownItem, NgbDropdownMenu, NgbDropdownToggle } from
<li class="nav-item" ngbDropdown>
<button id="editor-about-menu" class="nav-link px-4 text-light" ngbDropdownToggle>About</button>
<div ngbDropdownMenu aria-labelledby="editor-about-menu">
@if (documentationUrl !== undefined) {
<a [href]="documentationUrl" target="_blank" ngbDropdownItem>Documentation</a>
}
@if (showSelfHostingMenu()) {
<button ngbDropdownItem>Self-hosting</button>
}
Expand All @@ -19,4 +23,6 @@ import { NgbDropdown, NgbDropdownItem, NgbDropdownMenu, NgbDropdownToggle } from
})
export class EditorAboutMenuComponent {
showSelfHostingMenu = input<boolean>(false);

protected documentationUrl: string | undefined = environment.documentationUrl;
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ export const environment: Environment = {
version: '~dev',
buildDate: new Date(),
apiUrl: 'http://localhost:5295',
documentationUrl: 'https://docs.facturxdotnet.org',
};
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ export interface Environment {
version: string;
buildDate: Date;
apiUrl: string;
documentationUrl?: string;
}