Mobile Admin and contrast
This commit is contained in:
parent
1474ba29db
commit
0752bf129e
@ -20,7 +20,7 @@
|
|||||||
[data-theme='dark'] {
|
[data-theme='dark'] {
|
||||||
--text-color: #f4f4f4;
|
--text-color: #f4f4f4;
|
||||||
--bg-color: #0c0c0c;
|
--bg-color: #0c0c0c;
|
||||||
--hover-bg-color: #1c1e1e;
|
--hover-bg-color: #2c2e2e;
|
||||||
--separator-line-color: #2e343d;
|
--separator-line-color: #2e343d;
|
||||||
--low-emphasis-text-color: #999999;
|
--low-emphasis-text-color: #999999;
|
||||||
--primary-color: #1F96F3;
|
--primary-color: #1F96F3;
|
||||||
|
|||||||
@ -2,10 +2,14 @@
|
|||||||
import { page } from '$app/state';
|
import { page } from '$app/state';
|
||||||
import { userState } from '$lib/shared.svelte';
|
import { userState } from '$lib/shared.svelte';
|
||||||
import { PERMISSIONS } from '$lib/consts';
|
import { PERMISSIONS } from '$lib/consts';
|
||||||
|
import { MediaQuery } from 'svelte/reactivity';
|
||||||
|
|
||||||
|
const largeScreen = new MediaQuery('min-width: 1024px');
|
||||||
|
|
||||||
let { children } = $props();
|
let { children } = $props();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
{#if largeScreen.current}
|
||||||
<div class="bottom-border h-10 pt-2 text-center">
|
<div class="bottom-border h-10 pt-2 text-center">
|
||||||
{#if (userState.perms & PERMISSIONS.MANAGE_POSTINGS) > 0}
|
{#if (userState.perms & PERMISSIONS.MANAGE_POSTINGS) > 0}
|
||||||
<a
|
<a
|
||||||
@ -45,7 +49,12 @@
|
|||||||
>
|
>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
{/if}
|
||||||
|
|
||||||
<div class="base-container">
|
<div class="base-container">
|
||||||
|
{#if largeScreen.current}
|
||||||
{@render children()}
|
{@render children()}
|
||||||
|
{:else}
|
||||||
|
<h2 class="m-3 text-center">Please use a computer to view the admin page!</h2>
|
||||||
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user