feat(collections): import a file into a list that already exists

The import dialog always made a new list. It now asks where the places go:
a new list, as before and still the default, or a list that is already there.
The picker offers the lists the person may edit, which is their own plus a
shared one where they are an editor or an admin, and starts on the list they
have open.

Adding to a list only ever adds. A place the list already holds is left
exactly as it is, with its status, notes, rating and labels, and counted as
already there in what the import reports; it is recognised the way a single
save recognises one, by provider id, then name, then position. The list keeps
its own name, colour, icon and description whatever the file says, a label
the file brings is created only when the list has none of that name, and new
places are appended after the ones already there so a manual order survives.

The route is POST /api/addons/collections/:id/import, 200 because it adds to
a list rather than making one, and both imports now write their places through
the same helper.
This commit is contained in:
Maurice
2026-09-19 23:12:25 +02:00
parent 7cfec6452d
commit d803efd39d
36 changed files with 978 additions and 81 deletions
+10
View File
@@ -150,6 +150,16 @@ const collection: TranslationStrings = {
'collections.file.importTitle': '목록 가져오기',
'collections.file.choose': '목록 파일 선택',
'collections.file.confirm': '가져오기',
'collections.file.targetNew': '새 리스트',
'collections.file.targetNewHint': '파일을 별도 리스트로',
'collections.file.targetExisting': '리스트에 추가',
'collections.file.targetExistingHint': '이미 있는 리스트에',
'collections.file.searchLists': '리스트 검색',
'collections.file.intoHint': '리스트에 이미 있는 장소는 그대로 유지되고, 이름과 색도 그대로입니다. 파일의 라벨은 추가됩니다.',
'collections.file.confirmInto': '리스트에 추가',
'collections.file.doneInto': '{count}개 장소를 {name}에 추가했습니다',
'collections.file.doneIntoDuplicates': '{count}개를 {name}에 추가했고, {duplicates}개는 이미 있었습니다',
'collections.file.doneIntoNothing': '파일의 모든 장소가 이미 {name}에 있습니다',
'collections.file.change': '변경',
'collections.file.labelCount': '라벨 {count}개',
'collections.file.hint': '장소는 내 새 목록으로 들어옵니다. 평가, 멤버, 업로드한 사진은 함께 오지 않습니다.',