mirror of
https://github.com/sct/overseerr.git
synced 2025-12-29 00:56:55 +01:00
* refactor(settings): move network settings to their own settings tab This PR moves the network settings out of the General Settings section to a new Netowrk Settings tab. * fix: add missing translations * fix: fix cypress tests for network settings * refactor: create a separate section for network settings
30 lines
917 B
TypeScript
30 lines
917 B
TypeScript
import type { AllSettings, NetworkSettings } from '@server/lib/settings';
|
|
import { getSettings } from '@server/lib/settings';
|
|
|
|
class RestartFlag {
|
|
private networkSettings: NetworkSettings;
|
|
|
|
public initializeSettings(settings: AllSettings): void {
|
|
this.networkSettings = {
|
|
...settings.network,
|
|
proxy: { ...settings.network.proxy },
|
|
};
|
|
}
|
|
|
|
public isSet(): boolean {
|
|
const networkSettings = getSettings().network;
|
|
|
|
return (
|
|
this.networkSettings.csrfProtection !== networkSettings.csrfProtection ||
|
|
this.networkSettings.trustProxy !== networkSettings.trustProxy ||
|
|
this.networkSettings.proxy.enabled !== networkSettings.proxy.enabled ||
|
|
this.networkSettings.forceIpv4First !== networkSettings.forceIpv4First ||
|
|
this.networkSettings.dnsServers !== networkSettings.dnsServers
|
|
);
|
|
}
|
|
}
|
|
|
|
const restartFlag = new RestartFlag();
|
|
|
|
export default restartFlag;
|