-
{{ list.name }}
-
- {{ completedCount }}/{{ items.length }} done
- syncing…
-
+
+
+
+
{{ list.name }}
+
+ {{ completedCount }}/{{ items.length }} done
+ syncing…
+
+
+ ›
+
+
+
-
›
-
+
diff --git a/src/stores/__tests__/lists.spec.ts b/src/stores/__tests__/lists.spec.ts
index 95bf7bc..cbe26e7 100644
--- a/src/stores/__tests__/lists.spec.ts
+++ b/src/stores/__tests__/lists.spec.ts
@@ -84,14 +84,14 @@ vi.mock('@/database/db', () => ({
}))
const listsApiMocks = vi.hoisted(() => ({
- getListsApi: vi.fn(),
- createListApi: vi.fn(),
- getListItemsApi: vi.fn(),
- createListItemApi: vi.fn(),
- updateListItemApi: vi.fn(),
- setListItemCompletedApi: vi.fn(),
- addUserToListApi: vi.fn(),
- removeUserFromListApi: vi.fn(),
+ getListsApi: vi.fn<() => Promise
>(),
+ createListApi: vi.fn<() => Promise>(),
+ getListItemsApi: vi.fn<() => Promise>(),
+ createListItemApi: vi.fn<() => Promise>(),
+ updateListItemApi: vi.fn<() => Promise>(),
+ setListItemCompletedApi: vi.fn<() => Promise>(),
+ addUserToListApi: vi.fn<() => Promise>(),
+ removeUserFromListApi: vi.fn<() => Promise>(),
}))
vi.mock('@/api/lists', () => listsApiMocks)
@@ -254,9 +254,7 @@ describe('useListsStore', () => {
const store = useListsStore()
const localList = await store.createList('Local only')
- listsApiMocks.getListsApi.mockResolvedValueOnce([
- { id: localList.id, name: 'Server version' },
- ])
+ listsApiMocks.getListsApi.mockResolvedValueOnce([{ id: localList.id, name: 'Server version' }])
await store.pullFromServer()
diff --git a/src/stores/lists.ts b/src/stores/lists.ts
index e741bf5..255d6ad 100644
--- a/src/stores/lists.ts
+++ b/src/stores/lists.ts
@@ -211,9 +211,7 @@ export const useListsStore = defineStore('lists', () => {
const payload = queueEntry.payload as { list_item_id?: string }
await db.syncQueue.update(queueEntry.id!, {
localListItemId: newId,
- payload: payload?.list_item_id
- ? { ...payload, list_item_id: newId }
- : queueEntry.payload,
+ payload: payload?.list_item_id ? { ...payload, list_item_id: newId } : queueEntry.payload,
})
}
}
diff --git a/src/views/ListDetailView.vue b/src/views/ListDetailView.vue
index dd6a35a..d338c7d 100644
--- a/src/views/ListDetailView.vue
+++ b/src/views/ListDetailView.vue
@@ -10,7 +10,6 @@ const router = useRouter()
const listsStore = useListsStore()
const newItemTitle = ref('')
-const newUserId = ref('')
const isAddingItem = ref(false)
const itemError = ref('')
@@ -38,13 +37,6 @@ async function handleAddItem() {
isAddingItem.value = false
}
}
-
-async function handleAddUser() {
- const userId = newUserId.value.trim()
- if (!userId) return
- await listsStore.addUserToList(props.id, userId)
- newUserId.value = ''
-}
@@ -89,16 +81,6 @@ async function handleAddUser() {
No items yet — add your first one above.
-
-
List not found on this device.
@@ -157,6 +139,8 @@ h1 {
.items-list {
list-style: none;
+ padding: 0;
+ margin: 0;
}
.empty-hint {
@@ -165,28 +149,4 @@ h1 {
text-align: center;
padding: 1.5rem 0;
}
-
-.share-card {
- padding: 1rem 1.1rem;
- margin-top: 1.5rem;
-}
-
-.share-card h4 {
- font-size: 0.85rem;
- margin-bottom: 0.75rem;
-}
-
-.add-user-form {
- display: flex;
- gap: 0.6rem;
-}
-
-.add-user-form .field {
- flex: 1;
-}
-
-.add-user-form .btn {
- width: auto;
- flex-shrink: 0;
-}
diff --git a/src/views/ListsView.vue b/src/views/ListsView.vue
index 86dd25b..65005d6 100644
--- a/src/views/ListsView.vue
+++ b/src/views/ListsView.vue
@@ -1,18 +1,29 @@