aboutsummaryrefslogtreecommitdiff
path: root/src/components/SettingsModal.vue
diff options
context:
space:
mode:
authorTerry Truong <terry06890@gmail.com>2022-07-01 19:28:12 +1000
committerTerry Truong <terry06890@gmail.com>2022-07-01 19:28:12 +1000
commit551fbe163b90cc1f318612c167fbdfe738dd7132 (patch)
tree00286538d754fdf686751a3d4c1689d799ecd65e /src/components/SettingsModal.vue
parentc2b9a8b7a706cdca58dab7f4a980401e1c20a602 (diff)
Generate 3 reduced trees, keeping the original, and serve only those
Generate a 'trimmed' reduced tree instead of changing the original. Generate an 'images-only' reduced tree, and use it as the default. Combine 'picked' reduced tree code with that of other reduced trees. Adapt server API to allow selecting between more than 2 trees. Add client setting for selecting between 3 trees.
Diffstat (limited to 'src/components/SettingsModal.vue')
-rw-r--r--src/components/SettingsModal.vue15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/components/SettingsModal.vue b/src/components/SettingsModal.vue
index 16351c4..315ddb4 100644
--- a/src/components/SettingsModal.vue
+++ b/src/components/SettingsModal.vue
@@ -78,8 +78,15 @@
<div class="border rounded p-1">
<h2 class="text-center">Other</h2>
<div>
- <label> <input type="checkbox" v-model="uiOpts.useReducedTree"
- @change="onSettingChg('UI', 'useReducedTree')"/> Use simplified tree </label>
+ <div>Tree to use</div>
+ <ul>
+ <li> <label> <input type="radio" v-model="uiOpts.tree" value="trimmed"
+ @change="onSettingChg('UI', 'tree')"/> Comprehensive </label> </li>
+ <li> <label> <input type="radio" v-model="uiOpts.tree" value="images"
+ @change="onSettingChg('UI', 'tree')"/> Visual </label> </li>
+ <li> <label> <input type="radio" v-model="uiOpts.tree" value="picked"
+ @change="onSettingChg('UI', 'tree')"/> Minimal </label> </li>
+ </ul>
</div>
<div>
<label> <input type="checkbox" v-model="uiOpts.searchJumpMode"
@@ -161,7 +168,7 @@ export default defineComponent({
}
// Notify App
this.$emit('setting-chg', optionType, option,
- {relayout: optionType == 'LYT', reinit: optionType == 'UI' && option == 'useReducedTree'});
+ {relayout: optionType == 'LYT', reinit: optionType == 'UI' && option == 'tree'});
// Possibly make saved-indicator appear/animate
if (!this.saved){
this.saved = true;
@@ -205,7 +212,7 @@ export default defineComponent({
// Restore default options
let defaultLytOpts = getDefaultLytOpts();
let defaultUiOpts = getDefaultUiOpts(defaultLytOpts);
- let needReinit = this.uiOpts.useReducedTree != defaultUiOpts.useReducedTree;
+ let needReinit = this.uiOpts.tree != defaultUiOpts.tree;
Object.assign(this.lytOpts, defaultLytOpts);
Object.assign(this.uiOpts, defaultUiOpts);
// Notify App