Skip to content

Commit

Permalink
update the user settings (#6849)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmadhamzh authored Sep 17, 2024
1 parent c041cac commit 515136f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion modules/web/src/app/core/components/help-panel/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {UserService} from '@core/services/user';
import {slideOut} from '@shared/animations/slide';
import {AdminSettings, CustomLinkLocation, UserSettings} from '@shared/entity/settings';
import {Subject} from 'rxjs';
import {takeUntil} from 'rxjs/operators';
import {take, takeUntil} from 'rxjs/operators';

@Component({
selector: 'km-help-panel',
Expand Down Expand Up @@ -83,6 +83,13 @@ export class HelpPanelComponent implements OnInit, OnDestroy {
this._config.getGitVersion().semver.raw.replace(/\./g, '')
);
window.open(url, '_blank');

if (this.hasNewChangelog()) {
this._userService
.patchCurrentUserSettings({lastSeenChangelogVersion: this._config.getGitVersion().humanReadable})
.pipe(take(1))
.subscribe();
}
}

hasNewChangelog(): boolean {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
fxLayoutAlign="center center"
(click)="toggle()">
<i class="km-icon-mask km-icon-help"></i>
<i *ngIf="!settings?.disableChangelogPopup && hasNewChangelog()"
<i *ngIf="!settings?.disableChangelogPopup && hasNewChangelog()"
class="km-icon-circle km-new-bg"></i>
</button>

Expand Down

0 comments on commit 515136f

Please sign in to comment.