2025-06-02 16:09:13 -05:00
|
|
|
<script lang="ts">
|
|
|
|
|
import SettingSwitch from '$lib/components/shared-components/settings/setting-switch.svelte';
|
2025-11-13 19:17:44 +01:00
|
|
|
import { handleSystemConfigSave } from '$lib/services/system-config.service';
|
|
|
|
|
import { systemConfigManager } from '$lib/stores/system-config-manager.svelte';
|
2025-06-02 16:09:13 -05:00
|
|
|
import { onDestroy } from 'svelte';
|
|
|
|
|
import { t } from 'svelte-i18n';
|
|
|
|
|
|
2025-11-13 19:17:44 +01:00
|
|
|
const configToEdit = $state(systemConfigManager.cloneValue());
|
2025-06-02 16:09:13 -05:00
|
|
|
|
2025-11-13 19:17:44 +01:00
|
|
|
onDestroy(async () => {
|
|
|
|
|
await handleSystemConfigSave({ map: configToEdit.map, newVersionCheck: configToEdit.newVersionCheck });
|
2025-06-02 16:09:13 -05:00
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<div class="flex flex-col gap-4">
|
|
|
|
|
<p>
|
|
|
|
|
{$t('onboarding_privacy_description')}
|
|
|
|
|
</p>
|
|
|
|
|
|
2025-11-13 19:17:44 +01:00
|
|
|
<SettingSwitch
|
|
|
|
|
title={$t('admin.map_settings')}
|
|
|
|
|
subtitle={$t('admin.map_implications')}
|
|
|
|
|
bind:checked={configToEdit.map.enabled}
|
|
|
|
|
/>
|
|
|
|
|
<SettingSwitch
|
|
|
|
|
title={$t('admin.version_check_settings')}
|
|
|
|
|
subtitle={$t('admin.version_check_implications')}
|
|
|
|
|
bind:checked={configToEdit.newVersionCheck.enabled}
|
|
|
|
|
/>
|
2025-06-02 16:09:13 -05:00
|
|
|
</div>
|