Address the save and delete button bugs

This commit is contained in:
Ekaterina Vaartis 2024-01-28 00:03:22 +03:00
parent d5a5b8e254
commit 70258a2176

View File

@ -51,7 +51,7 @@
<button <button
class="button button-default btn" class="button button-default btn"
type="button" type="button"
:disabled="uploadFile.length == 0" :disabled="newUpload ? uploadFile.length == 0 : !isEdited"
@click="newUpload ? uploadEmoji() : saveEditedEmoji()"> @click="newUpload ? uploadEmoji() : saveEditedEmoji()">
{{ $t('admin_dash.emoji.save') }} {{ $t('admin_dash.emoji.save') }}
</button> </button>
@ -157,7 +157,7 @@ export default {
this.deleteModalVisible = false this.deleteModalVisible = false
this.$store.state.api.backendInteractor.deleteEmojiFile( this.$store.state.api.backendInteractor.deleteEmojiFile(
{ packName: this.packName, shortcode: this.editedShortcode } { packName: this.packName, shortcode: this.shortcode }
).then(resp => resp.json()).then(resp => { ).then(resp => resp.json()).then(resp => {
if (resp.error !== undefined) { if (resp.error !== undefined) {
this.$emit('displayError', resp.error) this.$emit('displayError', resp.error)