From 0752bf129ed447f818c2b1a342fd7cf6ed227522 Mon Sep 17 00:00:00 2001 From: Drake Marino Date: Thu, 19 Jun 2025 20:22:03 -0500 Subject: [PATCH] Mobile Admin and contrast --- src/app.css | 2 +- src/routes/admin/+layout.svelte | 89 ++++++++++++++++++--------------- 2 files changed, 50 insertions(+), 41 deletions(-) diff --git a/src/app.css b/src/app.css index ba7dbbd..2096704 100644 --- a/src/app.css +++ b/src/app.css @@ -20,7 +20,7 @@ [data-theme='dark'] { --text-color: #f4f4f4; --bg-color: #0c0c0c; - --hover-bg-color: #1c1e1e; + --hover-bg-color: #2c2e2e; --separator-line-color: #2e343d; --low-emphasis-text-color: #999999; --primary-color: #1F96F3; diff --git a/src/routes/admin/+layout.svelte b/src/routes/admin/+layout.svelte index 50c9b6b..b659220 100644 --- a/src/routes/admin/+layout.svelte +++ b/src/routes/admin/+layout.svelte @@ -2,50 +2,59 @@ import { page } from '$app/state'; import { userState } from '$lib/shared.svelte'; import { PERMISSIONS } from '$lib/consts'; + import { MediaQuery } from 'svelte/reactivity'; + + const largeScreen = new MediaQuery('min-width: 1024px'); let { children } = $props(); -
- {#if (userState.perms & PERMISSIONS.MANAGE_POSTINGS) > 0} - work Postings - {/if} - {#if (userState.perms & PERMISSIONS.MANAGE_USERS) > 0} - group Users - {/if} - - - - - - - - - - - {#if (userState.perms & PERMISSIONS.MANAGE_COMPANIES) > 0} - store Companies - {/if} -
+{#if largeScreen.current} +
+ {#if (userState.perms & PERMISSIONS.MANAGE_POSTINGS) > 0} + work Postings + {/if} + {#if (userState.perms & PERMISSIONS.MANAGE_USERS) > 0} + group Users + {/if} + + + + + + + + + + + {#if (userState.perms & PERMISSIONS.MANAGE_COMPANIES) > 0} + store Companies + {/if} +
+{/if}
- {@render children()} + {#if largeScreen.current} + {@render children()} + {:else} +

Please use a computer to view the admin page!

+ {/if}