Skip to content

Commit

Permalink
Merge pull request #76 from ducktordanny/fix/changelog-loading
Browse files Browse the repository at this point in the history
Fix: Add loading spinner for changelog content
  • Loading branch information
ducktordanny authored Jan 29, 2024
2 parents cc8de28 + e8a41b2 commit 6c1c1f0
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 2 deletions.
4 changes: 4 additions & 0 deletions apps/backend/src/assets/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

> All notable changes to this project will be documented and versioned here.
## [0.10.1] - 2024-01-29

- Fix: Add loading spinner for changelog content

## [0.10.0] - 2024-01-29

- New page and endpoint for viewing Changelog in English
Expand Down
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "opres",
"version": "0.10.0",
"version": "0.10.1",
"license": "MIT",
"scripts": {
"ng": "nx",
Expand Down

0 comments on commit 6c1c1f0

Please sign in to comment.