diff --git a/src/components/still-image/still-image-emoji-popover.vue b/src/components/still-image/still-image-emoji-popover.vue index 8588d5165..5224168c2 100644 --- a/src/components/still-image/still-image-emoji-popover.vue +++ b/src/components/still-image/still-image-emoji-popover.vue @@ -98,18 +98,13 @@ this.$store.state.api.backendInteractor.addNewEmojiFile({ packName: this.packName, file: this.$attrs.src, - shortcode: this.shortcode, + shortcode: this.$attrs.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 = '' @@ -148,14 +143,21 @@ this.loadPacksPaginated(this.$store.state.api.backendInteractor.listEmojiPacks) .then(allPacks => { - // 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 + this.knownLocalPacks = allPacks + + for (const name of Object.keys(this.knownLocalPacks)) { + this.sortPackFiles(name) + } }) + }, + 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 b2601ea51..4a3df9472 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -1223,8 +1223,7 @@ "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", - "copied_successfully": "Successfully copied emoji \"{0}\" to pack \"{1}\"" + "replace_warning": "This will REPLACE the local pack of the same name" }, "temp_overrides": { ":pleroma": {