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();
|
||||
</script>
|
||||
|
||||
<li role="none">
|
||||
<li role="none" class="grow-1">
|
||||
<Button.Root
|
||||
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'}"
|
||||
{...others}
|
||||
>
|
||||
|
||||
@ -34,10 +34,12 @@
|
||||
<NavBarLink Icon={IconHome} active={isActive('devices')} href="/dash/devices"
|
||||
>Devices</NavBarLink
|
||||
>
|
||||
<NavBarLink Icon={IconUsers} active={isActive('users')} href="/dash/users">Users</NavBarLink>
|
||||
<NavBarLink Icon={IconUsersGroup} active={isActive('groups')} href="/dash/groups"
|
||||
>Groups</NavBarLink
|
||||
>
|
||||
{#if data.user.admin}
|
||||
<NavBarLink Icon={IconUsers} active={isActive('users')} href="/dash/users">Users</NavBarLink>
|
||||
<NavBarLink Icon={IconUsersGroup} active={isActive('groups')} href="/dash/groups"
|
||||
>Groups</NavBarLink
|
||||
>
|
||||
{/if}
|
||||
</NavBar>
|
||||
<div class="flex grow">
|
||||
<div
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user