mirror of
https://github.com/immich-app/immich.git
synced 2025-07-09 03:04:16 -04:00
fix: use icons instead of toggles for admin user features view (#19369)
* fix: use icons instead of toggles for admin user features view * fix: use red for X icon
This commit is contained in:
parent
e61d7f2616
commit
1c50e19894
@ -0,0 +1,16 @@
|
|||||||
|
<script lang="ts">
|
||||||
|
import { Icon, Text } from '@immich/ui';
|
||||||
|
import { mdiCheck, mdiClose } from '@mdi/js';
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
title: string;
|
||||||
|
state: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
let { title, state }: Props = $props();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div class="flex justify-between items-center">
|
||||||
|
<Text class="text-sm font-medium">{title}</Text>
|
||||||
|
<Icon icon={state ? mdiCheck : mdiClose} class={state ? 'text-primary' : 'text-danger'} size="24" />
|
||||||
|
</div>
|
@ -25,13 +25,11 @@
|
|||||||
CardTitle,
|
CardTitle,
|
||||||
Code,
|
Code,
|
||||||
Container,
|
Container,
|
||||||
Field,
|
|
||||||
getByteUnitString,
|
getByteUnitString,
|
||||||
Heading,
|
Heading,
|
||||||
HStack,
|
HStack,
|
||||||
Icon,
|
Icon,
|
||||||
Stack,
|
Stack,
|
||||||
Switch,
|
|
||||||
Text,
|
Text,
|
||||||
} from '@immich/ui';
|
} from '@immich/ui';
|
||||||
import {
|
import {
|
||||||
@ -50,6 +48,7 @@
|
|||||||
} from '@mdi/js';
|
} from '@mdi/js';
|
||||||
import { t } from 'svelte-i18n';
|
import { t } from 'svelte-i18n';
|
||||||
import type { PageData } from './$types';
|
import type { PageData } from './$types';
|
||||||
|
import FeatureSetting from '$lib/components/admin-page/user/feature-setting.svelte';
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
data: PageData;
|
data: PageData;
|
||||||
@ -292,33 +291,15 @@
|
|||||||
<CardBody>
|
<CardBody>
|
||||||
<div class="px-4 pb-4">
|
<div class="px-4 pb-4">
|
||||||
<Stack gap={3}>
|
<Stack gap={3}>
|
||||||
<Field readOnly label={$t('email_notifications')}>
|
<FeatureSetting title={$t('email_notifications')} state={userPreferences.emailNotifications.enabled} />
|
||||||
<Switch checked={userPreferences.emailNotifications.enabled} color="primary" />
|
<FeatureSetting title={$t('folders')} state={userPreferences.folders.enabled} />
|
||||||
</Field>
|
<FeatureSetting title={$t('memories')} state={userPreferences.memories.enabled} />
|
||||||
<Field readOnly label={$t('folders')}>
|
<FeatureSetting title={$t('people')} state={userPreferences.people.enabled} />
|
||||||
<Switch checked={userPreferences.folders.enabled} color="primary" />
|
<FeatureSetting title={$t('rating')} state={userPreferences.ratings.enabled} />
|
||||||
</Field>
|
<FeatureSetting title={$t('shared_links')} state={userPreferences.sharedLinks.enabled} />
|
||||||
<Field readOnly label={$t('memories')}>
|
<FeatureSetting title={$t('show_supporter_badge')} state={userPreferences.purchase.showSupportBadge} />
|
||||||
<Switch checked={userPreferences.memories.enabled} color="primary" />
|
<FeatureSetting title={$t('tags')} state={userPreferences.tags.enabled} />
|
||||||
</Field>
|
<FeatureSetting title={$t('gcast_enabled')} state={userPreferences.cast.gCastEnabled} />
|
||||||
<Field readOnly label={$t('people')}>
|
|
||||||
<Switch checked={userPreferences.people.enabled} color="primary" />
|
|
||||||
</Field>
|
|
||||||
<Field readOnly label={$t('rating')}>
|
|
||||||
<Switch checked={userPreferences.ratings.enabled} color="primary" />
|
|
||||||
</Field>
|
|
||||||
<Field readOnly label={$t('shared_links')}>
|
|
||||||
<Switch checked={userPreferences.sharedLinks.enabled} color="primary" />
|
|
||||||
</Field>
|
|
||||||
<Field readOnly label={$t('show_supporter_badge')}>
|
|
||||||
<Switch checked={userPreferences.purchase.showSupportBadge} color="primary" />
|
|
||||||
</Field>
|
|
||||||
<Field readOnly label={$t('tags')}>
|
|
||||||
<Switch checked={userPreferences.tags.enabled} color="primary" />
|
|
||||||
</Field>
|
|
||||||
<Field readOnly label={$t('gcast_enabled')}>
|
|
||||||
<Switch checked={userPreferences.cast.gCastEnabled} color="primary" />
|
|
||||||
</Field>
|
|
||||||
</Stack>
|
</Stack>
|
||||||
</div>
|
</div>
|
||||||
</CardBody>
|
</CardBody>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user