anix: show discovery button by default

This commit is contained in:
Kentai Radiquum 2025-08-27 19:35:26 +05:00
parent a615af836b
commit 28b7ea2d6c
Signed by: Radiquum
GPG key ID: 858E8EE696525EED
4 changed files with 30 additions and 22 deletions

View file

@ -54,7 +54,7 @@ const FifthButton = {
title: "Обзор", title: "Обзор",
icon: "mdi--compass", icon: "mdi--compass",
href: "/discovery", href: "/discovery",
auth: true, auth: false,
}, },
}; };
@ -81,8 +81,14 @@ export const NavBarMobile = (props: { setIsSettingModalOpen: any }) => {
</Link> </Link>
); );
})} })}
{userStore.isAuth && preferenceStore.flags.showFifthButton ? {preferenceStore.flags.showFifthButton ?
<Link <>
{(
!userStore.isAuth &&
FifthButton[preferenceStore.flags.showFifthButton].auth
) ?
<></>
: <Link
href={FifthButton[preferenceStore.flags.showFifthButton].href} href={FifthButton[preferenceStore.flags.showFifthButton].href}
key={`navbar-mobile-${FifthButton[preferenceStore.flags.showFifthButton].title}`} key={`navbar-mobile-${FifthButton[preferenceStore.flags.showFifthButton].title}`}
className="flex flex-col items-center justify-center gap-1" className="flex flex-col items-center justify-center gap-1"
@ -94,6 +100,8 @@ export const NavBarMobile = (props: { setIsSettingModalOpen: any }) => {
{FifthButton[preferenceStore.flags.showFifthButton].title} {FifthButton[preferenceStore.flags.showFifthButton].title}
</span> </span>
</Link> </Link>
}
</>
: ""} : ""}
<Dropdown <Dropdown
arrowIcon={false} arrowIcon={false}

View file

@ -16,6 +16,12 @@ const NavbarItems = [
href: "/", href: "/",
auth: false, auth: false,
}, },
{
title: "Обзор",
icon: "mdi--compass",
href: "/discovery",
auth: false,
},
{ {
title: "Поиск", title: "Поиск",
icon: "mdi--search", icon: "mdi--search",
@ -46,12 +52,6 @@ const NavbarItems = [
href: "/history", href: "/history",
auth: true, auth: true,
}, },
{
title: "Обзор",
icon: "mdi--compass",
href: "/discovery",
auth: true,
},
]; ];
export const NavBarPc = (props: { setIsSettingModalOpen: any }) => { export const NavBarPc = (props: { setIsSettingModalOpen: any }) => {

View file

@ -96,7 +96,7 @@ export const PosterWithStuff = (props: {
</p> </p>
)} )}
{props.title_original && ( {props.title_original && (
<p className="hidden mt-2 text-sm leading-none text-gray-300 sm:block md:text-base line-clamp-2"> <p className="hidden mt-2 text-sm leading-none text-gray-300 sm:[display:-webkit-box] md:text-base line-clamp-2">
{props.title_original} {props.title_original}
</p> </p>
)} )}

View file

@ -40,7 +40,7 @@ export const usePreferencesStore = create<preferencesState>()(
flags: { flags: {
saveWatchHistory: true, saveWatchHistory: true,
showChangelog: true, showChangelog: true,
showFifthButton: null, showFifthButton: "discovery",
}, },
params: { params: {
isFirstLaunch: true, isFirstLaunch: true,