From 1c417a85df94086a5b9c56943820380b69a3e6ec Mon Sep 17 00:00:00 2001 From: stapxs <1007028430.stapx@gmail.com> Date: Tue, 22 Oct 2024 13:55:41 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=BE=97=E6=88=90=E5=B0=B1=EF=BC=9A?= =?UTF-8?q?=E5=86=B7=E9=97=A8=E6=99=AF=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit :sparkles: 对 image 形式的 mface 进行支持,移除对 mface 的支持 :poop: 移除对商城表情发送的功能支持,已经存储在设置项内的数据可能需要手动删除后重新导入 --- src/assets/css/append/append_new.css | 6 --- src/assets/l10n/en-US.po | 12 ----- src/assets/l10n/zh-CN.po | 12 ----- src/assets/l10n/zh-TW.po | 12 ----- src/assets/l10n/zh-YUE.po | 12 ----- src/components/FacePan.vue | 81 +--------------------------- src/components/MsgBody.vue | 3 +- src/function/utils/msgUtil.ts | 8 ++- src/pages/Chat.vue | 37 +------------ 9 files changed, 8 insertions(+), 175 deletions(-) diff --git a/src/assets/css/append/append_new.css b/src/assets/css/append/append_new.css index d07227f..96aefb2 100644 --- a/src/assets/css/append/append_new.css +++ b/src/assets/css/append/append_new.css @@ -184,9 +184,6 @@ .face-pan { border: 1px solid var(--color-card-2); } -.store-face-list > div { - width: calc(20% - 10px) !important; -} .face-pan div.tab-main { margin-top: 10px !important; } @@ -595,9 +592,6 @@ height: 19px; width: 19px; } -.store-face-list { - height: calc(300px - 90px) !important; -} .face-stickers { height: calc(300px - 90px); diff --git a/src/assets/l10n/en-US.po b/src/assets/l10n/en-US.po index 7abb5fa..1ffc7d0 100644 --- a/src/assets/l10n/en-US.po +++ b/src/assets/l10n/en-US.po @@ -1062,18 +1062,6 @@ msgstr "" msgid "下载更新…" msgstr "" -#: src/pages/Chat.vue:336 -msgid "收藏商城表情" -msgstr "" - -#: src/pages/Chat.vue:1027 -msgid "表情已被收藏" -msgstr "" - -#: src/pages/Chat.vue:1031 -msgid "表情收藏成功" -msgstr "" - #: src/function/utils/appUtil.ts:69 msgid "请不要在内嵌页面中输入敏感信息,内嵌页面并不安全。" msgstr "" diff --git a/src/assets/l10n/zh-CN.po b/src/assets/l10n/zh-CN.po index 8f22f45..8e8039b 100644 --- a/src/assets/l10n/zh-CN.po +++ b/src/assets/l10n/zh-CN.po @@ -1063,18 +1063,6 @@ msgstr "" msgid "下载更新…" msgstr "" -#: src/pages/Chat.vue:336 -msgid "收藏商城表情" -msgstr "" - -#: src/pages/Chat.vue:1027 -msgid "表情已被收藏" -msgstr "" - -#: src/pages/Chat.vue:1031 -msgid "表情收藏成功" -msgstr "" - #: src/function/utils/appUtil.ts:69 msgid "请不要在内嵌页面中输入敏感信息,内嵌页面并不安全。" msgstr "" diff --git a/src/assets/l10n/zh-TW.po b/src/assets/l10n/zh-TW.po index 54c464e..fa5f2fc 100644 --- a/src/assets/l10n/zh-TW.po +++ b/src/assets/l10n/zh-TW.po @@ -1063,18 +1063,6 @@ msgstr "" msgid "下载更新…" msgstr "" -#: src/pages/Chat.vue:336 -msgid "收藏商城表情" -msgstr "" - -#: src/pages/Chat.vue:1027 -msgid "表情已被收藏" -msgstr "" - -#: src/pages/Chat.vue:1031 -msgid "表情收藏成功" -msgstr "" - #: src/function/utils/appUtil.ts:69 msgid "请不要在内嵌页面中输入敏感信息,内嵌页面并不安全。" msgstr "" diff --git a/src/assets/l10n/zh-YUE.po b/src/assets/l10n/zh-YUE.po index b44a725..0f0d948 100644 --- a/src/assets/l10n/zh-YUE.po +++ b/src/assets/l10n/zh-YUE.po @@ -1063,18 +1063,6 @@ msgstr "" msgid "下载更新…" msgstr "" -#: src/pages/Chat.vue:336 -msgid "收藏商城表情" -msgstr "" - -#: src/pages/Chat.vue:1027 -msgid "表情已被收藏" -msgstr "" - -#: src/pages/Chat.vue:1031 -msgid "表情收藏成功" -msgstr "" - #: src/function/utils/appUtil.ts:69 msgid "请不要在内嵌页面中输入敏感信息,内嵌页面并不安全。" msgstr "" diff --git a/src/components/FacePan.vue b/src/components/FacePan.vue index c4868c5..18e15a9 100644 --- a/src/components/FacePan.vue +++ b/src/components/FacePan.vue @@ -28,17 +28,6 @@ -
-
-
- - -
-
-
@@ -66,7 +55,6 @@ export default defineComponent({ Option: Option, runtimeData: runtimeData, baseFaceMax: 348, - storeFace: [] as {[type: string]: string}[], stickerPage: 1 } }, @@ -78,21 +66,7 @@ export default defineComponent({ this.addSpecialMsg({ type: 'face', id: id }, true) }, addImgFace(url: string) { - this.addSpecialMsg({ type: 'image', file: url, cache: true, asface: true }, true) - }, - addMface(data: any) { - this.addSpecialMsg(data, true) - }, - - getStoreFaceList() { - this.storeFace = Option.get('store_face') ?? [] - }, - removeMface(data: any) { - const index = this.storeFace.findIndex((face) => face.emoji_id === data.emoji_id) - if (index !== -1) { - this.storeFace.splice(index, 1) - Option.save('store_face', this.storeFace) - } + this.addSpecialMsg({ type: 'image', file: url, subType: 1 }, true) }, stickersScroll(e: Event) { @@ -123,57 +97,6 @@ export default defineComponent({ Connector.send(runtimeData.jsonMap.roaming_stamp.name, {}, 'getRoamingStamp') } } - this.getStoreFaceList() - // 监听表情商店列表 - this.$watch(() => runtimeData.sysConfig.store_face.length, () => { - this.getStoreFaceList() - }) } }) - - + \ No newline at end of file diff --git a/src/components/MsgBody.vue b/src/components/MsgBody.vue index 6c69edd..539a199 100644 --- a/src/components/MsgBody.vue +++ b/src/components/MsgBody.vue @@ -32,14 +32,13 @@
{{ item }} + - - {{ item.text }} [ {{ $t('图片') }}:{{ item.text }} ]
{{ getAtName(item) }} diff --git a/src/function/utils/msgUtil.ts b/src/function/utils/msgUtil.ts index 1906102..2f9623b 100644 --- a/src/function/utils/msgUtil.ts +++ b/src/function/utils/msgUtil.ts @@ -220,9 +220,8 @@ export function getMsgRawTxt(data: any): string { // eslint-disable-next-line case 'text': back += message[i].text.replaceAll('\n', ' ').replaceAll('\r', ' '); break case 'face': back += '[' + $t('表情') + ']'; break - case 'mface': back += message[i].summary ?? message[i].text; break case 'bface': back += message[i].text; break - case 'image': back += '[' + $t('图片') + ']'; break + case 'image': back += message[i].summary ?? '[' + $t('图片') + ']'; break case 'record': back += '[' + $t('语音') + ']'; break case 'video': back += '[' + $t('视频') + ']'; break case 'file': back += '[' + $t('文件') + ']'; break @@ -430,7 +429,6 @@ export function updateLastestHistory(item: UserFriendElem & UserGroupElem) { } export function sendMsgAppendInfo(msg: any) { - msg.message.forEach(() => { - // TODO - }) + msg + // TODO } \ No newline at end of file diff --git a/src/pages/Chat.vue b/src/pages/Chat.vue index faff208..97909a2 100644 --- a/src/pages/Chat.vue +++ b/src/pages/Chat.vue @@ -357,10 +357,6 @@
{{ $t('下载图片') }}
-
-
- {{ $t('收藏商城表情') }} -
{{ $t('撤回') }} @@ -454,7 +450,6 @@ import { Logger, LogType, PopInfo, PopType } from '@/function/base' import { Connector, login as loginInfo } from '@/function/connect' import { runtimeData} from '@/function/msg' import { BaseChatInfoElem, MsgItemElem, SQCodeElem, GroupMemberInfoElem, UserFriendElem, UserGroupElem } from '@/function/elements/information' -import option from '@/function/option' export default defineComponent({ name: 'ViewChat', @@ -493,7 +488,6 @@ export default defineComponent({ copy: true, copySelect: false, downloadImg: false as string | false, - addStoreFace: false, revoke: false, at: true, remove: false, @@ -854,9 +848,7 @@ export default defineComponent({ this.tags.menuDisplay.add = false } }) - if(data.message[0].type == 'mface') { - this.tags.menuDisplay.addStoreFace = true - } else if(select.nodeName == 'IMG') { + if(select.nodeName == 'IMG') { // 右击图片需要显示的内容,这边特例设置为链接 this.tags.menuDisplay.downloadImg = (select as HTMLImageElement).src } @@ -913,7 +905,6 @@ export default defineComponent({ copy: true, copySelect: false, downloadImg: false, - addStoreFace: false, revoke: false, at: false, remove: false, @@ -1107,30 +1098,6 @@ export default defineComponent({ }) }, - /** - * 添加商城表情 - */ - addStoreFace() { - const popInfo = new PopInfo() - const msg = this.selectedMsg - if (msg !== null) { - const mface = msg.message[0] - const storeFaceList = option.get('store_face') ?? [] - const face = storeFaceList.find((item: any) => { - return item.emoji_package_id == mface.emoji_package_id && - item.emoji_id == mface.emoji_id - }) - if(face) { - popInfo.add(PopType.INFO, this.$t('表情已被收藏')) - } else { - storeFaceList.push(mface) - option.save('store_face', storeFaceList) - popInfo.add(PopType.INFO, this.$t('表情收藏成功')) - } - } - this.closeMsgMenu() - }, - /** * 发送消息回应 * @param num @@ -1625,7 +1592,7 @@ export default defineComponent({ this.list.forEach((item: any) => { if (item.message !== undefined) { item.message.forEach((msg: MsgItemElem) => { - if (msg.type === 'image' && !msg.asface) { + if (msg.type === 'image' && msg.file != 'marketface') { const info = { index: item.message_id, message_id: item.message_id,