Skip to content

Commit

Permalink
feat: show release version and site on user settings page
Browse files Browse the repository at this point in the history
  • Loading branch information
Junjiequan committed Jun 4, 2024
1 parent 923ef78 commit e605097
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "scicat-frontend",
"version": "4.3.1",
"version": "4.4.0",
"license": "BSD-3-Clause",
"scripts": {
"ng": "ng",
Expand Down
12 changes: 6 additions & 6 deletions src/app/users/user-settings/user-settings.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,13 @@

<mat-card-content>
<table>
<tr *ngIf="settings.datasetCount as value">
<th>Dataset Count</th>
<td>{{ value }}</td>
<tr *ngIf="appVersion">
<th>Release Version</th>
<td>{{ appVersion }}</td>
</tr>
<tr *ngIf="settings.jobCount as value">
<th>Job Count</th>
<td>{{ value }}</td>
<tr *ngIf="appConfig.facility">
<th>Site</th>
<td>{{ appConfig.facility }}</td>
</tr>
</table>
</mat-card-content>
Expand Down
5 changes: 5 additions & 0 deletions src/app/users/user-settings/user-settings.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import {
import { Message, MessageType } from "state-management/models";
import { selectUserSettingsPageViewModel } from "state-management/selectors/user.selectors";
import { DOCUMENT } from "@angular/common";
import packageJson from "../../../../package.json";
import { AppConfigService } from "app-config.service";

@Component({
selector: "app-user-settings",
Expand All @@ -16,10 +18,13 @@ import { DOCUMENT } from "@angular/common";
})
export class UserSettingsComponent implements OnInit {
vm$ = this.store.select(selectUserSettingsPageViewModel);
appVersion: string | undefined = packageJson.version;
appConfig = this.appConfigService.getConfig();
tokenValue: string;
show = true;

constructor(
public appConfigService: AppConfigService,
@Inject(DOCUMENT) private document: Document,
private store: Store,
) {
Expand Down
6 changes: 2 additions & 4 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"compilerOptions": {
"baseUrl": "./src/app",
"outDir": "./dist/out-tsc",
"resolveJsonModule": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
Expand All @@ -19,10 +20,7 @@
"useDefineForClassFields": false,
"target": "es2022",
"module": "es2022",
"lib": [
"es2022",
"dom"
]
"lib": ["es2022", "dom"]
},
"angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false,
Expand Down

0 comments on commit e605097

Please sign in to comment.