mirror of
https://github.com/immich-app/immich.git
synced 2025-11-09 08:13:10 -05:00
* wip * added user metadata key * wip * restructure onboarding system and add initial locale * update language card and fix translation updating * remove prints * new card formattings * fix cursed unmount effect * add OAuth route onboarding * remove required admin auth for onboarding * delete the hotwire button * update open-api files * delete import * fix failing oauth onboarding fields * fix e2e test * fix web e2e test * add onboarding to user registration e2e test * remove todo this was a holdover during dev and didn't get deleted * fix server small tests * use onDestroy to save settings rather than a bind:this * change to false for isOnboarded * fix other auth small test * provide type annotation in user factory metadata field * remove onboardingCompelted from UserDto * move translations to onboarding steps array and mark as derived so they update * break language selector out into its own component as per @danieldietzler suggestion * remove hello header on card * fix flixkering on server privacy card * label/id fixes * openapi --------- Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
33 lines
965 B
Svelte
33 lines
965 B
Svelte
<script lang="ts">
|
|
import SettingSwitch from '$lib/components/shared-components/settings/setting-switch.svelte';
|
|
import { preferences } from '$lib/stores/user.store';
|
|
import { handleError } from '$lib/utils/handle-error';
|
|
import { updateMyPreferences } from '@immich/sdk';
|
|
import { onDestroy } from 'svelte';
|
|
import { t } from 'svelte-i18n';
|
|
|
|
let gCastEnabled = $state($preferences?.cast?.gCastEnabled ?? false);
|
|
|
|
onDestroy(async () => {
|
|
try {
|
|
const data = await updateMyPreferences({
|
|
userPreferencesUpdateDto: {
|
|
cast: { gCastEnabled },
|
|
},
|
|
});
|
|
|
|
$preferences = { ...data };
|
|
} catch (error) {
|
|
handleError(error, $t('errors.unable_to_update_settings'));
|
|
}
|
|
});
|
|
</script>
|
|
|
|
<div class="flex flex-col gap-4">
|
|
<p>
|
|
{$t('onboarding_privacy_description')}
|
|
</p>
|
|
|
|
<SettingSwitch title={$t('gcast_enabled')} subtitle={$t('gcast_enabled_description')} bind:checked={gCastEnabled} />
|
|
</div>
|