Update LinksDropdown.tsx

This commit is contained in:
Pas 2026-02-04 17:08:43 -07:00
parent 99bf5b545d
commit 20f7a08dd0

View file

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