Anki/rslib/src/storage
RumovZ 14de8451dc
Merging Notetypes on Import (#2612)
* Remember original id when importing notetype

* Reuse notetypes with matching original id

* Add field and template ids

* Enable merging imported notetypes

* Fix test

Note should be updated if the incoming note's notetype is
remapped to the existing note's notetype.
On the other hand, it should be skipped if its notetype id is mapped
to some new notetype.

* Change field and template ids to i32

* Add merge notetypes flag to proto message

* Add dialog for apkg import

* Move HelpModal into components

* Generalize import dialog

* Move SettingTitle into components

* Add help modal to ImportAnkiPackagePage

* Move SwitchRow into components

* Fix backend method import

* Make testable in browser

* Fix broken modal

* Wrap in container and fix margins

* Update commented Anki version of new proto fields

* Check ids when comparing notetype schemas

* Add tooltip for merging notetypes.

* Allow updating notes regardless of mtime

* Gitignore yarn-error.log

* Allow updating notetypes regardless of mtime

* Fix apkg help carousel

* Use i64s for template and field ids

* Add option to omit importing scheduling info

* Restore last settings in apkg import dialog

* Display error when getting metadata in webview

* Update manual links for apkg importing

* Apply suggestions from code review

Co-authored-by: Damien Elmes <dae@users.noreply.github.com>

* Omit schduling -> Import all cards as new cards

* Tweak importing-update-notes-help

* UpdateCondition → ImportAnkiPackageUpdateCondition

* Load keyboard.ftl

* Skip updating dupes in 'update alwyas' case

* Explain more when merging notetypes is required

* "omit scheduling" → "with scheduling"

* Skip updating notetype dupes if 'update always'

* Merge duplicated notetypes from previous imports

* Fix rebase aftermath

* Fix panic when merging

* Clarify 'update notetypes' help

* Mention 'merge notetypes' in the log

* Add a test which covers the previously panicking path

* Use nested ftl messages to ensure consistency

* Make order of merged fields deterministic

* Rewrite test to trigger panic

* Update version comment on new fields
2023-09-09 09:00:55 +10:00
..
card Drop legacy schema option 2023-09-06 15:49:14 +10:00
config Switch Rust import style (#2330) 2023-01-18 21:39:55 +10:00
dbcheck Improve performance of invalid ID fix in DB check 2023-07-07 22:53:41 +10:00
deck Take another approach to dealing with conflicting flattened keys 2023-08-15 11:25:53 +10:00
deckconfig Integrate the FSRS optimizer (#2633) 2023-09-05 18:45:05 +10:00
graves Switch Rust import style (#2330) 2023-01-18 21:39:55 +10:00
note Deck scoped dupe check (#2372) 2023-02-16 17:53:36 +10:00
notetype Merging Notetypes on Import (#2612) 2023-09-09 09:00:55 +10:00
revlog Integrate the FSRS optimizer (#2633) 2023-09-05 18:45:05 +10:00
tag Expose some collection methods already public in rslib backend (#2510) 2023-05-22 13:44:18 +10:00
upgrades Split io.rs into separate crate, and use it in proto build 2023-06-12 15:47:51 +10:00
collection_timestamps.rs Switch Rust import style (#2330) 2023-01-18 21:39:55 +10:00
mod.rs Make some more fields/methods public 2023-06-20 21:59:49 +10:00
schema11.sql Add comment explaining why sfld column has type integer 2021-01-25 18:39:59 +08:00
sqlite.rs Drop legacy schema option 2023-09-06 15:49:14 +10:00
sync.rs Switch Rust import style (#2330) 2023-01-18 21:39:55 +10:00
sync_check.rs Switch Rust import style (#2330) 2023-01-18 21:39:55 +10:00