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
1 change: 1 addition & 0 deletions src/app/app-config.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
datasetReduceEnabled: boolean;
datasetDetailsShowMissingProposalId: boolean;
datafilesActionsEnabled: boolean;
datafilesActions: any[];

Check warning on line 59 in src/app/app-config.service.ts

View workflow job for this annotation

GitHub Actions / eslint

Unexpected any. Specify a different type
editDatasetEnabled: boolean;
editDatasetSampleEnabled: boolean;
editMetadataEnabled: boolean;
Expand Down Expand Up @@ -120,9 +120,10 @@
labelsLocalization?: LabelsLocalization;
dateFormat?: string;
defaultMainPage?: MainPageConfiguration;
supportEmail?: string;
}

function isMainPageConfiguration(obj: any): obj is MainPageConfiguration {

Check warning on line 126 in src/app/app-config.service.ts

View workflow job for this annotation

GitHub Actions / eslint

Unexpected any. Specify a different type
const validKeys = Object.keys(MainPageOptions);
return (
obj &&
Expand All @@ -147,12 +148,12 @@
.pipe(timeout(2000))
.toPromise();
this.appConfig = Object.assign({}, this.appConfig, config);
} catch (err) {

Check warning on line 151 in src/app/app-config.service.ts

View workflow job for this annotation

GitHub Actions / eslint

'err' is defined but never used
console.log("No config available in backend, trying with local config.");
try {
const config = await this.http.get("/assets/config.json").toPromise();
this.appConfig = Object.assign({}, this.appConfig, config);
} catch (err) {

Check warning on line 156 in src/app/app-config.service.ts

View workflow job for this annotation

GitHub Actions / eslint

'err' is defined but never used
console.error("No config provided.");
}
}
Expand Down
12 changes: 12 additions & 0 deletions src/app/help/help/help.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,15 @@
</mat-card-content>
</mat-card>
</p>

<p *ngIf="supportEmail">
<mat-card class="help-card">
<mat-card-header>
<mat-card-title> Questions or issues? </mat-card-title>
</mat-card-header>
<mat-card-content>
If you have any questions or need help, please contact
<a href="mailto:{{ supportEmail }}">{{ supportEmail }}</a>.
</mat-card-content>
</mat-card>
</p>
2 changes: 2 additions & 0 deletions src/app/help/help/help.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export class HelpComponent implements OnInit {
gettingStarted: string | null = null;
shoppingCartEnabled = false;
helpMessages: HelpMessages;
supportEmail: string | undefined;
constructor(public appConfigService: AppConfigService) {}

ngOnInit() {
Expand All @@ -25,5 +26,6 @@ export class HelpComponent implements OnInit {
);
this.gettingStarted = this.appConfig.gettingStarted;
this.shoppingCartEnabled = this.appConfig.shoppingCartEnabled;
this.supportEmail = this.appConfig.supportEmail;
}
}
Loading