|
25 | 25 | CardTitle,
|
26 | 26 | Code,
|
27 | 27 | Container,
|
28 |
| - Field, |
29 | 28 | getByteUnitString,
|
30 | 29 | Heading,
|
31 | 30 | HStack,
|
32 | 31 | Icon,
|
33 | 32 | Stack,
|
34 |
| - Switch, |
35 | 33 | Text,
|
36 | 34 | } from '@immich/ui';
|
37 | 35 | import {
|
|
50 | 48 | } from '@mdi/js';
|
51 | 49 | import { t } from 'svelte-i18n';
|
52 | 50 | import type { PageData } from './$types';
|
| 51 | + import FeatureSetting from '$lib/components/admin-page/user/feature-setting.svelte'; |
53 | 52 |
|
54 | 53 | interface Props {
|
55 | 54 | data: PageData;
|
|
292 | 291 | <CardBody>
|
293 | 292 | <div class="px-4 pb-4">
|
294 | 293 | <Stack gap={3}>
|
295 |
| - <Field readOnly label={$t('email_notifications')}> |
296 |
| - <Switch checked={userPreferences.emailNotifications.enabled} color="primary" /> |
297 |
| - </Field> |
298 |
| - <Field readOnly label={$t('folders')}> |
299 |
| - <Switch checked={userPreferences.folders.enabled} color="primary" /> |
300 |
| - </Field> |
301 |
| - <Field readOnly label={$t('memories')}> |
302 |
| - <Switch checked={userPreferences.memories.enabled} color="primary" /> |
303 |
| - </Field> |
304 |
| - <Field readOnly label={$t('people')}> |
305 |
| - <Switch checked={userPreferences.people.enabled} color="primary" /> |
306 |
| - </Field> |
307 |
| - <Field readOnly label={$t('rating')}> |
308 |
| - <Switch checked={userPreferences.ratings.enabled} color="primary" /> |
309 |
| - </Field> |
310 |
| - <Field readOnly label={$t('shared_links')}> |
311 |
| - <Switch checked={userPreferences.sharedLinks.enabled} color="primary" /> |
312 |
| - </Field> |
313 |
| - <Field readOnly label={$t('show_supporter_badge')}> |
314 |
| - <Switch checked={userPreferences.purchase.showSupportBadge} color="primary" /> |
315 |
| - </Field> |
316 |
| - <Field readOnly label={$t('tags')}> |
317 |
| - <Switch checked={userPreferences.tags.enabled} color="primary" /> |
318 |
| - </Field> |
319 |
| - <Field readOnly label={$t('gcast_enabled')}> |
320 |
| - <Switch checked={userPreferences.cast.gCastEnabled} color="primary" /> |
321 |
| - </Field> |
| 294 | + <FeatureSetting title={$t('email_notifications')} state={userPreferences.emailNotifications.enabled} /> |
| 295 | + <FeatureSetting title={$t('folders')} state={userPreferences.folders.enabled} /> |
| 296 | + <FeatureSetting title={$t('memories')} state={userPreferences.memories.enabled} /> |
| 297 | + <FeatureSetting title={$t('people')} state={userPreferences.people.enabled} /> |
| 298 | + <FeatureSetting title={$t('rating')} state={userPreferences.ratings.enabled} /> |
| 299 | + <FeatureSetting title={$t('shared_links')} state={userPreferences.sharedLinks.enabled} /> |
| 300 | + <FeatureSetting title={$t('show_supporter_badge')} state={userPreferences.purchase.showSupportBadge} /> |
| 301 | + <FeatureSetting title={$t('tags')} state={userPreferences.tags.enabled} /> |
| 302 | + <FeatureSetting title={$t('gcast_enabled')} state={userPreferences.cast.gCastEnabled} /> |
322 | 303 | </Stack>
|
323 | 304 | </div>
|
324 | 305 | </CardBody>
|
|
0 commit comments