diff --git a/package.json b/package.json index 9989b405..a0846599 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "photon-lemmy", - "version": "0.4.35", + "version": "0.5.0-beta.1", "private": true, "scripts": { "dev": "vite dev", diff --git a/src/lib/components/input/Checkbox.svelte b/src/lib/components/input/Checkbox.svelte new file mode 100644 index 00000000..b0a2d27e --- /dev/null +++ b/src/lib/components/input/Checkbox.svelte @@ -0,0 +1,15 @@ + + + diff --git a/src/lib/components/input/MultiSelect.svelte b/src/lib/components/input/MultiSelect.svelte index 5ea08b39..2d8610cc 100644 --- a/src/lib/components/input/MultiSelect.svelte +++ b/src/lib/components/input/MultiSelect.svelte @@ -1,40 +1,61 @@ -
+
{#each options.slice(0, 4) as option, index} {/each} {#if options.length > 4} @@ -56,14 +77,3 @@ {/if}
- - diff --git a/src/lib/components/input/SelectMenu.svelte b/src/lib/components/input/SelectMenu.svelte index 965f8898..3f37887c 100644 --- a/src/lib/components/input/SelectMenu.svelte +++ b/src/lib/components/input/SelectMenu.svelte @@ -1,25 +1,42 @@ - - +{#if label} +
{label}
+{/if} + +
+ +
{#each options as option, index} - (selected = option)}> + { + selected = option + dispatcher('select', option) + }} + > {optionNames[index] || option} {/each} diff --git a/src/lib/components/ui/Navbar.svelte b/src/lib/components/ui/Navbar.svelte index 9ddec68d..39598043 100644 --- a/src/lib/components/ui/Navbar.svelte +++ b/src/lib/components/ui/Navbar.svelte @@ -3,7 +3,10 @@ import Button from '$lib/components/input/Button.svelte' import Link from '$lib/components/input/Link.svelte' import ShieldIcon from '$lib/components/lemmy/moderation/ShieldIcon.svelte' - import { amModOfAny } from '$lib/components/lemmy/moderation/moderation.js' + import { + amModOfAny, + isAdmin, + } from '$lib/components/lemmy/moderation/moderation.js' import Avatar from '$lib/components/ui/Avatar.svelte' import Logo from '$lib/components/ui/Logo.svelte' import Spinner from '$lib/components/ui/loader/Spinner.svelte' @@ -17,6 +20,7 @@ Beaker, Bookmark, Cog6Tooth, + CommandLine, GlobeAlt, Icon, Inbox, @@ -82,10 +86,22 @@
+ {#if $profile?.user && isAdmin($profile.user)} + + {/if} {#if amModOfAny($profile?.user)} {/if} + diff --git a/src/routes/admin/config/+page.ts b/src/routes/admin/config/+page.ts new file mode 100644 index 00000000..02dd8a8a --- /dev/null +++ b/src/routes/admin/config/+page.ts @@ -0,0 +1,5 @@ +import { profile } from '$lib/auth.js' +import { getClient, site as siteStore } from '$lib/lemmy.js' +import { get } from 'svelte/store' + +export async function load({ fetch }) {} diff --git a/src/style/app.css b/src/style/app.css index fc23c5eb..67680ca6 100644 --- a/src/style/app.css +++ b/src/style/app.css @@ -5,11 +5,13 @@ :root { @apply bg-slate-50 dark:bg-zinc-950 text-slate-900 dark:text-zinc-100 !important; + accent-color: #000; } @media (prefers-color-scheme: dark) { :root { color-scheme: dark; + accent-color: #fff; } }