aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/App.vue11
-rw-r--r--src/components/SearchModal.vue9
-rw-r--r--src/components/SettingsModal.vue5
3 files changed, 13 insertions, 12 deletions
diff --git a/src/App.vue b/src/App.vue
index b6dee86..5ac975d 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -176,6 +176,7 @@ export default defineComponent({
minHeight: 'auto',
maxHeight: 'none',
transitionDuration: this.uiOpts.tileChgDuration + 'ms',
+ transitionProperty: '',
overflow: 'hidden'
};
if (this.mainAreaDims[0] > this.mainAreaDims[1]){
@@ -461,7 +462,7 @@ export default defineComponent({
targetNode = this.layoutMap.get(name);
this.onLeafClickHeld(targetNode!.parent!);
//
- this.setLastFocused(targetNode!);
+ setTimeout(() => {this.setLastFocused(targetNode!);}, this.uiOpts.tileChgDuration);
this.modeRunning = false;
return;
}
@@ -622,9 +623,7 @@ export default defineComponent({
// Re-initialise tree
this.initTreeFromServer();
},
- onSettingsClose(changedLytOpts: Set<string>, changedUiOpts: Set<string>){
- this.settingsOpen = false;
- // Save changed settings
+ onSettingsChg(changedLytOpts: Iterable<string>, changedUiOpts: Iterable<string>){
for (let opt of changedLytOpts){
localStorage.setItem('lyt ' + opt, String(this.lytOpts[opt as keyof LayoutOptions]));
}
@@ -936,7 +935,7 @@ export default defineComponent({
<!-- Modals -->
<transition name="fade">
<search-modal v-if="searchOpen" :tolMap="tolMap" :uiOpts="uiOpts" ref="searchModal"
- @close="searchOpen = false" @search="onSearch" @info-click="onInfoClick"/>
+ @close="searchOpen = false" @search="onSearch" @info-click="onInfoClick" @settings-chg="onSettingsChg" />
</transition>
<transition name="fade">
<tile-info-modal v-if="infoModalNodeName != null"
@@ -948,7 +947,7 @@ export default defineComponent({
@close="helpOpen = false" @start-tutorial="onStartTutorial"/>
</transition>
<settings-modal v-if="settingsOpen" :lytOpts="lytOpts" :uiOpts="uiOpts" class="z-10"
- @close="onSettingsClose" @reset="onResetSettings"
+ @close="settingsOpen = false" @settings-chg="onSettingsChg" @reset="onResetSettings"
@layout-setting-chg="relayoutWithCollapse" @tree-chg="onTreeChange"/>
<!-- Overlay used to prevent interaction and capture clicks -->
<div :style="{visibility: modeRunning ? 'visible' : 'hidden'}"
diff --git a/src/components/SearchModal.vue b/src/components/SearchModal.vue
index 585b535..dc9da4c 100644
--- a/src/components/SearchModal.vue
+++ b/src/components/SearchModal.vue
@@ -34,13 +34,13 @@ export default defineComponent({
};
},
suggDisplayStrings(): [string, string, string][] {
- let result = [];
- let input = this.$refs.searchInput.value;
+ let result: [string, string, string][] = [];
+ let input = (this.$refs.searchInput as HTMLInputElement).value;
// For each SearchSugg
for (let sugg of this.searchSuggs){
let idx = sugg.name.indexOf(input);
// Split suggestion text into parts before/within/after an input match
- let strings;
+ let strings: [string, string, string];
if (idx != -1){
strings = [sugg.name.substring(0, idx), input, sugg.name.substring(idx + input.length)];
} else {
@@ -72,6 +72,7 @@ export default defineComponent({
},
onSearchModeChg(){
this.uiOpts.jumpToSearchedNode = !this.uiOpts.jumpToSearchedNode;
+ this.$emit('settings-chg', [], ['jumpToSearchedNode']);
},
resolveSearch(tolNodeName: string){
if (tolNodeName == ''){
@@ -190,7 +191,7 @@ export default defineComponent({
(this.$refs.searchInput as HTMLInputElement).focus();
},
components: {SearchIcon, InfoIcon, LogInIcon, },
- emits: ['search', 'close', 'info-click'],
+ emits: ['search', 'close', 'info-click', 'settings-chg', ],
});
</script>
diff --git a/src/components/SettingsModal.vue b/src/components/SettingsModal.vue
index b4fa251..1426a36 100644
--- a/src/components/SettingsModal.vue
+++ b/src/components/SettingsModal.vue
@@ -19,7 +19,8 @@ export default defineComponent({
methods: {
onCloseClick(evt: Event){
if (evt.target == this.$el || (this.$refs.closeIcon as typeof CloseIcon).$el.contains(evt.target)){
- this.$emit('close', this.changedLytOpts, this.changedUiOpts);
+ this.$emit('settings-chg', this.changedLytOpts, this.changedUiOpts);
+ this.$emit('close');
}
},
onLytOptChg(opt: string){
@@ -52,7 +53,7 @@ export default defineComponent({
},
},
components: {CloseIcon, RButton, },
- emits: ['close', 'layout-setting-chg', 'tree-chg', 'reset', ],
+ emits: ['close', 'layout-setting-chg', 'tree-chg', 'reset', 'settings-chg', ],
});
</script>