fix: navbar must only display devices if non-admin
also changed mobile layout a tiny bit
This commit is contained in:
parent
0ea3624ecd
commit
de1184b742
@ -4,10 +4,11 @@
|
|||||||
let { Icon = null, children, active, ...others } = $props();
|
let { Icon = null, children, active, ...others } = $props();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<li role="none">
|
<li role="none" class="grow-1">
|
||||||
<Button.Root
|
<Button.Root
|
||||||
role="menuitem"
|
role="menuitem"
|
||||||
class="flex items-center cursor-pointer px-4 py-1 rounded-full transition-all duration-300 ease-in-out
|
class="flex items-center justify-center cursor-pointer px-4 py-1 rounded-full
|
||||||
|
transition-all duration-300 ease-in-out
|
||||||
{active ? 'bg-neutral-100 text-neutral-900' : 'hover:bg-neutral-600'}"
|
{active ? 'bg-neutral-100 text-neutral-900' : 'hover:bg-neutral-600'}"
|
||||||
{...others}
|
{...others}
|
||||||
>
|
>
|
||||||
|
|||||||
@ -34,10 +34,12 @@
|
|||||||
<NavBarLink Icon={IconHome} active={isActive('devices')} href="/dash/devices"
|
<NavBarLink Icon={IconHome} active={isActive('devices')} href="/dash/devices"
|
||||||
>Devices</NavBarLink
|
>Devices</NavBarLink
|
||||||
>
|
>
|
||||||
<NavBarLink Icon={IconUsers} active={isActive('users')} href="/dash/users">Users</NavBarLink>
|
{#if data.user.admin}
|
||||||
<NavBarLink Icon={IconUsersGroup} active={isActive('groups')} href="/dash/groups"
|
<NavBarLink Icon={IconUsers} active={isActive('users')} href="/dash/users">Users</NavBarLink>
|
||||||
>Groups</NavBarLink
|
<NavBarLink Icon={IconUsersGroup} active={isActive('groups')} href="/dash/groups"
|
||||||
>
|
>Groups</NavBarLink
|
||||||
|
>
|
||||||
|
{/if}
|
||||||
</NavBar>
|
</NavBar>
|
||||||
<div class="flex grow">
|
<div class="flex grow">
|
||||||
<div
|
<div
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user