mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +00:00
feat(server,web): system config for admin (#959)
* feat: add admin config module for user configured config, uses it for ffmpeg * feat: add api endpoint to retrieve admin config settings and values * feat: add settings panel to admin page on web (wip) * feat: add api endpoint to update the admin config * chore: re-generate openapi spec after rebase * refactor: move from admin config to system config naming * chore: move away from UseGuards to new @Authenticated decorator * style: dark mode styling for lists and fix conflicting colors * wip: 2 column design, no edit button * refactor: system config * chore: generate open api * chore: rm broken test * chore: cleanup types * refactor: config module names Co-authored-by: Zack Pollard <zackpollard@ymail.com> Co-authored-by: Zack Pollard <zack.pollard@moonpig.com>
This commit is contained in:
@@ -12,8 +12,6 @@ export const load: PageServerLoad = async ({ parent }) => {
|
||||
}
|
||||
|
||||
const { data: allUsers } = await serverApi.userApi.getAllUsers(false);
|
||||
return {
|
||||
user: user,
|
||||
allUsers: allUsers
|
||||
};
|
||||
|
||||
return { user, allUsers };
|
||||
};
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
import { AdminSideBarSelection } from '$lib/models/admin-sidebar-selection';
|
||||
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 NavigationBar from '$lib/components/shared-components/navigation-bar.svelte';
|
||||
@@ -16,6 +17,7 @@
|
||||
import type { PageData } from './$types';
|
||||
import { api, ServerStatsResponseDto, UserResponseDto } from '@api';
|
||||
import JobsPanel from '$lib/components/admin-page/jobs/jobs-panel.svelte';
|
||||
import SettingsPanel from '$lib/components/admin-page/settings/settings-panel.svelte';
|
||||
import ServerStatsPanel from '$lib/components/admin-page/server-stats/server-stats-panel.svelte';
|
||||
import RestoreDialoge from '$lib/components/admin-page/restore-dialoge.svelte';
|
||||
|
||||
@@ -190,11 +192,18 @@
|
||||
/>
|
||||
<SideBarButton
|
||||
title="Jobs"
|
||||
logo={Cog}
|
||||
logo={Sync}
|
||||
actionType={AdminSideBarSelection.JOBS}
|
||||
isSelected={selectedAction === AdminSideBarSelection.JOBS}
|
||||
on:selected={onButtonClicked}
|
||||
/>
|
||||
<SideBarButton
|
||||
title="Settings"
|
||||
logo={Cog}
|
||||
actionType={AdminSideBarSelection.SETTINGS}
|
||||
isSelected={selectedAction === AdminSideBarSelection.SETTINGS}
|
||||
on:selected={onButtonClicked}
|
||||
/>
|
||||
<SideBarButton
|
||||
title="Server Stats"
|
||||
logo={Server}
|
||||
@@ -228,6 +237,9 @@
|
||||
{#if selectedAction === AdminSideBarSelection.JOBS}
|
||||
<JobsPanel />
|
||||
{/if}
|
||||
{#if selectedAction === AdminSideBarSelection.SETTINGS}
|
||||
<SettingsPanel />
|
||||
{/if}
|
||||
{#if selectedAction === AdminSideBarSelection.STATS && serverStat}
|
||||
<ServerStatsPanel stats={serverStat} allUsers={data.allUsers} />
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user