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
|
||||
|
||||
Reference in new issue
Block a user