Files
spacedrive/interface/app/$libraryId/Layout/Sidebar/SidebarLayout/WindowControls.tsx
Jamie Pine 3f3815e33c [ENG-1511] Library Screens (#1903)
* init

* changes

* Now updating statistics once a minute

* More robust statistics updater

* Concurrency is hard

* improvements to stats

* refactor

* adjust setting back/forward padding so it matches top bar

* refactor sidebar

* rename

* setting up screens

* some changes

* Co-authored-by: Brendan Allan <Brendonovich@users.noreply.github.com>

* yes

* yes2

* refactored explorerItem.ts

* important explorer code shouldn't be thrown away in a util moment

* support for multiple thumbnails in ExplorerItem

* clippy

* move debug

* yes

* label filters

* ts

* comment out unconnected stuff

* added .mid for midi files

---------

Co-authored-by: Ericson Fogo Soares <ericson.ds999@gmail.com>
Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2024-01-16 12:15:03 +00:00

27 lines
820 B
TypeScript

import clsx from 'clsx';
import { MacTrafficLights } from '~/components/TrafficLights';
import { useOperatingSystem } from '~/hooks/useOperatingSystem';
import { usePlatform } from '~/util/Platform';
import { macOnly } from '../helpers';
export default () => {
const { platform } = usePlatform();
const os = useOperatingSystem();
const showControls = window.location.search.includes('showControls');
if ((platform === 'tauri' && os == 'macOS') || showControls) {
return (
<div data-tauri-drag-region className={clsx('shrink-0', macOnly(os, 'h-7'))}>
{/* We do not provide the onClick handlers for 'MacTrafficLights' because this is only used in demo mode */}
{showControls && (
<MacTrafficLights className="absolute left-[13px] top-[13px] z-50" />
)}
</div>
);
}
return <div />;
};