mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-11-20 04:26:53 +00:00
Add date, tidy up link out
This commit is contained in:
3 files changed
+16
-4
No files matched your search
+11
-2
@@ -23,8 +23,17 @@
|
||||
<p class="mb-0" i18n>Release notes could not be loaded.</p>
|
||||
} @else {
|
||||
@for (release of releases(); track release.version) {
|
||||
<section class="release-notes" [class.mt-4]="!$first">
|
||||
<h4>{{ release.version }} <a class="btn btn-link btn-sm text-secondary d-inline-flex p-0" [href]="release.html_url" aria-label="View on GitHub" target="_blank" rel="noopener noreferrer"><pngx-bs-icon name="box-arrow-up-right" class="ms-2 mt-n1"></pngx-bs-icon></a></h4>
|
||||
<section class="release-notes" [class.border-top]="!$first" [class.pt-3]="!$first" [class.mt-3]="!$first">
|
||||
<div class="d-flex align-items-baseline gap-2 mb-2">
|
||||
<h5 class="mb-0">{{ release.version }}</h5>
|
||||
<a class="d-flex flex-row align-items-center text-secondary btn-link" [href]="release.html_url" target="_blank" rel="noopener noreferrer"
|
||||
title="View on GitHub" i18n-title>
|
||||
@if (release.published_at) {
|
||||
<span class="text-muted small me-2">{{ release.published_at | customDate }}</span>
|
||||
}
|
||||
<pngx-bs-icon name="box-arrow-up-right" class="mt-n1" width=".7rem"></pngx-bs-icon>
|
||||
</a>
|
||||
</div>
|
||||
<div class="release-notes-body" [innerHTML]="release.body_html"></div>
|
||||
</section>
|
||||
}
|
||||
|
||||
+3
-1
@@ -1,3 +1,4 @@
|
||||
import { DatePipe } from '@angular/common'
|
||||
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http'
|
||||
import {
|
||||
HttpTestingController,
|
||||
@@ -34,6 +35,7 @@ describe('ReleaseNotesDialogComponent', () => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ReleaseNotesDialogComponent],
|
||||
providers: [
|
||||
DatePipe,
|
||||
NgbActiveModal,
|
||||
provideHttpClient(withInterceptorsFromDi()),
|
||||
provideHttpClientTesting(),
|
||||
@@ -62,7 +64,7 @@ describe('ReleaseNotesDialogComponent', () => {
|
||||
'<h2>paperless-ngx 3.5.1</h2><h3>Bug Fixes</h3><ul><li>Fix: a thing</li></ul>' +
|
||||
'<h3>All App Changes</h3><details><summary>1 change</summary><ul><li>Fix: a thing</li></ul></details>',
|
||||
html_url: '',
|
||||
published_at: '',
|
||||
published_at: '2026-11-18T05:22:01Z',
|
||||
},
|
||||
],
|
||||
})
|
||||
|
||||
+2
-1
@@ -3,6 +3,7 @@ import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'
|
||||
import { first } from 'rxjs'
|
||||
import { BootstrapIconComponent } from 'src/app/components/common/bootstrap-icon/bootstrap-icon.component'
|
||||
import { SETTINGS_KEYS } from 'src/app/data/ui-settings'
|
||||
import { CustomDatePipe } from 'src/app/pipes/custom-date.pipe'
|
||||
import {
|
||||
AppRelease,
|
||||
RemoteVersionService,
|
||||
@@ -34,7 +35,7 @@ export function prepareReleaseHtml(html: string): string {
|
||||
selector: 'pngx-release-notes-dialog',
|
||||
templateUrl: './release-notes-dialog.component.html',
|
||||
styleUrls: ['./release-notes-dialog.component.scss'],
|
||||
imports: [BootstrapIconComponent],
|
||||
imports: [BootstrapIconComponent, CustomDatePipe],
|
||||
})
|
||||
export class ReleaseNotesDialogComponent {
|
||||
readonly activeModal = inject(NgbActiveModal)
|
||||
|
||||
Reference in new issue
Block a user