web/sidebar: simplify settings link logic
This commit is contained in:
parent
157b687ab5
commit
9ae0473f80
1 changed files with 4 additions and 9 deletions
|
@ -12,17 +12,12 @@
|
||||||
import IconComet from "@tabler/icons-svelte/IconComet.svelte";
|
import IconComet from "@tabler/icons-svelte/IconComet.svelte";
|
||||||
import IconHeart from "@tabler/icons-svelte/IconHeart.svelte";
|
import IconHeart from "@tabler/icons-svelte/IconHeart.svelte";
|
||||||
import IconInfoCircle from "@tabler/icons-svelte/IconInfoCircle.svelte";
|
import IconInfoCircle from "@tabler/icons-svelte/IconInfoCircle.svelte";
|
||||||
|
import { defaultSettingsPage } from "$lib/settings/defaults";
|
||||||
|
|
||||||
let screenWidth: number,
|
let screenWidth: number;
|
||||||
settingsLink: string;
|
let settingsLink = defaultSettingsPage();
|
||||||
|
|
||||||
$: isMobile = screenWidth <= 750;
|
$: screenWidth, settingsLink = defaultSettingsPage();
|
||||||
|
|
||||||
$: if (isMobile) {
|
|
||||||
settingsLink = "/settings";
|
|
||||||
} else {
|
|
||||||
settingsLink = "/settings/general/appearance";
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:window bind:innerWidth={screenWidth} />
|
<svelte:window bind:innerWidth={screenWidth} />
|
||||||
|
|
Loading…
Reference in a new issue