fix after save behaviour

This commit is contained in:
einhorn_b 2024-01-16 12:17:50 +01:00
parent 939ea795e8
commit cc617eb827

View File

@ -27,7 +27,7 @@
<b-list-group-item v-if="!item.foreign"> <b-list-group-item v-if="!item.foreign">
{{ $t('federation.gmsApiKey') }}&nbsp; {{ $t('federation.gmsApiKey') }}&nbsp;
<editable-label <editable-label
:value="item.gmsApiKey" :value="gmsApiKey"
:allowEdit="$store.state.moderator.roles.includes('ADMIN')" :allowEdit="$store.state.moderator.roles.includes('ADMIN')"
@save="handleSaveGsmApiKey" @save="handleSaveGsmApiKey"
/> />
@ -79,8 +79,12 @@ export default {
formatDistanceToNow, formatDistanceToNow,
locale: this.$i18n.locale, locale: this.$i18n.locale,
details: false, details: false,
gmsApiKey: '',
} }
}, },
created() {
this.gmsApiKey = this.item.gmsApiKey
},
computed: { computed: {
verified() { verified() {
return ( return (
@ -131,6 +135,7 @@ export default {
this.details = !this.details this.details = !this.details
}, },
handleSaveGsmApiKey(gmsApiKey) { handleSaveGsmApiKey(gmsApiKey) {
this.gmsApiKey = gmsApiKey
this.$apollo this.$apollo
.mutate({ .mutate({
mutation: updateHomeCommunity, mutation: updateHomeCommunity,