misc: add util page for photon instance
This commit is contained in:
1 parent
f0134dbbcf
commit
683523d32c
3 files changed
+54
-23
No files matched your search
@@ -27,7 +27,7 @@
|
||||
on:click={() => invalidate(route.href)}
|
||||
href={route.href}
|
||||
class="font-medium rounded-full px-4 py-1 hover:bg-slate-200/40 hover:dark:bg-zinc-700/40
|
||||
transition-colors duration-100 relative z-0"
|
||||
transition-colors duration-100 relative z-0 flex-shrink-0"
|
||||
>
|
||||
{route.name}
|
||||
{#if isSelected($page.url, currentRoute, route.href)}
|
||||
|
||||
@@ -2,29 +2,45 @@
|
||||
import { goto } from '$app/navigation'
|
||||
import { page } from '$app/stores'
|
||||
import MultiSelect from '$lib/components/input/Switch.svelte'
|
||||
import Tabs from '$lib/components/ui/layout/pages/Tabs.svelte'
|
||||
import { contentPadding } from '$lib/components/ui/layout/Shell.svelte'
|
||||
</script>
|
||||
|
||||
<MultiSelect
|
||||
headless
|
||||
options={[
|
||||
'/util',
|
||||
'/util/photonify',
|
||||
'/util/placeholder',
|
||||
'/util/constants',
|
||||
'/util/functions',
|
||||
]}
|
||||
optionNames={[
|
||||
'Home',
|
||||
'Photonify links',
|
||||
'Placeholders',
|
||||
'Constants',
|
||||
'Functions',
|
||||
]}
|
||||
selected={$page.url.pathname}
|
||||
on:select={(e) => {
|
||||
goto(e.detail)
|
||||
}}
|
||||
/>
|
||||
<div class="mt-4 flex flex-col gap-2">
|
||||
<div class="flex flex-col gap-2">
|
||||
<div
|
||||
class="sticky mx-auto z-50 max-w-full min-w-0 flex items-center gap-2"
|
||||
style="top: max(1.5rem, {$contentPadding.top}px);"
|
||||
>
|
||||
<Tabs
|
||||
routes={[
|
||||
{
|
||||
href: '/util',
|
||||
name: 'Home',
|
||||
},
|
||||
{
|
||||
href: '/util/instance',
|
||||
name: 'Photon instance',
|
||||
},
|
||||
{
|
||||
href: '/util/photonify',
|
||||
name: 'Photonify Links',
|
||||
},
|
||||
{
|
||||
href: '/util/placeholder',
|
||||
name: 'Placeholders',
|
||||
},
|
||||
{
|
||||
href: '/util/constants',
|
||||
name: 'Constants',
|
||||
},
|
||||
{
|
||||
href: '/functions',
|
||||
name: 'Functions',
|
||||
},
|
||||
]}
|
||||
class="overflow-auto"
|
||||
currentRoute={$page.url.toString()}
|
||||
/>
|
||||
</div>
|
||||
<slot />
|
||||
</div>
|
||||
@@ -0,0 +1,15 @@
|
||||
<script>
|
||||
import { env } from '$env/dynamic/public'
|
||||
import Header from '$lib/components/ui/layout/pages/Header.svelte'
|
||||
import { DEFAULT_INSTANCE_URL, LINKED_INSTANCE_URL } from '$lib/instance'
|
||||
</script>
|
||||
|
||||
<Header pageHeader>Photon instance</Header>
|
||||
<pre>
|
||||
photon version: {__VERSION__}
|
||||
|
||||
linked instance: {LINKED_INSTANCE_URL ?? 'none'}
|
||||
default instance: {DEFAULT_INSTANCE_URL}
|
||||
SSR enabled: {env.PUBLIC_SSR_ENABLED ?? 'false'}
|
||||
default theme: {env.PUBLIC_THEME ?? "mr xylight's very awesome colors"}
|
||||
</pre>
|
||||
Reference in new issue
Block a user