fix(dashboard): make dropdowns keyboard navigable

This commit is contained in:
Draconizations 2022-05-19 21:38:53 +02:00
parent 5cd6ccf99c
commit b9a7b08281

View File

@ -29,7 +29,7 @@ import { get } from 'svelte/store';
<Collapse {isOpen} navbar expand="lg">
<Nav class="ms-auto" navbar>
<Dropdown nav inNavbar>
<DropdownToggle color="transparent" tag="span" class="nav-link">Styles</DropdownToggle>
<DropdownToggle color="transparent" class="nav-link"><span class="select-text">Styles</span></DropdownToggle>
<DropdownMenu end>
<DropdownItem on:click={() => style = "light"}>Light</DropdownItem>
<DropdownItem on:click={() => style = "dark"}>Dark</DropdownItem>
@ -37,7 +37,7 @@ import { get } from 'svelte/store';
</Dropdown>
{#if loggedIn_value || localStorage.getItem("pk-token")}
<Dropdown nav inNavbar>
<DropdownToggle color="transparent" tag="span" class="nav-link">Dash</DropdownToggle>
<DropdownToggle color="transparent" class="nav-link"><span class="select-text">Dash</span></DropdownToggle>
<DropdownMenu end>
<Link style="text-decoration: none;" to="/dash?tab=system"><DropdownItem>System</DropdownItem></Link>
<Link style="text-decoration: none;" to="/dash?tab=members"><DropdownItem>Members</DropdownItem></Link>
@ -56,3 +56,9 @@ import { get } from 'svelte/store';
</Nav>
</Collapse>
</Navbar>
<style>
.select-text {
user-select: text;
}
</style>