-
-
-
-
- Neue Aufgabenliste erstellen
-
-
+
}
+ onClose={() => setShowNewListModal(false)}
+ onSubmit={handleCreateTaskList}
+ >
+
-
-
-
-
+
)}
{/* UNIFIED SHARE LIST MODAL */}
diff --git a/frontend/src/features/workspace/EmojiPickerModal.tsx b/frontend/src/features/workspace/EmojiPickerModal.tsx
index 9646fbc..84b315b 100644
--- a/frontend/src/features/workspace/EmojiPickerModal.tsx
+++ b/frontend/src/features/workspace/EmojiPickerModal.tsx
@@ -1,37 +1,25 @@
import React, { Suspense, useEffect, useRef, useState } from 'react';
-import { X, Trash2, Loader2, Clock } from 'lucide-react';
+import { X, Trash2, Loader2 } from 'lucide-react';
import type { EmojiClickData } from 'emoji-picker-react';
-import { EmojiStyle, Theme, SuggestionMode } from 'emoji-picker-react';
+import { Categories, EmojiStyle, Theme, SuggestionMode } from 'emoji-picker-react';
+import { useKeyboardInset } from '../../lib/useKeyboardInset';
// Lazy-load emoji-picker-react so the main bundle size stays small
const EmojiPicker = React.lazy(() => import('emoji-picker-react'));
-const RECENT_EMOJIS_STORAGE_KEY = 'mindsift_recent_emojis';
-const MAX_RECENT_EMOJIS = 10;
-
-function getStoredRecentEmojis(): string[] {
- try {
- const raw = localStorage.getItem(RECENT_EMOJIS_STORAGE_KEY);
- if (!raw) return ['📝', '💡', '🚀', '⭐', '🔥', '🎯', '📚', '💻'];
- const parsed = JSON.parse(raw);
- if (Array.isArray(parsed) && parsed.length > 0) {
- return parsed.slice(0, MAX_RECENT_EMOJIS);
- }
- } catch {
- // fallback
- }
- return ['📝', '💡', '🚀', '⭐', '🔥', '🎯', '📚', '💻'];
-}
-
-function saveRecentEmoji(emoji: string): void {
- try {
- const current = getStoredRecentEmojis();
- const updated = [emoji, ...current.filter((e) => e !== emoji)].slice(0, MAX_RECENT_EMOJIS);
- localStorage.setItem(RECENT_EMOJIS_STORAGE_KEY, JSON.stringify(updated));
- } catch {
- // ignore
- }
-}
+// The library's own "recently used" category (stored by it) is the only recent list; a second bar
+// would cost height on phones. Category names in German.
+const CATEGORIES = [
+ { category: Categories.SUGGESTED, name: 'Zuletzt verwendet' },
+ { category: Categories.SMILEYS_PEOPLE, name: 'Smileys & Personen' },
+ { category: Categories.ANIMALS_NATURE, name: 'Tiere & Natur' },
+ { category: Categories.FOOD_DRINK, name: 'Essen & Trinken' },
+ { category: Categories.TRAVEL_PLACES, name: 'Reisen & Orte' },
+ { category: Categories.ACTIVITIES, name: 'Aktivitäten' },
+ { category: Categories.OBJECTS, name: 'Objekte' },
+ { category: Categories.SYMBOLS, name: 'Symbole' },
+ { category: Categories.FLAGS, name: 'Flaggen' },
+];
interface EmojiPickerModalProps {
currentIcon?: string;
@@ -44,7 +32,10 @@ export const EmojiPickerModal: React.FC
= ({
onSelectEmoji,
onClose,
}) => {
- const [recentEmojis, setRecentEmojis] = useState(getStoredRecentEmojis);
+ const { inset, visibleHeight } = useKeyboardInset();
+ const isPhone = typeof window !== 'undefined' && window.innerWidth < 640;
+ // On phones the picker shrinks with the keyboard so search field and results stay visible
+ const pickerHeight = isPhone ? Math.max(200, Math.min(350, visibleHeight - 110)) : 350;
const [isDark, setIsDark] = useState(() =>
typeof document !== 'undefined'
? document.documentElement.classList.contains('dark')
@@ -92,8 +83,6 @@ export const EmojiPickerModal: React.FC = ({
}, [onClose]);
const handlePick = (emoji: string) => {
- saveRecentEmoji(emoji);
- setRecentEmojis(getStoredRecentEmojis());
onSelectEmoji(emoji);
};
@@ -114,7 +103,7 @@ export const EmojiPickerModal: React.FC = ({
= ({
'--epr-focus-bg-color': 'var(--bg-panel-elevated)',
'--epr-highlight-color': 'var(--accent-primary)',
'--epr-category-icon-active-color': 'var(--accent-primary)',
+ '--kb-inset': `${inset}px`,
+ '--vv-max': `${Math.round(visibleHeight * 0.9)}px`,
} as React.CSSProperties
}
>
@@ -170,30 +161,8 @@ export const EmojiPickerModal: React.FC = ({
- {/* Recent Emojis Bar */}
- {recentEmojis.length > 0 && (
-