mirror of
https://github.com/immich-app/immich.git
synced 2025-01-06 03:46:47 +01:00
refactor(web): admin layout (#4461)
This commit is contained in:
parent
268a9c4803
commit
9d225d3d06
12 changed files with 333 additions and 344 deletions
|
@ -3,7 +3,6 @@
|
||||||
notificationController,
|
notificationController,
|
||||||
NotificationType,
|
NotificationType,
|
||||||
} from '$lib/components/shared-components/notification/notification';
|
} from '$lib/components/shared-components/notification/notification';
|
||||||
import { AppRoute } from '$lib/constants';
|
|
||||||
import { featureFlags } from '$lib/stores/server-config.store';
|
import { featureFlags } from '$lib/stores/server-config.store';
|
||||||
import { handleError } from '$lib/utils/handle-error';
|
import { handleError } from '$lib/utils/handle-error';
|
||||||
import { AllJobStatusResponseDto, api, JobCommand, JobCommandDto, JobName } from '@api';
|
import { AllJobStatusResponseDto, api, JobCommand, JobCommandDto, JobName } from '@api';
|
||||||
|
@ -14,7 +13,6 @@
|
||||||
import FileXmlBox from 'svelte-material-icons/FileXmlBox.svelte';
|
import FileXmlBox from 'svelte-material-icons/FileXmlBox.svelte';
|
||||||
import LibraryShelves from 'svelte-material-icons/LibraryShelves.svelte';
|
import LibraryShelves from 'svelte-material-icons/LibraryShelves.svelte';
|
||||||
import FolderMove from 'svelte-material-icons/FolderMove.svelte';
|
import FolderMove from 'svelte-material-icons/FolderMove.svelte';
|
||||||
import CogIcon from 'svelte-material-icons/Cog.svelte';
|
|
||||||
import Table from 'svelte-material-icons/Table.svelte';
|
import Table from 'svelte-material-icons/Table.svelte';
|
||||||
import TagMultiple from 'svelte-material-icons/TagMultiple.svelte';
|
import TagMultiple from 'svelte-material-icons/TagMultiple.svelte';
|
||||||
import VectorCircle from 'svelte-material-icons/VectorCircle.svelte';
|
import VectorCircle from 'svelte-material-icons/VectorCircle.svelte';
|
||||||
|
@ -22,7 +20,6 @@
|
||||||
import ConfirmDialogue from '../../shared-components/confirm-dialogue.svelte';
|
import ConfirmDialogue from '../../shared-components/confirm-dialogue.svelte';
|
||||||
import JobTile from './job-tile.svelte';
|
import JobTile from './job-tile.svelte';
|
||||||
import StorageMigrationDescription from './storage-migration-description.svelte';
|
import StorageMigrationDescription from './storage-migration-description.svelte';
|
||||||
import Button from '../../elements/buttons/button.svelte';
|
|
||||||
|
|
||||||
export let jobs: AllJobStatusResponseDto;
|
export let jobs: AllJobStatusResponseDto;
|
||||||
|
|
||||||
|
@ -149,14 +146,6 @@
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<div class="flex flex-col gap-7">
|
<div class="flex flex-col gap-7">
|
||||||
<div class="flex justify-end">
|
|
||||||
<a href="{AppRoute.ADMIN_SETTINGS}?open=job-settings">
|
|
||||||
<Button size="sm">
|
|
||||||
<CogIcon size="18" />
|
|
||||||
<span class="pl-2">Manage Concurrency</span>
|
|
||||||
</Button>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
{#each jobList as [jobName, { title, subtitle, disabled, allText, missingText, allowForceCommand, icon, component, handleCommand: handleCommandOverride }]}
|
{#each jobList as [jobName, { title, subtitle, disabled, allText, missingText, allowForceCommand, icon, component, handleCommand: handleCommandOverride }]}
|
||||||
{@const { jobCounts, queueStatus } = jobs[jobName]}
|
{@const { jobCounts, queueStatus } = jobs[jobName]}
|
||||||
<JobTile
|
<JobTile
|
||||||
|
|
|
@ -3,11 +3,14 @@
|
||||||
import type { UserResponseDto } from '@api';
|
import type { UserResponseDto } from '@api';
|
||||||
import NavigationBar from '../shared-components/navigation-bar/navigation-bar.svelte';
|
import NavigationBar from '../shared-components/navigation-bar/navigation-bar.svelte';
|
||||||
import SideBar from '../shared-components/side-bar/side-bar.svelte';
|
import SideBar from '../shared-components/side-bar/side-bar.svelte';
|
||||||
|
import AdminSideBar from '../shared-components/side-bar/admin-side-bar.svelte';
|
||||||
|
|
||||||
export let user: UserResponseDto;
|
export let user: UserResponseDto;
|
||||||
export let hideNavbar = false;
|
export let hideNavbar = false;
|
||||||
export let showUploadButton = false;
|
export let showUploadButton = false;
|
||||||
export let title: string | undefined = undefined;
|
export let title: string | undefined = undefined;
|
||||||
export let scrollbar = true;
|
export let scrollbar = true;
|
||||||
|
export let admin = false;
|
||||||
|
|
||||||
$: scrollbarClass = scrollbar ? 'immich-scrollbar p-4 pb-8' : 'scrollbar-hidden pl-4';
|
$: scrollbarClass = scrollbar ? 'immich-scrollbar p-4 pb-8' : 'scrollbar-hidden pl-4';
|
||||||
</script>
|
</script>
|
||||||
|
@ -23,7 +26,11 @@
|
||||||
class="relative grid h-screen grid-cols-[theme(spacing.18)_auto] overflow-hidden bg-immich-bg pt-[var(--navbar-height)] dark:bg-immich-dark-bg md:grid-cols-[theme(spacing.64)_auto]"
|
class="relative grid h-screen grid-cols-[theme(spacing.18)_auto] overflow-hidden bg-immich-bg pt-[var(--navbar-height)] dark:bg-immich-dark-bg md:grid-cols-[theme(spacing.64)_auto]"
|
||||||
>
|
>
|
||||||
<slot name="sidebar">
|
<slot name="sidebar">
|
||||||
|
{#if admin}
|
||||||
|
<AdminSideBar />
|
||||||
|
{:else}
|
||||||
<SideBar />
|
<SideBar />
|
||||||
|
{/if}
|
||||||
</slot>
|
</slot>
|
||||||
<slot name="content">
|
<slot name="content">
|
||||||
{#if title}
|
{#if title}
|
||||||
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
<script lang="ts">
|
||||||
|
import { page } from '$app/stores';
|
||||||
|
import SideBarButton from '$lib/components/shared-components/side-bar/side-bar-button.svelte';
|
||||||
|
import SideBarSection from '$lib/components/shared-components/side-bar/side-bar-section.svelte';
|
||||||
|
import StatusBox from '$lib/components/shared-components/status-box.svelte';
|
||||||
|
import { AppRoute } from '$lib/constants';
|
||||||
|
import AccountMultipleOutline from 'svelte-material-icons/AccountMultipleOutline.svelte';
|
||||||
|
import Cog from 'svelte-material-icons/Cog.svelte';
|
||||||
|
import Server from 'svelte-material-icons/Server.svelte';
|
||||||
|
import Sync from 'svelte-material-icons/Sync.svelte';
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<SideBarSection>
|
||||||
|
<a data-sveltekit-preload-data="hover" href={AppRoute.ADMIN_USER_MANAGEMENT} draggable="false">
|
||||||
|
<SideBarButton
|
||||||
|
title="Users"
|
||||||
|
logo={AccountMultipleOutline}
|
||||||
|
isSelected={$page.route.id === AppRoute.ADMIN_USER_MANAGEMENT}
|
||||||
|
/>
|
||||||
|
</a>
|
||||||
|
<a data-sveltekit-preload-data="hover" href={AppRoute.ADMIN_JOBS} draggable="false">
|
||||||
|
<SideBarButton title="Jobs" logo={Sync} isSelected={$page.route.id === AppRoute.ADMIN_JOBS} />
|
||||||
|
</a>
|
||||||
|
<a data-sveltekit-preload-data="hover" href={AppRoute.ADMIN_SETTINGS} draggable="false">
|
||||||
|
<SideBarButton title="Settings" logo={Cog} isSelected={$page.route.id === AppRoute.ADMIN_SETTINGS} />
|
||||||
|
</a>
|
||||||
|
<a data-sveltekit-preload-data="hover" href={AppRoute.ADMIN_STATS} draggable="false">
|
||||||
|
<SideBarButton title="Server Stats" logo={Server} isSelected={$page.route.id === AppRoute.ADMIN_STATS} />
|
||||||
|
</a>
|
||||||
|
<div class="mb-6 mt-auto">
|
||||||
|
<StatusBox />
|
||||||
|
</div>
|
||||||
|
</SideBarSection>
|
|
@ -1,68 +0,0 @@
|
||||||
<script lang="ts">
|
|
||||||
// DO NOT include `import { page } from '$app/stores'` here, because this can
|
|
||||||
// lead to pages not being unmounted, which then causes weird page nesting
|
|
||||||
// and routing issues.
|
|
||||||
//
|
|
||||||
// This is an issue in SvelteKit caused by using the page store in layouts and
|
|
||||||
// using transitions on pages: https://github.com/sveltejs/kit/issues/7405
|
|
||||||
|
|
||||||
import SideBarButton from '$lib/components/shared-components/side-bar/side-bar-button.svelte';
|
|
||||||
import AccountMultipleOutline from 'svelte-material-icons/AccountMultipleOutline.svelte';
|
|
||||||
import Sync from 'svelte-material-icons/Sync.svelte';
|
|
||||||
import Cog from 'svelte-material-icons/Cog.svelte';
|
|
||||||
import Server from 'svelte-material-icons/Server.svelte';
|
|
||||||
import StatusBox from '$lib/components/shared-components/status-box.svelte';
|
|
||||||
import { AppRoute } from '../../lib/constants';
|
|
||||||
import type { LayoutData } from './$types';
|
|
||||||
import SideBarSection from '$lib/components/shared-components/side-bar/side-bar-section.svelte';
|
|
||||||
import UserPageLayout from '$lib/components/layouts/user-page-layout.svelte';
|
|
||||||
|
|
||||||
export let data: LayoutData;
|
|
||||||
|
|
||||||
// Circumvents the need to import the page store. Should be replaced by
|
|
||||||
// `$page.data.meta.title` once issue #7405 of SvelteKit is resolved.
|
|
||||||
const getPageTitle = (routeId: string | null) => {
|
|
||||||
switch (routeId) {
|
|
||||||
case AppRoute.ADMIN_USER_MANAGEMENT:
|
|
||||||
return 'User Management';
|
|
||||||
case AppRoute.ADMIN_SETTINGS:
|
|
||||||
return 'System Settings';
|
|
||||||
case AppRoute.ADMIN_JOBS:
|
|
||||||
return 'Jobs';
|
|
||||||
case AppRoute.ADMIN_STATS:
|
|
||||||
return 'Server Stats';
|
|
||||||
default:
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<UserPageLayout user={data.user} showUploadButton={false} title={getPageTitle(data.routeId)}>
|
|
||||||
<SideBarSection slot="sidebar">
|
|
||||||
<a data-sveltekit-preload-data="hover" href={AppRoute.ADMIN_USER_MANAGEMENT} draggable="false">
|
|
||||||
<SideBarButton
|
|
||||||
title="Users"
|
|
||||||
logo={AccountMultipleOutline}
|
|
||||||
isSelected={data.routeId === AppRoute.ADMIN_USER_MANAGEMENT}
|
|
||||||
/>
|
|
||||||
</a>
|
|
||||||
<a data-sveltekit-preload-data="hover" href={AppRoute.ADMIN_JOBS} draggable="false">
|
|
||||||
<SideBarButton title="Jobs" logo={Sync} isSelected={data.routeId === AppRoute.ADMIN_JOBS} />
|
|
||||||
</a>
|
|
||||||
<a data-sveltekit-preload-data="hover" href={AppRoute.ADMIN_SETTINGS} draggable="false">
|
|
||||||
<SideBarButton title="Settings" logo={Cog} isSelected={data.routeId === AppRoute.ADMIN_SETTINGS} />
|
|
||||||
</a>
|
|
||||||
<a data-sveltekit-preload-data="hover" href={AppRoute.ADMIN_STATS} draggable="false">
|
|
||||||
<SideBarButton title="Server Stats" logo={Server} isSelected={data.routeId === AppRoute.ADMIN_STATS} />
|
|
||||||
</a>
|
|
||||||
<div class="mb-6 mt-auto">
|
|
||||||
<StatusBox />
|
|
||||||
</div>
|
|
||||||
</SideBarSection>
|
|
||||||
|
|
||||||
<section id="setting-content" class="flex place-content-center sm:mx-4">
|
|
||||||
<section class="w-full pb-28 pt-5 sm:w-5/6 md:w-[850px]">
|
|
||||||
<slot />
|
|
||||||
</section>
|
|
||||||
</section>
|
|
||||||
</UserPageLayout>
|
|
|
@ -1,14 +0,0 @@
|
||||||
import { AppRoute } from '$lib/constants';
|
|
||||||
import { redirect } from '@sveltejs/kit';
|
|
||||||
import type { LayoutLoad } from './$types';
|
|
||||||
|
|
||||||
export const load = (async ({ parent, route }) => {
|
|
||||||
const { user } = await parent();
|
|
||||||
if (!user) {
|
|
||||||
throw redirect(302, AppRoute.AUTH_LOGIN);
|
|
||||||
} else if (!user.isAdmin) {
|
|
||||||
throw redirect(302, AppRoute.PHOTOS);
|
|
||||||
}
|
|
||||||
|
|
||||||
return { routeId: route.id, user };
|
|
||||||
}) satisfies LayoutLoad;
|
|
|
@ -13,6 +13,7 @@ export const load = (async ({ locals: { user, api } }) => {
|
||||||
const { data: jobs } = await api.jobApi.getAllJobsStatus();
|
const { data: jobs } = await api.jobApi.getAllJobsStatus();
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
user,
|
||||||
jobs,
|
jobs,
|
||||||
meta: {
|
meta: {
|
||||||
title: 'Job Status',
|
title: 'Job Status',
|
||||||
|
|
|
@ -1,7 +1,14 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import JobsPanel from '$lib/components/admin-page/jobs/jobs-panel.svelte';
|
import JobsPanel from '$lib/components/admin-page/jobs/jobs-panel.svelte';
|
||||||
|
import LinkButton from '$lib/components/elements/buttons/link-button.svelte';
|
||||||
|
import UserPageLayout from '$lib/components/layouts/user-page-layout.svelte';
|
||||||
|
import { AppRoute } from '$lib/constants';
|
||||||
import { AllJobStatusResponseDto, api } from '@api';
|
import { AllJobStatusResponseDto, api } from '@api';
|
||||||
import { onDestroy, onMount } from 'svelte';
|
import { onDestroy, onMount } from 'svelte';
|
||||||
|
import CogIcon from 'svelte-material-icons/Cog.svelte';
|
||||||
|
import type { PageData } from './$types';
|
||||||
|
|
||||||
|
export let data: PageData;
|
||||||
|
|
||||||
let timer: ReturnType<typeof setInterval>;
|
let timer: ReturnType<typeof setInterval>;
|
||||||
|
|
||||||
|
@ -22,6 +29,22 @@
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<UserPageLayout user={data.user} title={data.meta.title} admin>
|
||||||
|
<div class="flex justify-end" slot="buttons">
|
||||||
|
<a href="{AppRoute.ADMIN_SETTINGS}?open=job-settings">
|
||||||
|
<LinkButton>
|
||||||
|
<div class="flex place-items-center gap-2 text-sm">
|
||||||
|
<CogIcon size="18" />
|
||||||
|
Manage Concurrency
|
||||||
|
</div>
|
||||||
|
</LinkButton>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<section id="setting-content" class="flex place-content-center sm:mx-4">
|
||||||
|
<section class="w-full pb-28 sm:w-5/6 md:w-[850px]">
|
||||||
{#if jobs}
|
{#if jobs}
|
||||||
<JobsPanel {jobs} />
|
<JobsPanel {jobs} />
|
||||||
{/if}
|
{/if}
|
||||||
|
</section>
|
||||||
|
</section>
|
||||||
|
</UserPageLayout>
|
||||||
|
|
|
@ -14,6 +14,7 @@ export const load = (async ({ parent, locals: { api } }) => {
|
||||||
const { data: stats } = await api.serverInfoApi.getStats();
|
const { data: stats } = await api.serverInfoApi.getStats();
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
user,
|
||||||
stats,
|
stats,
|
||||||
meta: {
|
meta: {
|
||||||
title: 'Server Stats',
|
title: 'Server Stats',
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { onMount, onDestroy } from 'svelte';
|
|
||||||
import { api } from '@api';
|
|
||||||
import ServerStatsPanel from '$lib/components/admin-page/server-stats/server-stats-panel.svelte';
|
import ServerStatsPanel from '$lib/components/admin-page/server-stats/server-stats-panel.svelte';
|
||||||
|
import UserPageLayout from '$lib/components/layouts/user-page-layout.svelte';
|
||||||
|
import { api } from '@api';
|
||||||
|
import { onDestroy, onMount } from 'svelte';
|
||||||
import type { PageData } from './$types';
|
import type { PageData } from './$types';
|
||||||
|
|
||||||
export let data: PageData;
|
export let data: PageData;
|
||||||
|
|
||||||
let setIntervalHandler: ReturnType<typeof setInterval>;
|
let setIntervalHandler: ReturnType<typeof setInterval>;
|
||||||
|
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
|
@ -19,4 +21,10 @@
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<UserPageLayout user={data.user} title={data.meta.title} admin>
|
||||||
|
<section id="setting-content" class="flex place-content-center sm:mx-4">
|
||||||
|
<section class="w-full pb-28 sm:w-5/6 md:w-[850px]">
|
||||||
<ServerStatsPanel stats={data.stats} />
|
<ServerStatsPanel stats={data.stats} />
|
||||||
|
</section>
|
||||||
|
</section>
|
||||||
|
</UserPageLayout>
|
||||||
|
|
|
@ -2,7 +2,7 @@ import { AppRoute } from '$lib/constants';
|
||||||
import { redirect } from '@sveltejs/kit';
|
import { redirect } from '@sveltejs/kit';
|
||||||
import type { PageServerLoad } from './$types';
|
import type { PageServerLoad } from './$types';
|
||||||
|
|
||||||
export const load: PageServerLoad = async ({ parent }) => {
|
export const load: PageServerLoad = async ({ parent, locals: { api } }) => {
|
||||||
const { user } = await parent();
|
const { user } = await parent();
|
||||||
|
|
||||||
if (!user) {
|
if (!user) {
|
||||||
|
@ -11,8 +11,11 @@ export const load: PageServerLoad = async ({ parent }) => {
|
||||||
throw redirect(302, AppRoute.PHOTOS);
|
throw redirect(302, AppRoute.PHOTOS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const { data: configs } = await api.systemConfigApi.getConfig();
|
||||||
|
|
||||||
return {
|
return {
|
||||||
user,
|
user,
|
||||||
|
configs,
|
||||||
meta: {
|
meta: {
|
||||||
title: 'System Settings',
|
title: 'System Settings',
|
||||||
},
|
},
|
||||||
|
|
|
@ -9,26 +9,23 @@
|
||||||
import SettingAccordion from '$lib/components/admin-page/settings/setting-accordion.svelte';
|
import SettingAccordion from '$lib/components/admin-page/settings/setting-accordion.svelte';
|
||||||
import StorageTemplateSettings from '$lib/components/admin-page/settings/storage-template/storage-template-settings.svelte';
|
import StorageTemplateSettings from '$lib/components/admin-page/settings/storage-template/storage-template-settings.svelte';
|
||||||
import ThumbnailSettings from '$lib/components/admin-page/settings/thumbnail/thumbnail-settings.svelte';
|
import ThumbnailSettings from '$lib/components/admin-page/settings/thumbnail/thumbnail-settings.svelte';
|
||||||
import Button from '$lib/components/elements/buttons/button.svelte';
|
import TrashSettings from '$lib/components/admin-page/settings/trash-settings/trash-settings.svelte';
|
||||||
import LoadingSpinner from '$lib/components/shared-components/loading-spinner.svelte';
|
import LinkButton from '$lib/components/elements/buttons/link-button.svelte';
|
||||||
|
import UserPageLayout from '$lib/components/layouts/user-page-layout.svelte';
|
||||||
import { downloadManager } from '$lib/stores/download';
|
import { downloadManager } from '$lib/stores/download';
|
||||||
import { featureFlags } from '$lib/stores/server-config.store';
|
import { featureFlags } from '$lib/stores/server-config.store';
|
||||||
import { downloadBlob } from '$lib/utils/asset-utils';
|
import { downloadBlob } from '$lib/utils/asset-utils';
|
||||||
import { SystemConfigDto, api, copyToClipboard } from '@api';
|
import { copyToClipboard } from '@api';
|
||||||
import Alert from 'svelte-material-icons/Alert.svelte';
|
import Alert from 'svelte-material-icons/Alert.svelte';
|
||||||
import ContentCopy from 'svelte-material-icons/ContentCopy.svelte';
|
import ContentCopy from 'svelte-material-icons/ContentCopy.svelte';
|
||||||
import Download from 'svelte-material-icons/Download.svelte';
|
import Download from 'svelte-material-icons/Download.svelte';
|
||||||
import type { PageData } from './$types';
|
import type { PageData } from './$types';
|
||||||
import TrashSettings from '$lib/components/admin-page/settings/trash-settings/trash-settings.svelte';
|
|
||||||
|
|
||||||
export let data: PageData;
|
export let data: PageData;
|
||||||
|
|
||||||
const getConfig = async () => {
|
const configs = data.configs;
|
||||||
const { data } = await api.systemConfigApi.getConfig();
|
|
||||||
return data;
|
|
||||||
};
|
|
||||||
|
|
||||||
const downloadConfig = (configs: SystemConfigDto) => {
|
const downloadConfig = () => {
|
||||||
const blob = new Blob([JSON.stringify(configs, null, 2)], { type: 'application/json' });
|
const blob = new Blob([JSON.stringify(configs, null, 2)], { type: 'application/json' });
|
||||||
const downloadKey = 'immich-config.json';
|
const downloadKey = 'immich-config.json';
|
||||||
downloadManager.add(downloadKey, blob.size);
|
downloadManager.add(downloadKey, blob.size);
|
||||||
|
@ -45,21 +42,24 @@
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<section class="">
|
<UserPageLayout user={data.user} title={data.meta.title} admin>
|
||||||
{#await getConfig()}
|
<div class="flex justify-end gap-2" slot="buttons">
|
||||||
<LoadingSpinner />
|
<LinkButton on:click={() => copyToClipboard(JSON.stringify(configs, null, 2))}>
|
||||||
{:then configs}
|
<div class="flex place-items-center gap-2 text-sm">
|
||||||
<div class="flex justify-end gap-2">
|
|
||||||
<Button size="sm" on:click={() => copyToClipboard(JSON.stringify(configs, null, 2))}>
|
|
||||||
<ContentCopy size="18" />
|
<ContentCopy size="18" />
|
||||||
<span class="pl-2">Copy to Clipboard</span>
|
Copy to Clipboard
|
||||||
</Button>
|
</div>
|
||||||
<Button size="sm" on:click={() => downloadConfig(configs)}>
|
</LinkButton>
|
||||||
|
<LinkButton on:click={() => downloadConfig()}>
|
||||||
|
<div class="flex place-items-center gap-2 text-sm">
|
||||||
<Download size="18" />
|
<Download size="18" />
|
||||||
<span class="pl-2">Export as JSON</span>
|
Export as JSON
|
||||||
</Button>
|
</div>
|
||||||
|
</LinkButton>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<section id="setting-content" class="flex place-content-center sm:mx-4">
|
||||||
|
<section class="w-full pb-28 sm:w-5/6 md:w-[850px]">
|
||||||
<SettingAccordion
|
<SettingAccordion
|
||||||
title="Job Settings"
|
title="Job Settings"
|
||||||
subtitle="Manage job concurrency"
|
subtitle="Manage job concurrency"
|
||||||
|
@ -110,5 +110,6 @@
|
||||||
>
|
>
|
||||||
<FFmpegSettings disabled={$featureFlags.configFile} ffmpegConfig={configs.ffmpeg} />
|
<FFmpegSettings disabled={$featureFlags.configFile} ffmpegConfig={configs.ffmpeg} />
|
||||||
</SettingAccordion>
|
</SettingAccordion>
|
||||||
{/await}
|
|
||||||
</section>
|
</section>
|
||||||
|
</section>
|
||||||
|
</UserPageLayout>
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
import { page } from '$app/stores';
|
import { page } from '$app/stores';
|
||||||
import { locale } from '$lib/stores/preferences.store';
|
import { locale } from '$lib/stores/preferences.store';
|
||||||
import Button from '$lib/components/elements/buttons/button.svelte';
|
import Button from '$lib/components/elements/buttons/button.svelte';
|
||||||
|
import UserPageLayout from '$lib/components/layouts/user-page-layout.svelte';
|
||||||
import type { PageData } from './$types';
|
import type { PageData } from './$types';
|
||||||
|
|
||||||
export let data: PageData;
|
export let data: PageData;
|
||||||
|
@ -107,7 +108,9 @@
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<section>
|
<UserPageLayout user={data.user} title={data.meta.title} admin>
|
||||||
|
<section id="setting-content" class="flex place-content-center sm:mx-4">
|
||||||
|
<section class="w-full pb-28 sm:w-5/6 md:w-[850px]">
|
||||||
{#if shouldShowCreateUserForm}
|
{#if shouldShowCreateUserForm}
|
||||||
<FullScreenModal on:clickOutside={() => (shouldShowCreateUserForm = false)}>
|
<FullScreenModal on:clickOutside={() => (shouldShowCreateUserForm = false)}>
|
||||||
<CreateUserForm on:user-created={onUserCreated} on:cancel={() => (shouldShowCreateUserForm = false)} />
|
<CreateUserForm on:user-created={onUserCreated} on:cancel={() => (shouldShowCreateUserForm = false)} />
|
||||||
|
@ -289,3 +292,5 @@
|
||||||
|
|
||||||
<Button size="sm" on:click={() => (shouldShowCreateUserForm = true)}>Create user</Button>
|
<Button size="sm" on:click={() => (shouldShowCreateUserForm = true)}>Create user</Button>
|
||||||
</section>
|
</section>
|
||||||
|
</section>
|
||||||
|
</UserPageLayout>
|
||||||
|
|
Loading…
Reference in a new issue