mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
@@ -1,58 +1,58 @@
|
||||
<script lang="ts">
|
||||
import { page } from '$app/stores';
|
||||
import { oauth, UserResponseDto } from '@api';
|
||||
import { onMount } from 'svelte';
|
||||
import SettingAccordion from '../admin-page/settings/setting-accordion.svelte';
|
||||
import ChangePasswordSettings from './change-password-settings.svelte';
|
||||
import OAuthSettings from './oauth-settings.svelte';
|
||||
import UserAPIKeyList from './user-api-key-list.svelte';
|
||||
import DeviceList from './device-list.svelte';
|
||||
import PartnerSettings from './partner-settings.svelte';
|
||||
import UserProfileSettings from './user-profile-settings.svelte';
|
||||
import { page } from '$app/stores';
|
||||
import { oauth, UserResponseDto } from '@api';
|
||||
import { onMount } from 'svelte';
|
||||
import SettingAccordion from '../admin-page/settings/setting-accordion.svelte';
|
||||
import ChangePasswordSettings from './change-password-settings.svelte';
|
||||
import OAuthSettings from './oauth-settings.svelte';
|
||||
import UserAPIKeyList from './user-api-key-list.svelte';
|
||||
import DeviceList from './device-list.svelte';
|
||||
import PartnerSettings from './partner-settings.svelte';
|
||||
import UserProfileSettings from './user-profile-settings.svelte';
|
||||
|
||||
export let user: UserResponseDto;
|
||||
export let user: UserResponseDto;
|
||||
|
||||
let oauthEnabled = false;
|
||||
let oauthOpen = false;
|
||||
let oauthEnabled = false;
|
||||
let oauthOpen = false;
|
||||
|
||||
onMount(async () => {
|
||||
oauthOpen = oauth.isCallback(window.location);
|
||||
onMount(async () => {
|
||||
oauthOpen = oauth.isCallback(window.location);
|
||||
|
||||
try {
|
||||
const { data } = await oauth.getConfig(window.location);
|
||||
oauthEnabled = data.enabled;
|
||||
} catch {
|
||||
// noop
|
||||
}
|
||||
});
|
||||
try {
|
||||
const { data } = await oauth.getConfig(window.location);
|
||||
oauthEnabled = data.enabled;
|
||||
} catch {
|
||||
// noop
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<SettingAccordion title="Account" subtitle="Manage your account">
|
||||
<UserProfileSettings {user} />
|
||||
<UserProfileSettings {user} />
|
||||
</SettingAccordion>
|
||||
|
||||
<SettingAccordion title="API Keys" subtitle="Manage your API keys">
|
||||
<UserAPIKeyList />
|
||||
<UserAPIKeyList />
|
||||
</SettingAccordion>
|
||||
|
||||
<SettingAccordion title="Authorized Devices" subtitle="Manage your logged-in devices">
|
||||
<DeviceList />
|
||||
<DeviceList />
|
||||
</SettingAccordion>
|
||||
|
||||
{#if oauthEnabled}
|
||||
<SettingAccordion
|
||||
title="OAuth"
|
||||
subtitle="Manage your OAuth connection"
|
||||
isOpen={oauthOpen || $page.url.searchParams.get('open') === 'oauth'}
|
||||
>
|
||||
<OAuthSettings {user} />
|
||||
</SettingAccordion>
|
||||
<SettingAccordion
|
||||
title="OAuth"
|
||||
subtitle="Manage your OAuth connection"
|
||||
isOpen={oauthOpen || $page.url.searchParams.get('open') === 'oauth'}
|
||||
>
|
||||
<OAuthSettings {user} />
|
||||
</SettingAccordion>
|
||||
{/if}
|
||||
|
||||
<SettingAccordion title="Password" subtitle="Change your password">
|
||||
<ChangePasswordSettings />
|
||||
<ChangePasswordSettings />
|
||||
</SettingAccordion>
|
||||
|
||||
<SettingAccordion title="Sharing" subtitle="Manage sharing with partners">
|
||||
<PartnerSettings {user} />
|
||||
<PartnerSettings {user} />
|
||||
</SettingAccordion>
|
||||
|
||||
Reference in New Issue
Block a user