diff options
| author | Terry Truong <terry06890@gmail.com> | 2023-01-20 21:56:53 +1100 |
|---|---|---|
| committer | Terry Truong <terry06890@gmail.com> | 2023-01-20 21:56:53 +1100 |
| commit | 8321e2f92dbc073b8f1de87895d6620a2021b22e (patch) | |
| tree | 50e7f2d50aaec68ca90aa46539d05cab5249ffe1 /src/components | |
| parent | e6b9c10f0f1eefee556833d98a1f322856dcbb7e (diff) | |
Relayout events upon category changes
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/InfoModal.vue | 2 | ||||
| -rw-r--r-- | src/components/SettingsModal.vue | 10 |
2 files changed, 10 insertions, 2 deletions
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); + } } } |
