feat: integrate PDF Tools with toolbox portal
This commit is contained in:
21
src/App.tsx
21
src/App.tsx
@@ -1,5 +1,5 @@
|
||||
import React, { useCallback, useEffect, useState } from 'react';
|
||||
import Layout from './components/Layout';
|
||||
import { AppShell } from '@add-ideas/toolbox-shell-react';
|
||||
import FileLoader from './components/FileLoader';
|
||||
import ReorderPanel from './components/ReorderPanel';
|
||||
import ActionsPanel from './components/ActionsPanel';
|
||||
@@ -43,6 +43,7 @@ import {
|
||||
createSplitResultsZip,
|
||||
createSplitZipFilename,
|
||||
} from './pdf/pdfZipService';
|
||||
import { toolboxApp } from './toolboxApp';
|
||||
import {
|
||||
createSelectionPdfName,
|
||||
createSelectionWorkspaceName,
|
||||
@@ -1139,7 +1140,21 @@ const App: React.FC = () => {
|
||||
previewVisualIndex >= 0 && previewVisualIndex < pages.length - 1;
|
||||
|
||||
return (
|
||||
<Layout onOpenHelp={() => setHelpOpen(true)}>
|
||||
<AppShell
|
||||
app={toolboxApp}
|
||||
className="pdf-toolbox-shell"
|
||||
appActions={
|
||||
<button
|
||||
type="button"
|
||||
className="app-help-button"
|
||||
onClick={() => setHelpOpen(true)}
|
||||
aria-haspopup="dialog"
|
||||
title="Open help and keyboard shortcuts (F1 or ?)"
|
||||
>
|
||||
Help <span aria-hidden="true">?</span>
|
||||
</button>
|
||||
}
|
||||
>
|
||||
<FileLoader pdf={pdf} onFilesLoaded={handleFilesLoaded} />
|
||||
|
||||
{mergeQueueOpen && mergeQueueItems.length > 0 && (
|
||||
@@ -1252,7 +1267,7 @@ const App: React.FC = () => {
|
||||
</ActionDialog>
|
||||
|
||||
<HelpDialog open={helpOpen} onClose={() => setHelpOpen(false)} />
|
||||
</Layout>
|
||||
</AppShell>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user