fix(mobile): sheets above the keyboard, emoji picker, cleaner header
MindSift CI & Docker Release / Build, Test in Container & Push (push) Successful in 1m25s
MindSift CI & Docker Release / Build, Test in Container & Push (push) Successful in 1m25s
- FormSheet: create dialogs (task list, shopping list, folder) as bottom sheet right above the on-screen keyboard (visualViewport), large fields; centred or anchored dialog on desktop - Emoji picker: category icons keep their sprite size (no doubled icons, round highlight), one 'Zuletzt verwendet' (library category, German names), sheet and picker height follow the keyboard - Mobile header no longer repeats the current section next to the logo Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
108d166990
commit
eaabe469d5
10 files changed
+249
-217
No files matched your search
@@ -49,6 +49,7 @@ import {
|
||||
RealtimeTransport,
|
||||
} from '../../lib/api';
|
||||
import { UnifiedShareModal } from '../../components/UnifiedShareModal';
|
||||
import { FormSheet } from '../../components/FormSheet';
|
||||
import { sendDocOps } from '../../lib/docSync/oneoff';
|
||||
import { useMobileActions } from '../../context/MobileActionContext';
|
||||
import { DocumentEditor, DocSaveStatus } from './DocumentEditor';
|
||||
@@ -340,7 +341,7 @@ export const WorkspaceView: React.FC<WorkspaceViewProps> = ({
|
||||
if (e) {
|
||||
setNewFolderCoords({
|
||||
x: Math.min(e.clientX, window.innerWidth - 270),
|
||||
y: Math.min(e.clientY, window.innerHeight - 130),
|
||||
y: Math.min(e.clientY, window.innerHeight - 200),
|
||||
});
|
||||
} else {
|
||||
setNewFolderCoords({ x: 100, y: 150 });
|
||||
@@ -2196,55 +2197,22 @@ export const WorkspaceView: React.FC<WorkspaceViewProps> = ({
|
||||
|
||||
{/* New Folder Popover (small & positioned near click, asks only for name & OK) */}
|
||||
{showNewFolderModal && (
|
||||
<div
|
||||
className="fixed inset-0 z-50 bg-black/20"
|
||||
onClick={() => setShowNewFolderModal(false)}
|
||||
<FormSheet
|
||||
title={newFolderParentPath ? `Unterordner in "${newFolderParentPath}"` : 'Neuer Ordner'}
|
||||
icon={<FolderPlus className="w-4 h-4 text-accent" />}
|
||||
onClose={() => setShowNewFolderModal(false)}
|
||||
onSubmit={handleCreateFolderSubmit}
|
||||
anchor={newFolderCoords}
|
||||
>
|
||||
<form
|
||||
onSubmit={handleCreateFolderSubmit}
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
style={
|
||||
newFolderCoords
|
||||
? { top: `${newFolderCoords.y}px`, left: `${newFolderCoords.x}px` }
|
||||
: undefined
|
||||
}
|
||||
className="fixed w-64 bg-panel border border-border rounded-card p-3 shadow-lg space-y-2.5 z-50 text-xs"
|
||||
>
|
||||
<div className="font-semibold text-main text-xs flex items-center justify-between">
|
||||
<span className="truncate">{newFolderParentPath ? `Unterordner in "${newFolderParentPath}"` : 'Neuer Ordner'}</span>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setShowNewFolderModal(false)}
|
||||
className="text-faint hover:text-main cursor-pointer"
|
||||
>
|
||||
<X className="w-3.5 h-3.5" />
|
||||
</button>
|
||||
</div>
|
||||
<input
|
||||
type="text"
|
||||
autoFocus
|
||||
value={newFolderName}
|
||||
onChange={(e) => setNewFolderName(e.target.value)}
|
||||
placeholder="Ordnername"
|
||||
className="input-field w-full px-2 py-1 text-xs"
|
||||
/>
|
||||
<div className="flex justify-end gap-1.5 pt-1">
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setShowNewFolderModal(false)}
|
||||
className="btn-action px-2.5 py-1 text-xs"
|
||||
>
|
||||
Abbrechen
|
||||
</button>
|
||||
<button
|
||||
type="submit"
|
||||
className="btn-primary px-3 py-1 text-xs font-semibold"
|
||||
>
|
||||
OK
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<input
|
||||
type="text"
|
||||
autoFocus
|
||||
value={newFolderName}
|
||||
onChange={(e) => setNewFolderName(e.target.value)}
|
||||
placeholder="Ordnername"
|
||||
className="input-field w-full h-11 sm:h-8 px-2.5 text-base sm:text-xs"
|
||||
/>
|
||||
</FormSheet>
|
||||
)}
|
||||
|
||||
{/* Unified Sharing Modal (Strictly Read-Only for Docs and Folders) */}
|
||||
|
||||
Reference in new issue
Block a user