From 794238bbdd812b7b76a5f12ba65cdcf57f54cd5b Mon Sep 17 00:00:00 2001 From: Antoine Nguyen Date: Fri, 21 Apr 2023 11:08:47 +0200 Subject: [PATCH] Few UI improvements. fix #2928 --- .../src/components/domains/DomainForm.vue | 31 +++++++++++-------- .../src/components/domains/DomainList.vue | 4 ++- .../identities/AccountCreationForm.vue | 5 ++- .../src/components/identities/AccountForm.vue | 12 ++++--- .../src/components/identities/AliasForm.vue | 10 ++++-- .../identities/AliasGeneralForm.vue | 13 ++++++-- .../components/identities/IdentityList.vue | 3 ++ frontend/src/components/layout/Navbar.vue | 5 +-- .../src/components/tools/CreationForm.vue | 11 +++++-- frontend/src/store/modules/domains.js | 1 + 10 files changed, 67 insertions(+), 28 deletions(-) diff --git a/frontend/src/components/domains/DomainForm.vue b/frontend/src/components/domains/DomainForm.vue index 3a42e3e98..35f4156ac 100644 --- a/frontend/src/components/domains/DomainForm.vue +++ b/frontend/src/components/domains/DomainForm.vue @@ -149,10 +149,10 @@
- + Cancel - + Save
@@ -187,7 +187,8 @@ export default { return { editedDomain: {}, limitsConfig: {}, - panel: 0 + panel: 0, + working: false } }, methods: { @@ -204,16 +205,21 @@ export default { return } } - const data = { ...this.editedDomain } - if (data.transport === null) { - delete data.transport + this.working = true + try { + const data = { ...this.editedDomain } + if (data.transport === null) { + delete data.transport + } + if (data.type === 'relaydomain') { + this.$refs.transportForm.checkSettingTypes(data) + } + this.$store.dispatch('domains/updateDomain', data).then(() => { + bus.$emit('notification', { msg: this.$gettext('Domain updated') }) + }) + } finally { + this.working = false } - if (data.type === 'relaydomain') { - this.$refs.transportForm.checkSettingTypes(data) - } - this.$store.dispatch('domains/updateDomain', data).then(resp => { - bus.$emit('notification', { msg: this.$gettext('Domain updated') }) - }) } }, created () { @@ -226,7 +232,6 @@ export default { handler: function (val) { if (val) { this.editedDomain = JSON.parse(JSON.stringify(val)) - console.log(this.editedDomain) } }, immediate: true diff --git a/frontend/src/components/domains/DomainList.vue b/frontend/src/components/domains/DomainList.vue index 681346f0d..a72c98721 100644 --- a/frontend/src/components/domains/DomainList.vue +++ b/frontend/src/components/domains/DomainList.vue @@ -32,6 +32,7 @@ :expanded.sync="expanded" @item-expanded="loadAliases" @click:row="showAliases" + :loading="!domainsLoaded" >