feat(lists): switch lists from the title in the phone header
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
bd58b37156
commit
161c33c3d7
5 files changed
+165
-6
No files matched your search
@@ -16,6 +16,7 @@ import { OFFLINE_ITEM_PREFIX, pendingListItems } from '../../lib/offline';
|
||||
import { UnifiedShareModal } from '../../components/UnifiedShareModal';
|
||||
import { AvatarStack, AvatarPerson } from '../../components/AvatarStack';
|
||||
import { CountBadge } from '../../components/CountBadge';
|
||||
import { ListSwitcher } from '../../components/ListSwitcher';
|
||||
import { OriginBadge } from '../../components/OriginBadge';
|
||||
import { VoiceInputButton } from '../../components/VoiceInputButton';
|
||||
import { FormSheet } from '../../components/FormSheet';
|
||||
@@ -1170,9 +1171,21 @@ export const SharedListsView: React.FC<SharedListsViewProps> = ({ onRefreshGloba
|
||||
{/* Same height with or without the 36 px share button (Tasks, Shopping lists) */}
|
||||
<div className="flex sm:hidden items-center justify-between gap-2 px-3 py-2 min-h-[54px] rounded-btn bg-panel border border-border !mt-0">
|
||||
<div className="flex items-center gap-2 min-w-0">
|
||||
<span className="text-sm font-semibold text-main truncate">
|
||||
{activeList ? [activeList.icon, activeList.title].filter(Boolean).join(' ') : '🛒 Einkaufsliste'}
|
||||
</span>
|
||||
{activeList ? (
|
||||
<ListSwitcher
|
||||
label={[activeList.icon, activeList.title].filter(Boolean).join(' ')}
|
||||
items={lists.map((lst) => ({
|
||||
id: lst.id,
|
||||
title: lst.title,
|
||||
icon: lst.icon,
|
||||
count: deduplicateItems(lst.items || []).filter((i) => !i.isCompleted).length,
|
||||
}))}
|
||||
activeId={activeList.id}
|
||||
onSelect={setActiveListId}
|
||||
/>
|
||||
) : (
|
||||
<span className="text-sm font-semibold text-main truncate">🛒 Einkaufsliste</span>
|
||||
)}
|
||||
{openItems.length > 0 && (
|
||||
<span className="badge-neutral text-[11px] flex-shrink-0">
|
||||
{openItems.length} offen
|
||||
|
||||
@@ -40,6 +40,7 @@ import { VoiceInputButton } from '../../components/VoiceInputButton';
|
||||
import { ManageColumnsModal, DEFAULT_KANBAN_COLUMNS, columnDotClass } from './ManageColumnsModal';
|
||||
import { AvatarStack, AvatarPerson } from '../../components/AvatarStack';
|
||||
import { CountBadge } from '../../components/CountBadge';
|
||||
import { ListSwitcher } from '../../components/ListSwitcher';
|
||||
import { FormSheet } from '../../components/FormSheet';
|
||||
import { EmojiIconButton } from '../../components/EmojiIconButton';
|
||||
import { useMobileActions } from '../../context/MobileActionContext';
|
||||
@@ -1953,9 +1954,15 @@ export const TasksView: React.FC<TasksViewProps> = ({
|
||||
{/* Same height with or without the 36 px share button (Tasks, Shopping lists) */}
|
||||
<div className="flex sm:hidden items-center justify-between gap-2 px-3 py-2 min-h-[54px] rounded-btn bg-panel border border-border !mt-0">
|
||||
<div className="flex items-center gap-2 min-w-0">
|
||||
<span className="text-sm font-semibold text-main truncate">
|
||||
{currentSelectedList ? [currentSelectedList.icon, currentSelectedList.title].filter(Boolean).join(' ') : '📋 Alle Aufgaben'}
|
||||
</span>
|
||||
<ListSwitcher
|
||||
label={currentSelectedList ? [currentSelectedList.icon, currentSelectedList.title].filter(Boolean).join(' ') : '📋 Alle Aufgaben'}
|
||||
items={[
|
||||
{ id: 'all', title: 'Alle Aufgaben', icon: '📋', count: openTasksCount },
|
||||
...safeTaskLists.map((tl) => ({ id: tl.id, title: tl.title, icon: tl.icon, count: tl.tasksCount })),
|
||||
]}
|
||||
activeId={selectedListId}
|
||||
onSelect={setSelectedListId}
|
||||
/>
|
||||
<span className="badge-neutral text-[11px] flex-shrink-0">
|
||||
{viewMode === 'kanban'
|
||||
? 'Kanban'
|
||||
|
||||
Reference in new issue
Block a user