extracted selection logic to own feature and anhanched with range selection
This commit is contained in:
parent
40f46eba1d
commit
1a963a665e
15 changed files with 295 additions and 254 deletions
|
@ -1,5 +1,5 @@
|
|||
import { Title } from "@solidjs/meta";
|
||||
import { Show } from "solid-js";
|
||||
import { ParentProps, Show } from "solid-js";
|
||||
import { BsTranslate } from "solid-icons/bs";
|
||||
import { FilesProvider } from "~/features/file";
|
||||
import { MenuProvider, asMenuRoot } from "~/features/menu";
|
||||
|
@ -8,7 +8,7 @@ import { A } from "@solidjs/router";
|
|||
|
||||
asMenuRoot // prevents removal of import
|
||||
|
||||
export default function Editor(props) {
|
||||
export default function Editor(props: ParentProps) {
|
||||
const supported = isServer || typeof window.showDirectoryPicker === 'function';
|
||||
|
||||
return <MenuProvider>
|
||||
|
@ -18,12 +18,10 @@ export default function Editor(props) {
|
|||
<A class="logo" href="/"><BsTranslate /></A>
|
||||
</nav>
|
||||
|
||||
<main style="padding: 1em; block-size: 100%; overflow: clip;">
|
||||
<Show when={supported} fallback={<span>too bad, so sad. Your browser does not support the File Access API</span>}>
|
||||
<FilesProvider>
|
||||
{props.children}
|
||||
</FilesProvider>
|
||||
</Show>
|
||||
</main>
|
||||
<Show when={supported} fallback={<span>too bad, so sad. Your browser does not support the File Access API</span>}>
|
||||
<FilesProvider>
|
||||
{props.children}
|
||||
</FilesProvider>
|
||||
</Show>
|
||||
</MenuProvider>
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue