Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Windows Control buttons to the TopBar on "Peer" tab #2674

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
added windows control buttons to the "Peer" tab
  • Loading branch information
artsiom-voitas committed Aug 18, 2024
commit 420b9fbad2c280b91c84e58850e586cf329d7582
6 changes: 5 additions & 1 deletion interface/app/$libraryId/peer/$id.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { HardwareModel, usePeers } from '@sd/client';
import { NodeIdParamsSchema } from '~/app/route-schemas';
import { Icon } from '~/components';
import { useRouteTitle, useZodRouteParams } from '~/hooks';
import { useOperatingSystem, useRouteTitle, useZodRouteParams } from '~/hooks';
import { hardwareModelToIcon } from '~/util/hardware';

import { DefaultTopBarOptions } from '../Explorer/TopBarOptions';
import { TopBarPortal } from '../TopBar/Portal';
import TopBarOptions from '../TopBar/TopBarOptions';
import StarfieldEffect from './StarfieldEffect'; // Import the StarfieldEffect component

export const Component = () => {
Expand All @@ -13,6 +15,7 @@ export const Component = () => {
const peers = usePeers();
const peer = peers.get(nodeId);
const title = useRouteTitle(peer?.metadata?.name || 'Peer');
const os = useOperatingSystem();

return (
<div className="flex w-full items-center justify-center">
Expand All @@ -22,6 +25,7 @@ export const Component = () => {
<span className="truncate text-sm font-medium">{title}</span>
</div>
}
right={os === 'windows' && <TopBarOptions />}
/>

{peer?.metadata.device_model && (
Expand Down
Loading