misc: add util page for photon instance
This commit is contained in:
1 parent
f0134dbbcf
commit
683523d32c
3 files changed
+53
-22
No files matched your search
@@ -27,7 +27,7 @@
|
|||||||
on:click={() => invalidate(route.href)}
|
on:click={() => invalidate(route.href)}
|
||||||
href={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
|
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}
|
{route.name}
|
||||||
{#if isSelected($page.url, currentRoute, route.href)}
|
{#if isSelected($page.url, currentRoute, route.href)}
|
||||||
|
|||||||
@@ -2,29 +2,45 @@
|
|||||||
import { goto } from '$app/navigation'
|
import { goto } from '$app/navigation'
|
||||||
import { page } from '$app/stores'
|
import { page } from '$app/stores'
|
||||||
import MultiSelect from '$lib/components/input/Switch.svelte'
|
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>
|
</script>
|
||||||
|
|
||||||
<MultiSelect
|
<div class="flex flex-col gap-2">
|
||||||
headless
|
<div
|
||||||
options={[
|
class="sticky mx-auto z-50 max-w-full min-w-0 flex items-center gap-2"
|
||||||
'/util',
|
style="top: max(1.5rem, {$contentPadding.top}px);"
|
||||||
'/util/photonify',
|
>
|
||||||
'/util/placeholder',
|
<Tabs
|
||||||
'/util/constants',
|
routes={[
|
||||||
'/util/functions',
|
{
|
||||||
|
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',
|
||||||
|
},
|
||||||
]}
|
]}
|
||||||
optionNames={[
|
class="overflow-auto"
|
||||||
'Home',
|
currentRoute={$page.url.toString()}
|
||||||
'Photonify links',
|
/>
|
||||||
'Placeholders',
|
</div>
|
||||||
'Constants',
|
|
||||||
'Functions',
|
|
||||||
]}
|
|
||||||
selected={$page.url.pathname}
|
|
||||||
on:select={(e) => {
|
|
||||||
goto(e.detail)
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<div class="mt-4 flex flex-col gap-2">
|
|
||||||
<slot />
|
<slot />
|
||||||
</div>
|
</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