mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-12-18 20:04:17 +01:00
fix: extend fullscreen catalog without hiding picker
This commit is contained in:
parent
41cea1d50a
commit
8a234cf1d8
@ -49,6 +49,8 @@ export default function ToolPanel() {
|
||||
setToolPanelMode(isFullscreenMode ? 'sidebar' : 'fullscreen');
|
||||
};
|
||||
|
||||
const reservedDesktopWidth = '8.5rem';
|
||||
|
||||
const computedWidth = () => {
|
||||
if (isMobile) {
|
||||
return '100%';
|
||||
@ -56,7 +58,7 @@ export default function ToolPanel() {
|
||||
|
||||
if (isFullscreenMode) {
|
||||
if (isCatalogActive) {
|
||||
return 'clamp(32rem, 48vw, 56rem)';
|
||||
return `calc(100vw - ${reservedDesktopWidth})`;
|
||||
}
|
||||
|
||||
if (leftPanelView === 'toolContent' && isPanelVisible) {
|
||||
@ -78,6 +80,7 @@ export default function ToolPanel() {
|
||||
} ${isMobile ? 'h-full border-r-0' : 'h-screen'} ${isCatalogActive ? 'tool-panel--catalog' : ''}`}
|
||||
style={{
|
||||
width: computedWidth(),
|
||||
maxWidth: isCatalogActive ? `calc(100vw - ${reservedDesktopWidth})` : undefined,
|
||||
padding: '0',
|
||||
}}
|
||||
>
|
||||
|
||||
@ -71,7 +71,7 @@ export default function ToolPanelOverlay() {
|
||||
|
||||
const handleClose = () => {
|
||||
setSearchQuery('');
|
||||
setLeftPanelView(selectedToolKey ? 'toolContent' : 'hidden');
|
||||
setLeftPanelView(selectedToolKey ? 'toolContent' : 'toolPicker');
|
||||
};
|
||||
|
||||
const toggleLabel = toolPanelMode === 'fullscreen'
|
||||
|
||||
Loading…
Reference in New Issue
Block a user