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
This commit is contained in:
toasted-nutbread 2021-01-16 16:55:40 -05:00 committed by GitHub
parent bd89c92c37
commit d89f23261c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 10 deletions

View File

@ -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,

View File

@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>Yomichan Options</title>
<title>Yomichan Options (Old)</title>
<link rel="icon" type="image/png" href="/mixed/img/icon16.png" sizes="16x16">
<link rel="icon" type="image/png" href="/mixed/img/icon19.png" sizes="19x19">
<link rel="icon" type="image/png" href="/mixed/img/icon32.png" sizes="32x32">
@ -21,10 +21,11 @@
<h1>Yomichan Options</h1>
</div>
<div class="alert alert-info">
<a style="text-decoration: underline;" href="/bg/settings2.html">
An updated version of the settings page is available for testing and feedback.
</a>
<div class="alert alert-warning">
This is the old version of the settings page, which is currently deprecated and does not include all options.
Please use <a href="/bg/settings2.html">the new settings page</a>,
and if you have any feedback, feel free to share
<a href="https://github.com/FooSoft/yomichan/issues/1000" target="_blank" rel="noopener noreferrer">on Github</a>.
</div>
<div class="profile-form ignore-form-changes">

View File

@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Yomichan Settings v2</title>
<title>Yomichan Settings</title>
<link rel="icon" type="image/png" href="/mixed/img/icon16.png" sizes="16x16">
<link rel="icon" type="image/png" href="/mixed/img/icon19.png" sizes="19x19">
<link rel="icon" type="image/png" href="/mixed/img/icon32.png" sizes="32x32">
@ -65,15 +65,16 @@
<div class="settings-item-left">
<div class="settings-item-label">
<strong>Notice:</strong>
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
<a href="/bg/settings.html">the old settings page</a>.<br>
Questions, comments, and other feedback is welcome and can be shared
<a href="https://github.com/FooSoft/yomichan/issues/1000" target="_blank" rel="noopener noreferrer">on Github</a>.
</div>
</div>
</div></div>
<div class="settings-item"><div class="settings-item-inner">
<div class="settings-item-left">
<div class="settings-item-label">Use the v2 settings page by default</div>
<div class="settings-item-label">Use this new settings page by default</div>
</div>
<div class="settings-item-right">
<label class="toggle"><input type="checkbox" data-setting="global.useSettingsV2" data-scope="global"><span class="toggle-body"><span class="toggle-track"></span><span class="toggle-knob"></span></span></label>

View File

@ -559,7 +559,7 @@ function createOptionsUpdatedTestData1() {
database: {
prefixWildcardsSupported: false
},
useSettingsV2: false
useSettingsV2: true
}
};
}