mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-11-20 12:36:53 +00:00
Add how to update link
This commit is contained in:
3 files changed
+20
-1
No files matched your search
+9
-1
@@ -73,7 +73,15 @@
|
||||
<pngx-bs-icon name="chat-left-text" class="me-1"></pngx-bs-icon><ng-container i18n>Need support? Ask in Discussions</ng-container>
|
||||
</a>
|
||||
</div>
|
||||
<button type="button" class="btn btn-outline-secondary" (click)="close()" i18n>Close</button>
|
||||
<div class="d-flex gap-3">
|
||||
<button type="button" class="btn btn-outline-secondary" (click)="close()" i18n>Close</button>
|
||||
@if (until()) {
|
||||
<a class="btn btn-primary d-flex align-items-center" [href]="updatingDocsUrl" target="_blank" rel="noopener noreferrer">
|
||||
<ng-container i18n>How to update</ng-container>
|
||||
<pngx-bs-icon name="box-arrow-up-right" class="ms-2" width=".8rem"></pngx-bs-icon>
|
||||
</a>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ng-template #githubLink>
|
||||
|
||||
+8
@@ -79,6 +79,9 @@ describe('ReleaseNotesDialogComponent', () => {
|
||||
const text = fixture.nativeElement.textContent
|
||||
expect(text).toContain('Updated from 3.4.2 to 3.5.1')
|
||||
expect(text).toContain('Bug Fixes')
|
||||
expect(
|
||||
fixture.nativeElement.querySelector('.modal-footer a.btn-primary')
|
||||
).toBeNull()
|
||||
expect(
|
||||
fixture.nativeElement.querySelector('.release-notes-body details summary')
|
||||
.textContent
|
||||
@@ -101,6 +104,11 @@ describe('ReleaseNotesDialogComponent', () => {
|
||||
expect(component.releaseUrl).toEqual(
|
||||
'https://github.com/paperless-ngx/paperless-ngx/releases/tag/v3.6.0'
|
||||
)
|
||||
expect(
|
||||
fixture.nativeElement
|
||||
.querySelector('.modal-footer a.btn-primary')
|
||||
.getAttribute('href')
|
||||
).toEqual('https://docs.paperless-ngx.com/administration/#updating')
|
||||
})
|
||||
|
||||
it('should open release note links safely and drop svg icons', () => {
|
||||
|
||||
+3
@@ -19,6 +19,8 @@ import { SettingsService } from 'src/app/services/settings.service'
|
||||
const REPO_URL = 'https://github.com/paperless-ngx/paperless-ngx'
|
||||
const RELEASES_URL = `${REPO_URL}/releases`
|
||||
const DISCUSSIONS_URL = `${REPO_URL}/discussions/new/choose`
|
||||
const UPDATING_DOCS_URL =
|
||||
'https://docs.paperless-ngx.com/administration/#updating'
|
||||
|
||||
/**
|
||||
* Tweak GitHub release HTML: open links in a new tab, add no referrer etc,
|
||||
@@ -79,6 +81,7 @@ export class ReleaseNotesDialogComponent {
|
||||
readonly repoUrl = REPO_URL
|
||||
readonly releasesUrl = RELEASES_URL
|
||||
readonly discussionsUrl = DISCUSSIONS_URL
|
||||
readonly updatingDocsUrl = UPDATING_DOCS_URL
|
||||
|
||||
get releaseUrl(): string {
|
||||
const version = this.until() ?? this.version
|
||||
|
||||
Reference in new issue
Block a user