refactor: remove 'show only link names in navbar' in settings on mobile

This commit is contained in:
Kentai Radiquum 2025-03-27 20:54:43 +05:00
parent bf67b5d928
commit 1959fcd437
Signed by: Radiquum
GPG key ID: 858E8EE696525EED
2 changed files with 20 additions and 19 deletions

View file

@ -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 (

View file

@ -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" />