diff options
| -rw-r--r-- | src/App.vue | 2 | ||||
| -rw-r--r-- | src/components/InfoModal.vue | 2 | ||||
| -rw-r--r-- | src/components/SettingsModal.vue | 10 |
3 files changed, 11 insertions, 3 deletions
diff --git a/src/App.vue b/src/App.vue index 4149a66..534f528 100644 --- a/src/App.vue +++ b/src/App.vue @@ -344,7 +344,7 @@ function onSearch(event: HistEvent){ // For settings modal const settingsOpen = ref(false); function onSettingChg(option: string){ - if (option == 'reqImgs'){ + if (option == 'reqImgs' || option.startsWith('ctgs.')){ // Reset event data eventTree.value = new RBTree(cmpHistEvent); // Will trigger event re-query unitCountMaps.value = SCALES.map(() => new Map()); diff --git a/src/components/InfoModal.vue b/src/components/InfoModal.vue index 7502d80..b9aeb74 100644 --- a/src/components/InfoModal.vue +++ b/src/components/InfoModal.vue @@ -47,7 +47,7 @@ <li> <span :style="{color: store.color.altDark}">License: </span> <template v-if="licenseToUrl(eventInfo.imgInfo.license) != null"> - <a :href="licenseToUrl(eventInfo.imgInfo.license)" target="_blank"> + <a :href="licenseToUrl(eventInfo.imgInfo.license)!" target="_blank"> {{eventInfo.imgInfo.license}} </a> <external-link-icon class="inline-block w-3 h-3 ml-1"/> diff --git a/src/components/SettingsModal.vue b/src/components/SettingsModal.vue index 3e56373..04b5e76 100644 --- a/src/components/SettingsModal.vue +++ b/src/components/SettingsModal.vue @@ -110,9 +110,14 @@ const lastCtg = computed(() => { // When all but one category is disabled, names return null; } }); +let changedCtg: string | null = null; // Used to defer signalling of a category change until modal closes function onSettingChg(option: string){ store.save(option); - emit('change', option); + if (option.startsWith('ctgs.')){ + changedCtg = option; + } else { + emit('change', option); + } // Make 'Saved' indicator appear/animate if (!saved.value){ saved.value = true; @@ -137,6 +142,9 @@ function onReset(){ function onClose(evt: Event){ if (evt.target == rootRef.value || closeRef.value!.$el.contains(evt.target)){ emit('close'); + if (changedCtg != null){ + emit('change', changedCtg); + } } } |
