diff --git a/src/components/still-image/still-image-emoji-popover.vue b/src/components/still-image/still-image-emoji-popover.vue index 5224168c2..8588d5165 100644 --- a/src/components/still-image/still-image-emoji-popover.vue +++ b/src/components/still-image/still-image-emoji-popover.vue @@ -98,13 +98,18 @@ this.$store.state.api.backendInteractor.addNewEmojiFile({ packName: this.packName, file: this.$attrs.src, - shortcode: this.$attrs.shortcode, + shortcode: this.shortcode, filename: "" }).then(resp => resp.json()).then(resp => { if (resp.error !== undefined) { this.displayError(resp.error) return } + useInterfaceStore().pushGlobalNotice({ + messageKey: 'admin_dash.emoji.copied_successfully', + messageArgs: [this.shortcode, this.packName], + level: 'success' + }) this.$refs.emojiPopover.hidePopover() this.packName = '' @@ -143,21 +148,14 @@ this.loadPacksPaginated(this.$store.state.api.backendInteractor.listEmojiPacks) .then(allPacks => { - this.knownLocalPacks = allPacks - - for (const name of Object.keys(this.knownLocalPacks)) { - this.sortPackFiles(name) - } + // Sort by key + const sorted = Object.keys(allPacks).sort().reduce((acc, key) => { + if (key.length === 0) return acc + acc[key] = allPacks[key] + return acc + }, {}) + this.knownLocalPacks = sorted }) - }, - sortPackFiles (nameOfPack) { - // Sort by key - const sorted = Object.keys(this.knownLocalPacks[nameOfPack].files).sort().reduce((acc, key) => { - if (key.length === 0) return acc - acc[key] = this.knownLocalPacks[nameOfPack].files[key] - return acc - }, {}) - this.knownLocalPacks[nameOfPack].files = sorted } } } diff --git a/src/i18n/en.json b/src/i18n/en.json index 4a3df9472..b2601ea51 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -1223,7 +1223,8 @@ "delete_title": "Delete?", "metadata_changed": "Metadata different from saved", "emoji_changed": "Unsaved emoji file changes, check highlighted emoji", - "replace_warning": "This will REPLACE the local pack of the same name" + "replace_warning": "This will REPLACE the local pack of the same name", + "copied_successfully": "Successfully copied emoji \"{0}\" to pack \"{1}\"" }, "temp_overrides": { ":pleroma": {