2022-12-09 15:51:42 -05:00
|
|
|
<script lang="ts">
|
2023-07-01 00:50:47 -04:00
|
|
|
import { page } from '$app/stores';
|
|
|
|
|
import FFmpegSettings from '$lib/components/admin-page/settings/ffmpeg/ffmpeg-settings.svelte';
|
|
|
|
|
import JobSettings from '$lib/components/admin-page/settings/job-settings/job-settings.svelte';
|
2023-08-25 00:15:03 -04:00
|
|
|
import MachineLearningSettings from '$lib/components/admin-page/settings/machine-learning-settings/machine-learning-settings.svelte';
|
2023-07-01 00:50:47 -04:00
|
|
|
import OAuthSettings from '$lib/components/admin-page/settings/oauth/oauth-settings.svelte';
|
|
|
|
|
import PasswordLoginSettings from '$lib/components/admin-page/settings/password-login/password-login-settings.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';
|
2023-08-25 00:15:03 -04:00
|
|
|
import ThumbnailSettings from '$lib/components/admin-page/settings/thumbnail/thumbnail-settings.svelte';
|
2023-07-01 00:50:47 -04:00
|
|
|
import LoadingSpinner from '$lib/components/shared-components/loading-spinner.svelte';
|
|
|
|
|
import { api } from '@api';
|
|
|
|
|
import type { PageData } from './$types';
|
2022-12-09 15:51:42 -05:00
|
|
|
|
2023-07-01 00:50:47 -04:00
|
|
|
export let data: PageData;
|
2023-01-09 16:32:58 -05:00
|
|
|
|
2023-07-01 00:50:47 -04:00
|
|
|
const getConfig = async () => {
|
|
|
|
|
const { data } = await api.systemConfigApi.getConfig();
|
|
|
|
|
return data;
|
|
|
|
|
};
|
2022-12-09 15:51:42 -05:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<section class="">
|
2023-07-01 00:50:47 -04:00
|
|
|
{#await getConfig()}
|
|
|
|
|
<LoadingSpinner />
|
|
|
|
|
{:then configs}
|
2023-08-08 09:39:51 -05:00
|
|
|
<SettingAccordion title="Thumbnail Settings" subtitle="Manage the resolution of thumbnail sizes">
|
|
|
|
|
<ThumbnailSettings thumbnailConfig={configs.thumbnail} />
|
|
|
|
|
</SettingAccordion>
|
|
|
|
|
|
2023-07-01 00:50:47 -04:00
|
|
|
<SettingAccordion
|
|
|
|
|
title="FFmpeg Settings"
|
|
|
|
|
subtitle="Manage the resolution and encoding information of the video files"
|
|
|
|
|
>
|
|
|
|
|
<FFmpegSettings ffmpegConfig={configs.ffmpeg} />
|
|
|
|
|
</SettingAccordion>
|
2022-12-09 15:51:42 -05:00
|
|
|
|
2023-07-01 00:50:47 -04:00
|
|
|
<SettingAccordion
|
|
|
|
|
title="Job Settings"
|
|
|
|
|
subtitle="Manage job concurrency"
|
|
|
|
|
isOpen={$page.url.searchParams.get('open') === 'job-settings'}
|
|
|
|
|
>
|
|
|
|
|
<JobSettings jobConfig={configs.job} />
|
|
|
|
|
</SettingAccordion>
|
2023-06-01 06:32:51 -04:00
|
|
|
|
2023-07-01 00:50:47 -04:00
|
|
|
<SettingAccordion title="Password Authentication" subtitle="Manage login with password settings">
|
|
|
|
|
<PasswordLoginSettings passwordLoginConfig={configs.passwordLogin} />
|
|
|
|
|
</SettingAccordion>
|
2023-01-09 16:32:58 -05:00
|
|
|
|
2023-07-01 00:50:47 -04:00
|
|
|
<SettingAccordion title="OAuth Authentication" subtitle="Manage the login with OAuth settings">
|
|
|
|
|
<OAuthSettings oauthConfig={configs.oauth} />
|
|
|
|
|
</SettingAccordion>
|
2022-12-16 14:26:12 -06:00
|
|
|
|
2023-08-25 00:15:03 -04:00
|
|
|
<SettingAccordion title="Machine Learning" subtitle="Manage machine learning settings">
|
|
|
|
|
<MachineLearningSettings />
|
|
|
|
|
</SettingAccordion>
|
|
|
|
|
|
2023-07-01 00:50:47 -04:00
|
|
|
<SettingAccordion
|
|
|
|
|
title="Storage Template"
|
|
|
|
|
subtitle="Manage the folder structure and file name of the upload asset"
|
|
|
|
|
isOpen={$page.url.searchParams.get('open') === 'storage-template'}
|
|
|
|
|
>
|
|
|
|
|
<StorageTemplateSettings storageConfig={configs.storageTemplate} user={data.user} />
|
|
|
|
|
</SettingAccordion>
|
|
|
|
|
{/await}
|
2022-12-09 15:51:42 -05:00
|
|
|
</section>
|