mirror of
https://github.com/Radiquum/AniX.git
synced 2025-04-04 23:34:38 +00:00
refactor: remove 'show only link names in navbar' in settings on mobile
This commit is contained in:
parent
bf67b5d928
commit
1959fcd437
2 changed files with 20 additions and 19 deletions
|
@ -87,7 +87,7 @@ export const Navbar = () => {
|
|||
return (
|
||||
<>
|
||||
<header className="fixed bottom-0 left-0 z-50 w-full text-white bg-black rounded-t-lg sm:sticky sm:top-0 sm:rounded-t-none sm:rounded-b-lg">
|
||||
<div className="container flex items-center justify-center gap-4 mx-auto sm:gap-0 sm:justify-between">
|
||||
<div className="container flex items-center min-h-[76px] justify-center gap-4 mx-auto sm:gap-0 sm:justify-between">
|
||||
<div className="flex items-center gap-8 px-2 py-4 sm:gap-4">
|
||||
{menuItems.map((item) => {
|
||||
return (
|
||||
|
|
|
@ -33,7 +33,7 @@ const NavbarTitles = {
|
|||
links: "Только ссылки",
|
||||
selected: "Только выбранные",
|
||||
never: "Никогда",
|
||||
}
|
||||
};
|
||||
|
||||
export const SettingsModal = (props: { isOpen: boolean; setIsOpen: any }) => {
|
||||
const preferenceStore = usePreferencesStore();
|
||||
|
@ -169,24 +169,25 @@ export const SettingsModal = (props: { isOpen: boolean; setIsOpen: any }) => {
|
|||
</p>
|
||||
<Dropdown
|
||||
color="blue"
|
||||
label={
|
||||
NavbarTitles[preferenceStore.flags.showNavbarTitles]
|
||||
}
|
||||
label={NavbarTitles[preferenceStore.flags.showNavbarTitles]}
|
||||
>
|
||||
{Object.keys(NavbarTitles).map((key: "always" | "links" | "selected" | "never") => {
|
||||
return (
|
||||
<Dropdown.Item
|
||||
key={`navbar-titles-${key}`}
|
||||
onClick={() =>
|
||||
preferenceStore.setFlags({
|
||||
showNavbarTitles: key,
|
||||
})
|
||||
}
|
||||
>
|
||||
{NavbarTitles[key]}
|
||||
</Dropdown.Item>
|
||||
);
|
||||
})}
|
||||
{Object.keys(NavbarTitles).map(
|
||||
(key: "always" | "links" | "selected" | "never") => {
|
||||
return (
|
||||
<Dropdown.Item
|
||||
className={`${key == "links" ? "hidden lg:flex" : ""}`}
|
||||
key={`navbar-titles-${key}`}
|
||||
onClick={() =>
|
||||
preferenceStore.setFlags({
|
||||
showNavbarTitles: key,
|
||||
})
|
||||
}
|
||||
>
|
||||
{NavbarTitles[key]}
|
||||
</Dropdown.Item>
|
||||
);
|
||||
}
|
||||
)}
|
||||
</Dropdown>
|
||||
</div>
|
||||
<HR className="my-4 dark:bg-slate-400" />
|
||||
|
|
Loading…
Add table
Reference in a new issue