Files
spacedrive/packages/interface/src/AppLayout.tsx
Jamie Pine d621145f49 Assignable Tags (#370)
* Tag queries + Identifier bug fix

- added empty pages for docs
- added non-functional "New Library" button to sidebar
- to accomplish above, moved dialog logic to component folder
- fixed Identifier bug where location id was not considered in the orphan files query, meaning it would attempt to identify many non-existent paths and fail to create the legitimate ones

* (fix) maintain file item aspect ratio in grid view
(fix) get tag query + get all tags

* codegen

* resurrected context menu

* fix window flash

* remove location based thumb sorting + update react on landing

* add is_archived to location

* improved context menu

* assign tag + refactor explorer store

Co-authored-by: maxichrome <maxichrome@users.noreply.github.com>

* assign/unassign tags from context menu

* fix lint

* keep context menu open on tag change

* fix brendan feedback + merge main

* fix type

* codegen

* style changes

* revert windows size and xcode proj

* remove outdated doc

* coming sooooooon

* updated release notes

* release notes

* dashes > dots

* clean up docs

* more docs!

* restore entitlements

* remove unused util

* regenerated migrations post merge
- some additional error handling added to migration runner, needs more work!

* refactor explorer to support tags

* fix error and revert explorer bg color

* put it in a box they said

* revert location id store removal

* upgrade hero icons + style tweaks

Co-authored-by: maxichrome <maxichrome@users.noreply.github.com>
2022-09-04 13:00:24 -07:00

34 lines
1009 B
TypeScript

import { AppPropsContext } from '@sd/client';
import clsx from 'clsx';
import React, { useContext } from 'react';
import { Outlet } from 'react-router-dom';
import { Sidebar } from './components/layout/Sidebar';
export function AppLayout() {
const appProps = useContext(AppPropsContext);
const isWindowRounded = appProps?.platform === 'macOS';
const hasWindowBorder = appProps?.platform !== 'browser' && appProps?.platform !== 'windows';
return (
<div
onContextMenu={(e) => {
// TODO: allow this on some UI text at least / disable default browser context menu
e.preventDefault();
return false;
}}
className={clsx(
'flex flex-row h-screen overflow-hidden text-gray-900 select-none dark:text-white cursor-default',
isWindowRounded && 'rounded-xl',
hasWindowBorder && 'border border-gray-200 dark:border-gray-500'
)}
>
<Sidebar />
<div className="relative flex w-full h-screen max-h-screen bg-white dark:bg-gray-650">
<Outlet />
</div>
</div>
);
}