1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-01-06 11:56:46 +01:00

disable version check settings when config file is set (#5756)

This commit is contained in:
Daniel Dietzler 2023-12-16 20:39:17 +01:00 committed by GitHub
parent 0aae9696f6
commit 67f020380f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View file

@ -12,6 +12,7 @@
import type { ResetOptions } from '$lib/utils/dipatch'; import type { ResetOptions } from '$lib/utils/dipatch';
export let newVersionCheckConfig: SystemConfigNewVersionCheckDto; // this is the config that is being edited export let newVersionCheckConfig: SystemConfigNewVersionCheckDto; // this is the config that is being edited
export let disabled = false;
let savedConfig: SystemConfigNewVersionCheckDto; let savedConfig: SystemConfigNewVersionCheckDto;
let defaultConfig: SystemConfigNewVersionCheckDto; let defaultConfig: SystemConfigNewVersionCheckDto;
@ -86,11 +87,13 @@
title="ENABLED" title="ENABLED"
subtitle="Enable period requests to GitHub to check for new releases" subtitle="Enable period requests to GitHub to check for new releases"
bind:checked={newVersionCheckConfig.enabled} bind:checked={newVersionCheckConfig.enabled}
{disabled}
/> />
<SettingButtonsRow <SettingButtonsRow
on:reset={({ detail }) => handleReset(detail)} on:reset={({ detail }) => handleReset(detail)}
on:save={saveSetting} on:save={saveSetting}
showResetToDefault={!isEqual(savedConfig, defaultConfig)} showResetToDefault={!isEqual(savedConfig, defaultConfig)}
{disabled}
/> />
</div> </div>
</div> </div>

View file

@ -116,7 +116,7 @@
</SettingAccordion> </SettingAccordion>
<SettingAccordion title="Version Check" subtitle="Enable/disable the new version notification"> <SettingAccordion title="Version Check" subtitle="Enable/disable the new version notification">
<NewVersionCheckSettings newVersionCheckConfig={configs.newVersionCheck} /> <NewVersionCheckSettings disabled={$featureFlags.configFile} newVersionCheckConfig={configs.newVersionCheck} />
</SettingAccordion> </SettingAccordion>
<SettingAccordion <SettingAccordion