forked from AkkomaGang/admin-fe
Add loading when fetching remote packs
This commit is contained in:
parent
759dab4729
commit
ca9e84ad4b
1 changed files with 7 additions and 3 deletions
|
@ -37,6 +37,7 @@
|
||||||
v-model="remoteInstanceAddress"
|
v-model="remoteInstanceAddress"
|
||||||
:placeholder="$t('emoji.remoteInstanceAddress')" />
|
:placeholder="$t('emoji.remoteInstanceAddress')" />
|
||||||
<el-button
|
<el-button
|
||||||
|
v-loading.fullscreen.lock="fullscreenLoading"
|
||||||
:disabled="remoteInstanceAddress.trim() === ''"
|
:disabled="remoteInstanceAddress.trim() === ''"
|
||||||
class="create-pack-button"
|
class="create-pack-button"
|
||||||
@click="refreshRemotePacks">
|
@click="refreshRemotePacks">
|
||||||
|
@ -65,7 +66,8 @@ export default {
|
||||||
remoteInstanceAddress: '',
|
remoteInstanceAddress: '',
|
||||||
newPackName: '',
|
newPackName: '',
|
||||||
activeLocalPack: [],
|
activeLocalPack: [],
|
||||||
activeRemotePack: []
|
activeRemotePack: [],
|
||||||
|
fullscreenLoading: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -122,8 +124,10 @@ export default {
|
||||||
message: i18n.t('emoji.refreshed')
|
message: i18n.t('emoji.refreshed')
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
refreshRemotePacks() {
|
async refreshRemotePacks() {
|
||||||
this.$store.dispatch('SetRemoteEmojiPacks', { remoteInstance: this.remoteInstanceAddress })
|
this.fullscreenLoading = true
|
||||||
|
await this.$store.dispatch('SetRemoteEmojiPacks', { remoteInstance: this.remoteInstanceAddress })
|
||||||
|
this.fullscreenLoading = false
|
||||||
},
|
},
|
||||||
async reloadEmoji() {
|
async reloadEmoji() {
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in a new issue