mirror of
https://github.com/arsvendg/Stirling-PDF.git
synced 2026-09-13 20:25:28 +02:00
fileshare (#5414)
Co-authored-by: ConnorYoh <[email protected]> Co-authored-by: Connor Yoh <[email protected]> Co-authored-by: EthanHealy01 <[email protected]> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
ConnorYoh
Connor Yoh
EthanHealy01
Copilot Autofix powered by AI
parent
47cad0a131
commit
28613caf8a
@@ -45,6 +45,7 @@ export default function HomePage() {
|
||||
readerMode,
|
||||
setLeftPanelView,
|
||||
toolAvailability,
|
||||
customWorkbenchViews,
|
||||
} = useToolWorkflow();
|
||||
|
||||
const { openFilesModal } = useFilesModalContext();
|
||||
@@ -104,6 +105,10 @@ export default function HomePage() {
|
||||
navigationState.workbench,
|
||||
]);
|
||||
|
||||
const hideToolPanel = customWorkbenchViews.find(
|
||||
(v) => v.workbenchId === navigationState.workbench
|
||||
)?.hideToolPanel ?? false;
|
||||
|
||||
const brandAltText = t("home.mobile.brandAlt", "Stirling PDF logo");
|
||||
const brandIconSrc = useLogoPath();
|
||||
const { wordmark } = useLogoAssets();
|
||||
@@ -178,6 +183,14 @@ export default function HomePage() {
|
||||
}
|
||||
}, [isMobile, readerMode, selectedToolKey]);
|
||||
|
||||
// Automatically switch to workbench slide when a custom workbench (e.g. signing) is active on mobile.
|
||||
// hideToolPanel is true for all custom workbenches that take over the full screen.
|
||||
useEffect(() => {
|
||||
if (isMobile && hideToolPanel) {
|
||||
setActiveMobileView('workbench');
|
||||
}
|
||||
}, [isMobile, hideToolPanel]);
|
||||
|
||||
// When navigating back to tools view in mobile with a workbench-only tool, show tool picker
|
||||
useEffect(() => {
|
||||
if (isMobile && activeMobileView === 'tools' && selectedTool) {
|
||||
@@ -314,7 +327,7 @@ export default function HomePage() {
|
||||
className="flex-nowrap flex"
|
||||
>
|
||||
<QuickAccessBar ref={quickAccessRef} />
|
||||
<ToolPanel />
|
||||
{!hideToolPanel && <ToolPanel />}
|
||||
<Workbench />
|
||||
<RightRail />
|
||||
<FileManager selectedTool={selectedTool as any /* FIX ME */} />
|
||||
|
||||
Reference in New Issue
Block a user