mirror of
https://github.com/p-stream/p-stream.git
synced 2026-04-20 04:32:05 +00:00
Update LinksDropdown.tsx
This commit is contained in:
parent
99bf5b545d
commit
20f7a08dd0
1 changed files with 14 additions and 8 deletions
|
|
@ -13,6 +13,7 @@ import { Spinner } from "@/components/layout/Spinner";
|
|||
import { Transition } from "@/components/utils/Transition";
|
||||
import { useAuth } from "@/hooks/auth/useAuth";
|
||||
import { useBackendUrl } from "@/hooks/auth/useBackendUrl";
|
||||
import { useIsDesktopApp } from "@/hooks/useIsDesktopApp";
|
||||
import { conf } from "@/setup/config";
|
||||
import { useAuthStore } from "@/stores/auth";
|
||||
import { usePreferencesStore } from "@/stores/preferences";
|
||||
|
|
@ -244,6 +245,7 @@ export function LinksDropdown(props: { children: React.ReactNode }) {
|
|||
const enableLowPerformanceMode = usePreferencesStore(
|
||||
(s) => s.enableLowPerformanceMode,
|
||||
);
|
||||
const isDesktopApp = useIsDesktopApp();
|
||||
|
||||
return (
|
||||
<div className="relative is-dropdown">
|
||||
|
|
@ -291,14 +293,18 @@ export function LinksDropdown(props: { children: React.ReactNode }) {
|
|||
<DropdownLink href="/settings" icon={Icons.SETTINGS}>
|
||||
{t("navigation.menu.settings")}
|
||||
</DropdownLink>
|
||||
<DropdownLink
|
||||
onClick={() =>
|
||||
window.dispatchEvent(new CustomEvent("pstream-desktop-settings"))
|
||||
}
|
||||
icon={Icons.GEAR}
|
||||
>
|
||||
{t("navigation.menu.desktop")}
|
||||
</DropdownLink>
|
||||
{isDesktopApp && (
|
||||
<DropdownLink
|
||||
onClick={() =>
|
||||
window.dispatchEvent(
|
||||
new CustomEvent("pstream-desktop-settings"),
|
||||
)
|
||||
}
|
||||
icon={Icons.GEAR}
|
||||
>
|
||||
{t("navigation.menu.desktop")}
|
||||
</DropdownLink>
|
||||
)}
|
||||
<DropdownLink href="/watch-history" icon={Icons.CLOCK}>
|
||||
{t("home.watchHistory.sectionTitle")}
|
||||
</DropdownLink>
|
||||
|
|
|
|||
Loading…
Reference in a new issue