2024-06-24 20:11:04 +02:00
|
|
|
<script lang="ts">
|
|
|
|
import { page } from "$app/stores";
|
|
|
|
|
2024-06-24 19:05:51 +02:00
|
|
|
import SettingsTab from "$components/settings/SettingsTab.svelte";
|
2024-06-24 16:23:55 +02:00
|
|
|
import SettingsSection from "$components/settings/SettingsSection.svelte";
|
2024-06-24 15:42:31 +02:00
|
|
|
|
|
|
|
import IconSunHigh from "@tabler/icons-svelte/IconSunHigh.svelte";
|
|
|
|
|
|
|
|
import IconMovie from "@tabler/icons-svelte/IconMovie.svelte";
|
|
|
|
import IconMusic from "@tabler/icons-svelte/IconMusic.svelte";
|
|
|
|
import IconFileSettings from "@tabler/icons-svelte/IconFileSettings.svelte";
|
2024-06-24 20:11:04 +02:00
|
|
|
|
|
|
|
let screenWidth: number;
|
|
|
|
|
|
|
|
$: isMobile = screenWidth <= 750;
|
|
|
|
$: isHome = $page.url.pathname === `/settings`;
|
2024-06-24 15:42:31 +02:00
|
|
|
</script>
|
|
|
|
|
2024-06-24 20:11:04 +02:00
|
|
|
<svelte:window bind:innerWidth={screenWidth} />
|
|
|
|
|
2024-06-24 15:42:31 +02:00
|
|
|
<div id="settings-page">
|
2024-06-24 20:11:04 +02:00
|
|
|
<div id="settings-sidebar" class:visible-mobile={isMobile && isHome}>
|
2024-06-24 19:05:51 +02:00
|
|
|
<h2 id="settings-page-title">settings</h2>
|
2024-06-24 15:42:31 +02:00
|
|
|
<nav id="settings-navigation">
|
|
|
|
<SettingsSection sectionTitle="general">
|
2024-06-24 19:05:51 +02:00
|
|
|
<SettingsTab
|
2024-06-24 19:46:37 +02:00
|
|
|
tabName="appearance"
|
|
|
|
tabLink="general/appearance"
|
2024-06-24 15:42:31 +02:00
|
|
|
iconColor="blue"
|
|
|
|
>
|
2024-06-24 19:46:37 +02:00
|
|
|
<IconSunHigh />
|
2024-06-24 19:05:51 +02:00
|
|
|
</SettingsTab>
|
2024-06-24 15:42:31 +02:00
|
|
|
</SettingsSection>
|
|
|
|
<SettingsSection sectionTitle="save">
|
2024-06-24 19:05:51 +02:00
|
|
|
<SettingsTab
|
2024-06-24 19:46:37 +02:00
|
|
|
tabName="video"
|
|
|
|
tabLink="save/video"
|
2024-06-24 15:42:31 +02:00
|
|
|
iconColor="green"
|
|
|
|
>
|
2024-06-24 19:46:37 +02:00
|
|
|
<IconMovie />
|
2024-06-24 19:05:51 +02:00
|
|
|
</SettingsTab>
|
|
|
|
<SettingsTab
|
2024-06-24 19:46:37 +02:00
|
|
|
tabName="audio"
|
|
|
|
tabLink="save/audio"
|
2024-06-24 15:42:31 +02:00
|
|
|
iconColor="green"
|
|
|
|
>
|
2024-06-24 19:46:37 +02:00
|
|
|
<IconMusic />
|
2024-06-24 19:05:51 +02:00
|
|
|
</SettingsTab>
|
|
|
|
<SettingsTab
|
2024-06-24 19:46:37 +02:00
|
|
|
tabName="metadata"
|
|
|
|
tabLink="save/metadata"
|
2024-06-24 15:42:31 +02:00
|
|
|
iconColor="green"
|
|
|
|
>
|
2024-06-24 19:46:37 +02:00
|
|
|
<IconFileSettings />
|
2024-06-24 19:05:51 +02:00
|
|
|
</SettingsTab>
|
2024-06-24 15:42:31 +02:00
|
|
|
</SettingsSection>
|
|
|
|
</nav>
|
|
|
|
</div>
|
|
|
|
|
2024-06-24 20:11:04 +02:00
|
|
|
<main id="settings-page-content" class:hidden-mobile={isMobile && isHome}>
|
2024-06-24 15:42:31 +02:00
|
|
|
<slot></slot>
|
|
|
|
</main>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<style>
|
2024-06-24 19:05:51 +02:00
|
|
|
#settings-page {
|
|
|
|
--settings-nav-width: 250px;
|
|
|
|
--settings-padding: 30px;
|
|
|
|
display: grid;
|
|
|
|
width: 100%;
|
|
|
|
grid-template-columns: var(--settings-nav-width) 1fr;
|
|
|
|
overflow: hidden;
|
|
|
|
padding-left: calc(var(--settings-padding) - var(--padding));
|
|
|
|
padding-top: calc(var(--settings-padding) - var(--padding));
|
|
|
|
}
|
|
|
|
|
|
|
|
#settings-page-content {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
gap: var(--settings-padding);
|
|
|
|
max-width: 600px;
|
|
|
|
padding: 0 var(--settings-padding);
|
|
|
|
overflow-y: scroll;
|
|
|
|
}
|
|
|
|
|
2024-06-24 15:42:31 +02:00
|
|
|
#settings-sidebar,
|
|
|
|
#settings-navigation {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
}
|
|
|
|
|
|
|
|
#settings-sidebar {
|
2024-06-24 19:05:51 +02:00
|
|
|
width: var(--settings-nav-width);
|
2024-06-24 15:42:31 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
#settings-sidebar {
|
|
|
|
gap: 24px;
|
|
|
|
}
|
|
|
|
|
|
|
|
#settings-navigation {
|
|
|
|
gap: 12px;
|
|
|
|
}
|
2024-06-24 20:11:04 +02:00
|
|
|
|
|
|
|
.hidden-mobile {
|
|
|
|
display: none !important;
|
|
|
|
}
|
|
|
|
|
|
|
|
@media screen and (max-width: 750px) {
|
|
|
|
#settings-page {
|
|
|
|
--settings-nav-width: 100%;
|
|
|
|
grid-template-columns: 1fr;
|
|
|
|
}
|
|
|
|
|
|
|
|
#settings-sidebar {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
#settings-sidebar.visible-mobile {
|
|
|
|
display: flex;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-06-24 15:42:31 +02:00
|
|
|
</style>
|