Files
spacedrive/interface/app/$libraryId/debug.tsx
Brendan Allan 0ef65fce2d [ENG-1423] Multiple tabs (#1777)
* tabs w/ multiple router instances

* fix router switching

* keybinds

* manual history tracking

* eslint

* remove scroll restoration

* fix tab removal

* route title + tab create delay

* typescript

* put tab list up top

* Remove import + show close button only if tabs length more than 1

* lint

* unify blur across whole top bar

* add to keybindings page, tauri drag region, and tooltip

* fix blur

* more drag regions

* merge moment

---------

Co-authored-by: ameer2468 <33054370+ameer2468@users.noreply.github.com>
2023-11-16 15:14:47 +00:00

47 lines
1.6 KiB
TypeScript

import { useBridgeQuery, useLibraryQuery } from '@sd/client';
import { CodeBlock } from '~/components/Codeblock';
import { useRouteTitle } from '~/hooks/useRouteTitle';
// TODO: Bring this back with a button in the sidebar near settings at the bottom
export const Component = () => {
useRouteTitle('Debug');
const { data: nodeState } = useBridgeQuery(['nodeState']);
const { data: libraryState } = useBridgeQuery(['library.list']);
// const { data: jobs } = useLibraryQuery(['jobs.getRunning']);
// const { data: jobHistory } = useLibraryQuery(['jobs.getHistory']);
// const { mutate: purgeDB } = useBridgeCommand('PurgeDatabase', {
// onMutate: () => {
// alert('Database purged');
// }
// });
// const { mutate: identifyFiles } = useLibraryMutation('jobs.identifyUniqueFiles');
return (
<div className="flex flex-col space-y-5 p-5 pb-7 pt-2">
<h1 className="text-lg font-bold ">Developer Debugger</h1>
{/* <div className="flex flex-row pb-4 space-x-2">
<Button
className="w-40"
variant="gray"
size="sm"
onClick={() => {
if (nodeState && appPropsContext?.onOpen) {
appPropsContext.onOpen(nodeState.data_path);
}
}}
>
Open data folder
</Button>
</div> */}
{/* <h1 className="text-sm font-bold ">Running Jobs</h1>
<CodeBlock src={{ ...jobs }} />
<h1 className="text-sm font-bold ">Job History</h1>
<CodeBlock src={{ ...jobHistory }} /> */}
<h1 className="text-sm font-bold ">Node State</h1>
<CodeBlock src={{ ...nodeState }} />
<h1 className="text-sm font-bold ">Libraries</h1>
<CodeBlock src={{ ...libraryState }} />
</div>
);
};