commit: b6a4b62058ca8e6a1a0f91aa23cf3cd78cd33009
parent c99390e864ef4367e32813432ff236b2129bbf80
Author: Henry Jameson <me@hjkos.com>
Date: Wed, 1 Nov 2023 21:53:50 +0200
add better indication that stuff is happening
Diffstat:
3 files changed, 29 insertions(+), 1 deletion(-)
diff --git a/src/components/settings_modal/admin_tabs/frontends_tab.js b/src/components/settings_modal/admin_tabs/frontends_tab.js
@@ -4,6 +4,7 @@ import IntegerSetting from '../helpers/integer_setting.vue'
import StringSetting from '../helpers/string_setting.vue'
import GroupSetting from '../helpers/group_setting.vue'
import Popover from 'src/components/popover/popover.vue'
+import PanelLoading from 'src/components/panel_loading/panel_loading.vue'
import SharedComputedObject from '../helpers/shared_computed_object.js'
import { library } from '@fortawesome/fontawesome-svg-core'
@@ -22,12 +23,18 @@ const FrontendsTab = {
defaultSource: 'admin'
}
},
+ data () {
+ return {
+ working: false
+ }
+ },
components: {
BooleanSetting,
ChoiceSetting,
IntegerSetting,
StringSetting,
GroupSetting,
+ PanelLoading,
Popover
},
created () {
@@ -60,7 +67,11 @@ const FrontendsTab = {
const { name } = frontend
const payload = { name, ref }
+ this.working = true
this.$store.state.api.backendInteractor.installFrontend({ payload })
+ .finally(() => {
+ this.working = false
+ })
.then(async (response) => {
this.$store.dispatch('loadFrontendsStuff')
if (response.error) {
diff --git a/src/components/settings_modal/admin_tabs/frontends_tab.scss b/src/components/settings_modal/admin_tabs/frontends_tab.scss
@@ -3,6 +3,22 @@
padding: 0;
}
+ .relative {
+ position: relative;
+ }
+
+ .overlay {
+ position: absolute;
+ background: var(--bg);
+ // fix buttons showing through
+ z-index: 2;
+ opacity: 0.9;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ }
+
dd {
text-overflow: ellipsis;
word-wrap: nowrap;
diff --git a/src/components/settings_modal/admin_tabs/frontends_tab.vue b/src/components/settings_modal/admin_tabs/frontends_tab.vue
@@ -24,7 +24,8 @@
</ul>
</li>
</ul>
- <div class="setting-list">
+ <div class="setting-list relative">
+ <PanelLoading class="overlay" v-if="working"/>
<h3>{{ $t('admin_dash.frontend.available_frontends') }}</h3>
<ul class="cards-list">
<li