From d89f23261cd619a406d4d50006871b10f1e653c6 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sat, 16 Jan 2021 16:55:40 -0500 Subject: [PATCH] Update default settings page (#1254) * Update settings v2 to be the default for existing users * Update information on the old settings page * Update information on the new settings page * Update tests --- ext/bg/js/options.js | 2 ++ ext/bg/settings.html | 11 ++++++----- ext/bg/settings2.html | 9 +++++---- test/test-options-util.js | 2 +- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/ext/bg/js/options.js b/ext/bg/js/options.js index 5299ecd2..deb20b00 100644 --- a/ext/bg/js/options.js +++ b/ext/bg/js/options.js @@ -667,7 +667,9 @@ class OptionsUtil { // Added anki.suspendNewCards. // Added popupWindow. // Updated handlebars templates to include "stroke-count" definition. + // Updated global.useSettingsV2 to be true (opt-out). await this._addFieldTemplatesToOptions(options, '/bg/data/anki-field-templates-upgrade-v8.handlebars'); + options.global.useSettingsV2 = true; for (const profile of options.profiles) { profile.options.translation.textReplacements = { searchOriginal: true, diff --git a/ext/bg/settings.html b/ext/bg/settings.html index d206d697..e413c5ff 100644 --- a/ext/bg/settings.html +++ b/ext/bg/settings.html @@ -3,7 +3,7 @@ - Yomichan Options + Yomichan Options (Old) @@ -21,10 +21,11 @@

Yomichan Options

-
- - An updated version of the settings page is available for testing and feedback. - +
+ This is the old version of the settings page, which is currently deprecated and does not include all options. + Please use the new settings page, + and if you have any feedback, feel free to share + on Github.
diff --git a/ext/bg/settings2.html b/ext/bg/settings2.html index 1927686f..738120bb 100644 --- a/ext/bg/settings2.html +++ b/ext/bg/settings2.html @@ -3,7 +3,7 @@ - Yomichan Settings v2 + Yomichan Settings @@ -65,15 +65,16 @@
Notice: - This new settings page is currently in beta. Questions, comments, and other feedback - is welcome and can be shared + This settings page is planned to replace + the old settings page.
+ Questions, comments, and other feedback is welcome and can be shared on Github.
-
Use the v2 settings page by default
+
Use this new settings page by default
diff --git a/test/test-options-util.js b/test/test-options-util.js index 307638e2..c857b13f 100644 --- a/test/test-options-util.js +++ b/test/test-options-util.js @@ -559,7 +559,7 @@ function createOptionsUpdatedTestData1() { database: { prefixWildcardsSupported: false }, - useSettingsV2: false + useSettingsV2: true } }; }