mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-11-20 04:26:53 +00:00
Open release notes from the version link now
This commit is contained in:
2 files changed
+21
-5
No files matched your search
@@ -385,12 +385,9 @@
|
||||
<li class="nav-item" [class.visually-hidden]="slimSidebarEnabled">
|
||||
<div class="text-muted small d-flex align-items-center flex-wrap nav-label">
|
||||
<div class="me-2">
|
||||
<a class="text-muted text-decoration-none" target="_blank" rel="noopener noreferrer"
|
||||
href="https://github.com/paperless-ngx/paperless-ngx" ngbPopover="GitHub" i18n-ngbPopover
|
||||
[disablePopover]="!slimSidebarPopoversEnabled" placement="end" container="body"
|
||||
triggers="mouseenter:mouseleave" popoverClass="popover-slim">
|
||||
<button type="button" class="bg-transparent border-0 p-0 text-muted" (click)="showReleaseNotes()" title="See what's new in this version" i18n-title>
|
||||
{{ versionString }}
|
||||
</a>
|
||||
</button>
|
||||
@if (settingsService.unseenReleasesSince()) {
|
||||
<button type="button" class="btn btn-whats-new rounded-pill smaller ms-1 py-1 px-2 fw-bold lh-sm align-baseline" (click)="showReleaseNotes()"
|
||||
title="See what's new in this version" i18n-title i18n>New</button>
|
||||
|
||||
@@ -42,6 +42,7 @@ import { environment } from 'src/environments/environment'
|
||||
import { ProfileEditDialogComponent } from '../common/profile-edit-dialog/profile-edit-dialog.component'
|
||||
import { UploadStatusTrayComponent } from '../common/upload-status-tray/upload-status-tray.component'
|
||||
import { DocumentDetailComponent } from '../document-detail/document-detail.component'
|
||||
import { ReleaseNotesDialogComponent } from '../common/release-notes-dialog/release-notes-dialog.component'
|
||||
import { AppFrameComponent } from './app-frame.component'
|
||||
import { GlobalSearchComponent } from './global-search/global-search.component'
|
||||
|
||||
@@ -722,6 +723,24 @@ describe('AppFrameComponent', () => {
|
||||
).toBeUndefined()
|
||||
})
|
||||
|
||||
it('should open current release notes from the version without marking seen', () => {
|
||||
settingsService.set(SETTINGS_KEYS.VERSION, '3.5.1')
|
||||
settingsService.set(SETTINGS_KEYS.WHATS_NEW_LAST_SEEN_VERSION, '3.5.1')
|
||||
fixture.detectChanges()
|
||||
const modalSpy = jest.spyOn(modalService, 'open')
|
||||
|
||||
const versionButton = fixture.debugElement
|
||||
.queryAll(By.css('button'))
|
||||
.find((b) => b.nativeElement.textContent.includes('3.5.1'))
|
||||
versionButton.nativeElement.click()
|
||||
|
||||
expect(modalSpy).toHaveBeenCalledWith(
|
||||
ReleaseNotesDialogComponent,
|
||||
expect.anything()
|
||||
)
|
||||
httpTestingController.expectNone(`${environment.apiBaseUrl}ui_settings/`)
|
||||
})
|
||||
|
||||
it('should show new release dot instead of documentation in slim sidebar', () => {
|
||||
settingsService.set(SETTINGS_KEYS.SLIM_SIDEBAR, true)
|
||||
settingsService.set(SETTINGS_KEYS.VERSION, '3.5.1')
|
||||
|
||||
Reference in new issue
Block a user