mirror of
https://github.com/sct/overseerr.git
synced 2025-09-17 17:24:35 +02:00

* fix: correct 'StatusChecker' typo * feat: add restart required check to StatusChecker * fix(perms): remove MANAGE_SETTINGS permission * fix: allow alert to be dismissed * fix(lang): add missing string in SettingsServices * fix(frontend): fix modal icon border * fix(frontend): un-dismiss alert if setting reverted not require server restart * fix(backend): restart flag only needs to track main settings * fix: rebase issue * refactor: appease Prettier * refactor: swap settings badge order * fix: type import for MainSettings * test: add cypress test for restart prompt
24 lines
544 B
TypeScript
24 lines
544 B
TypeScript
import type { MainSettings } from '../lib/settings';
|
|
import { getSettings } from '../lib/settings';
|
|
|
|
class RestartFlag {
|
|
private settings: MainSettings;
|
|
|
|
public initializeSettings(settings: MainSettings): void {
|
|
this.settings = { ...settings };
|
|
}
|
|
|
|
public isSet(): boolean {
|
|
const settings = getSettings().main;
|
|
|
|
return (
|
|
this.settings.csrfProtection !== settings.csrfProtection ||
|
|
this.settings.trustProxy !== settings.trustProxy
|
|
);
|
|
}
|
|
}
|
|
|
|
const restartFlag = new RestartFlag();
|
|
|
|
export default restartFlag;
|