@@ -381,6 +392,10 @@
triggers="mouseenter:mouseleave" popoverClass="popover-slim">
{{ versionString }}
+ @if (settingsService.unseenReleasesSince()) {
+
+ }
@if (!settingsService.updateCheckingIsSet || appRemoteVersion()) {
diff --git a/src-ui/src/app/components/app-frame/app-frame.component.spec.ts b/src-ui/src/app/components/app-frame/app-frame.component.spec.ts
index 0ae6ac2360..3c32269628 100644
--- a/src-ui/src/app/components/app-frame/app-frame.component.spec.ts
+++ b/src-ui/src/app/components/app-frame/app-frame.component.spec.ts
@@ -695,6 +695,46 @@ describe('AppFrameComponent', () => {
expect(maybeRefreshSpy).toHaveBeenCalled()
})
+ it('should show new release pill and mark releases seen on click', () => {
+ settingsService.set(SETTINGS_KEYS.VERSION, '3.5.1')
+ settingsService.set(SETTINGS_KEYS.WHATS_NEW_LAST_SEEN_VERSION, '3.4.2')
+ fixture.detectChanges()
+
+ const pill = fixture.debugElement
+ .queryAll(By.css('button'))
+ .find((b) => b.nativeElement.textContent.trim() === 'New')
+ expect(pill).toBeTruthy()
+
+ pill.nativeElement.click()
+ const req = httpTestingController.expectOne(
+ `${environment.apiBaseUrl}ui_settings/`
+ )
+ expect(req.request.body.settings.whats_new.last_seen_version).toEqual(
+ '3.5.1'
+ )
+ req.flush({ success: true })
+ fixture.detectChanges()
+
+ expect(
+ fixture.debugElement
+ .queryAll(By.css('button'))
+ .find((b) => b.nativeElement.textContent.trim() === 'New')
+ ).toBeUndefined()
+ })
+
+ it('should show new release dot in slim sidebar', () => {
+ settingsService.set(SETTINGS_KEYS.SLIM_SIDEBAR, true)
+ settingsService.set(SETTINGS_KEYS.VERSION, '3.5.1')
+ settingsService.set(SETTINGS_KEYS.WHATS_NEW_LAST_SEEN_VERSION, '3.4.2')
+ fixture.detectChanges()
+
+ expect(
+ fixture.debugElement.query(
+ By.css('button[aria-label="See what\'s new in this version"]')
+ )
+ ).toBeTruthy()
+ })
+
it('should show tasks badge for needs-attention tasks', () => {
jest
.spyOn(tasksService, 'needsAttentionTasksCount', 'get')
diff --git a/src-ui/src/app/components/app-frame/app-frame.component.ts b/src-ui/src/app/components/app-frame/app-frame.component.ts
index e47e13ab04..7c1e7d929e 100644
--- a/src-ui/src/app/components/app-frame/app-frame.component.ts
+++ b/src-ui/src/app/components/app-frame/app-frame.component.ts
@@ -551,6 +551,11 @@ export class AppFrameComponent
})
}
+ showReleaseNotes() {
+ // TODO: open release notes modal
+ this.settingsService.markReleasesSeen().pipe(first()).subscribe()
+ }
+
setUpdateChecking(enable: boolean) {
this.settingsService.set(SETTINGS_KEYS.UPDATE_CHECKING_ENABLED, enable)
this.settingsService