Skip to content

Commit

Permalink
fix(changelog): add loading spinner for content
Browse files Browse the repository at this point in the history
  • Loading branch information
ducktordanny committed Jan 29, 2024
1 parent cc8de28 commit acc9107
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 2 additions & 0 deletions apps/frontend/src/app/pages/changelog/changelog.module.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {CommonModule} from '@angular/common';
import {HttpClientModule} from '@angular/common/http';
import {NgModule} from '@angular/core';
import {MatProgressSpinnerModule} from '@angular/material/progress-spinner';
import {MatSnackBarModule} from '@angular/material/snack-bar';

import {MdPreviewModule} from '../../pipes/md-preview/md-preview.module';
Expand All @@ -17,6 +18,7 @@ import {ChangelogService} from './changelog.service';
CommonModule,
HttpClientModule,
MatSnackBarModule,
MatProgressSpinnerModule,
MdPreviewModule,
],
exports: [],
Expand Down
4 changes: 4 additions & 0 deletions apps/frontend/src/app/pages/changelog/changelog.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ import {ChangelogService} from './changelog.service';
section {
padding: 16px;
}
mat-spinner {
margin: auto;
}
`,
],
changeDetection: ChangeDetectionStrategy.OnPush,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<section>
<p [innerHTML]="changelogContent | async | mdPreview"></p>
<div *ngIf="(changelogContent | async) as _changelogContent; else loading">
<p [innerHTML]="_changelogContent | mdPreview"></p>
</div>
<ng-template #loading>
<mat-spinner diameter="24"></mat-spinner>
</ng-template>
<a
href="https://github.com/ducktordanny/opres.help/blob/master/apps/backend/src/assets/CHANGELOG.md"
>See on GitHub.</a
Expand Down

0 comments on commit acc9107

Please sign in to comment.