Files
spacedrive/interface/app/$libraryId/Layout/Sidebar/WindowControls.tsx
Oscar Beaumont 2571e3b275 Upgrade rspc TS (#775)
* finally

* should be working?

* fix types

* fix types

* Wouldn't it be nice if Metro would just work

* idk

* try harder Metro

* potentially fix bundling issues

* idk, maybe fix it?

* fix metro

* update podfile.lock

* bruh

* bruhz

* tailwind is drunk again

---------

Co-authored-by: Utku Bakir <74243531+utkubakir@users.noreply.github.com>
2023-05-04 06:21:42 +00:00

26 lines
799 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' || 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 />;
};