Library import asks for a location to file the cards under

After picking a file, Import cards… asks where the cards are kept,
pre-filled with the file's name (a ManaBox export is named after its
binder). A location is set on every imported card, replacing any it had,
as Add Cards does; blank leaves locations alone. It's applied inside the
import's single transaction.
This commit is contained in:
2026-10-17 21:58:44 -05:00
parent 1641d9aa47
commit 4b651b5108
6 changed files with 149 additions and 19 deletions

View File

@@ -517,6 +517,7 @@ export const api = {
invoke<DeckImportResult>("import_deck", { path, name }),
exportLibraryCards: (oracleIds: string[], path: string) =>
invoke<void>("export_library_cards", { oracleIds, path }),
importLibraryCards: (path: string) =>
invoke<LibraryImportResult>("import_library_cards", { path }),
/** `location`, unless blank, is set on every imported card. */
importLibraryCards: (path: string, location: string) =>
invoke<LibraryImportResult>("import_library_cards", { path, location }),
};