mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
feat(server,web): migrate oauth settings from env to system config (#1061)
This commit is contained in:
parent
cefdd86b7f
commit
5e680551b9
69 changed files with 2079 additions and 1229 deletions
|
|
@ -3,22 +3,12 @@
|
|||
// TODO: why `any` here? There should be a expected type for this
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
export let logo: any;
|
||||
export let actionType: AdminSideBarSelection | AppSideBarSelection;
|
||||
export let isSelected: boolean;
|
||||
|
||||
import { createEventDispatcher } from 'svelte';
|
||||
import type {
|
||||
AdminSideBarSelection,
|
||||
AppSideBarSelection
|
||||
} from '../../../models/admin-sidebar-selection';
|
||||
|
||||
const dispatch = createEventDispatcher();
|
||||
|
||||
const onButtonClicked = () => {
|
||||
dispatch('selected', {
|
||||
actionType
|
||||
});
|
||||
};
|
||||
const onButtonClicked = () => dispatch('selected');
|
||||
</script>
|
||||
|
||||
<div
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
<script lang="ts">
|
||||
import { AppSideBarSelection } from '$lib/models/admin-sidebar-selection';
|
||||
import { onMount } from 'svelte';
|
||||
import { page } from '$app/stores';
|
||||
import ImageAlbum from 'svelte-material-icons/ImageAlbum.svelte';
|
||||
import ImageOutline from 'svelte-material-icons/ImageOutline.svelte';
|
||||
|
|
@ -11,28 +9,12 @@
|
|||
import { api } from '@api';
|
||||
import { fade } from 'svelte/transition';
|
||||
import LoadingSpinner from '../loading-spinner.svelte';
|
||||
|
||||
let selectedAction: AppSideBarSelection;
|
||||
import { AppRoute } from '../../../constants';
|
||||
|
||||
let showAssetCount = false;
|
||||
let showSharingCount = false;
|
||||
let showAlbumsCount = false;
|
||||
|
||||
// let domCount = 0;
|
||||
onMount(async () => {
|
||||
if ($page.route.id == 'albums') {
|
||||
selectedAction = AppSideBarSelection.ALBUMS;
|
||||
} else if ($page.route.id == 'photos') {
|
||||
selectedAction = AppSideBarSelection.PHOTOS;
|
||||
} else if ($page.route.id == 'sharing') {
|
||||
selectedAction = AppSideBarSelection.SHARING;
|
||||
}
|
||||
|
||||
// setInterval(() => {
|
||||
// domCount = document.getElementsByTagName('*').length;
|
||||
// }, 500);
|
||||
});
|
||||
|
||||
const getAssetCount = async () => {
|
||||
const { data: assetCount } = await api.assetApi.getAssetCountByUserId();
|
||||
|
||||
|
|
@ -56,14 +38,13 @@
|
|||
<a
|
||||
data-sveltekit-preload-data="hover"
|
||||
data-sveltekit-noscroll
|
||||
href={$page.route.id !== 'photos' ? `/photos` : null}
|
||||
href={AppRoute.PHOTOS}
|
||||
class="relative"
|
||||
>
|
||||
<SideBarButton
|
||||
title={`Photos`}
|
||||
logo={ImageOutline}
|
||||
actionType={AppSideBarSelection.PHOTOS}
|
||||
isSelected={selectedAction === AppSideBarSelection.PHOTOS}
|
||||
isSelected={$page.route.id === AppRoute.PHOTOS}
|
||||
/>
|
||||
<div
|
||||
id="asset-count-info"
|
||||
|
|
@ -75,7 +56,6 @@
|
|||
{#if showAssetCount}
|
||||
<div
|
||||
transition:fade={{ duration: 200 }}
|
||||
id="asset-count-info-detail"
|
||||
class="w-32 rounded-lg p-4 shadow-lg bg-white absolute -right-[135px] top-0 z-[9999] flex place-items-center place-content-center"
|
||||
>
|
||||
{#await getAssetCount()}
|
||||
|
|
@ -91,16 +71,11 @@
|
|||
</div>
|
||||
</a>
|
||||
|
||||
<a
|
||||
data-sveltekit-preload-data="hover"
|
||||
href={$page.route.id !== 'sharing' ? `/sharing` : null}
|
||||
class="relative"
|
||||
>
|
||||
<a data-sveltekit-preload-data="hover" href={AppRoute.SHARING} class="relative">
|
||||
<SideBarButton
|
||||
title="Sharing"
|
||||
logo={AccountMultipleOutline}
|
||||
actionType={AppSideBarSelection.SHARING}
|
||||
isSelected={selectedAction === AppSideBarSelection.SHARING}
|
||||
isSelected={$page.route.id === AppRoute.SHARING}
|
||||
/>
|
||||
<div
|
||||
id="sharing-count-info"
|
||||
|
|
@ -112,7 +87,6 @@
|
|||
{#if showSharingCount}
|
||||
<div
|
||||
transition:fade={{ duration: 200 }}
|
||||
id="asset-count-info-detail"
|
||||
class="w-24 rounded-lg p-4 shadow-lg bg-white absolute -right-[105px] top-0 z-[9999] flex place-items-center place-content-center"
|
||||
>
|
||||
{#await getAlbumCount()}
|
||||
|
|
@ -129,16 +103,11 @@
|
|||
<div class="text-xs ml-5 my-4 dark:text-immich-dark-fg">
|
||||
<p>LIBRARY</p>
|
||||
</div>
|
||||
<a
|
||||
data-sveltekit-preload-data="hover"
|
||||
href={$page.route.id !== 'albums' ? `/albums` : null}
|
||||
class="relative"
|
||||
>
|
||||
<a data-sveltekit-preload-data="hover" href={AppRoute.ALBUMS} class="relative">
|
||||
<SideBarButton
|
||||
title="Albums"
|
||||
logo={ImageAlbum}
|
||||
actionType={AppSideBarSelection.ALBUMS}
|
||||
isSelected={selectedAction === AppSideBarSelection.ALBUMS}
|
||||
isSelected={$page.route.id === AppRoute.ALBUMS}
|
||||
/>
|
||||
|
||||
<div
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue