mirror of
https://github.com/hzrd149/nostrudel.git
synced 2025-09-22 15:19:47 +02:00
add media servers view to settings
This commit is contained in:
@@ -269,6 +269,7 @@ const router = createHashRouter([
|
|||||||
{ path: "privacy", element: <PrivacySettings /> },
|
{ path: "privacy", element: <PrivacySettings /> },
|
||||||
{ path: "lightning", element: <LightningSettings /> },
|
{ path: "lightning", element: <LightningSettings /> },
|
||||||
{ path: "performance", element: <PerformanceSettings /> },
|
{ path: "performance", element: <PerformanceSettings /> },
|
||||||
|
{ path: "media-servers", element: <MediaServersView /> },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@@ -12,8 +12,11 @@ import {
|
|||||||
PerformanceIcon,
|
PerformanceIcon,
|
||||||
SpyIcon,
|
SpyIcon,
|
||||||
} from "../../components/icons";
|
} from "../../components/icons";
|
||||||
|
import useCurrentAccount from "../../hooks/use-current-account";
|
||||||
|
import Image01 from "../../components/icons/image-01";
|
||||||
|
|
||||||
export default function SettingsView() {
|
export default function SettingsView() {
|
||||||
|
const account = useCurrentAccount();
|
||||||
const match = useMatch("/settings");
|
const match = useMatch("/settings");
|
||||||
const isMobile = useBreakpointValue({ base: true, lg: false });
|
const isMobile = useBreakpointValue({ base: true, lg: false });
|
||||||
const showMenu = !isMobile || !!match;
|
const showMenu = !isMobile || !!match;
|
||||||
@@ -30,6 +33,13 @@ export default function SettingsView() {
|
|||||||
<SimpleNavItem to="/settings/post" leftIcon={<NotesIcon boxSize={5} />}>
|
<SimpleNavItem to="/settings/post" leftIcon={<NotesIcon boxSize={5} />}>
|
||||||
Posts
|
Posts
|
||||||
</SimpleNavItem>
|
</SimpleNavItem>
|
||||||
|
{account && (
|
||||||
|
<>
|
||||||
|
<SimpleNavItem to="/settings/media-servers" leftIcon={<Image01 boxSize={6} />}>
|
||||||
|
Media Servers
|
||||||
|
</SimpleNavItem>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
<SimpleNavItem to="/settings/performance" leftIcon={<PerformanceIcon boxSize={5} />}>
|
<SimpleNavItem to="/settings/performance" leftIcon={<PerformanceIcon boxSize={5} />}>
|
||||||
Performance
|
Performance
|
||||||
</SimpleNavItem>
|
</SimpleNavItem>
|
||||||
|
Reference in New Issue
Block a user