no message

This commit is contained in:
kuaifan 2022-11-18 00:44:45 +08:00
parent df3b3bed98
commit c2d852eb3a
9 changed files with 37 additions and 37 deletions

View File

@ -32,7 +32,7 @@
"@electron-forge/maker-squirrel": "^6.0.1",
"@electron-forge/maker-zip": "^6.0.1",
"dotenv": "^16.0.3",
"electron": "^22.0.0-beta.5",
"electron": "^21.3.0",
"electron-builder": "^23.6.0",
"electron-notarize": "^1.2.2",
"form-data": "^4.0.0",

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
1232463f96c3b53b
88ea1da372d84b4e

View File

@ -1237,6 +1237,10 @@
"/uploads/chat/202211/33/f682a136679c12bb641bb6967a9ff475.mov": "/uploads/chat/202211/33/f682a136679c12bb641bb6967a9ff475.mov",
"/uploads/chat/202211/45/088a642eb13ee5cf.jpg": "/uploads/chat/202211/45/088a642eb13ee5cf.jpg",
"/uploads/chat/202211/45/088a642eb13ee5cf.jpg_thumb.jpg": "/uploads/chat/202211/45/088a642eb13ee5cf.jpg_thumb.jpg",
"/uploads/chat/202211/45/d2a5dd9e848e1fce.jpg": "/uploads/chat/202211/45/d2a5dd9e848e1fce.jpg",
"/uploads/chat/202211/45/d2a5dd9e848e1fce.jpg_thumb.jpg": "/uploads/chat/202211/45/d2a5dd9e848e1fce.jpg_thumb.jpg",
"/uploads/chat/202211/45/e093daa871e780d9.jpg": "/uploads/chat/202211/45/e093daa871e780d9.jpg",
"/uploads/chat/202211/45/e093daa871e780d9.jpg_thumb.jpg": "/uploads/chat/202211/45/e093daa871e780d9.jpg_thumb.jpg",
"/uploads/chat/202211/45/f242ea07dda50e76.jpg": "/uploads/chat/202211/45/f242ea07dda50e76.jpg",
"/uploads/chat/202211/45/f242ea07dda50e76.jpg_thumb.jpg": "/uploads/chat/202211/45/f242ea07dda50e76.jpg_thumb.jpg",
"/uploads/desktop/0.12.0/builder-debug.yml": "/uploads/desktop/0.12.0/builder-debug.yml",

View File

@ -60,14 +60,16 @@ export default {
if ($A.isArray(window.emoticonData)) {
let baseUrl = $A.apiUrl("../images/emoticon")
return window.emoticonData.map(data => {
data.src = `${baseUrl}/${data.path}/${data.icon}`
data.list = data.list.map(item => {
item.type = `emoticon`
item.asset = `images/emoticon/${data.path}/${item.path}`
item.src = `${baseUrl}/${data.path}/${item.path}`
return item
})
return data;
return Object.assign(data, {
src: `${baseUrl}/${data.path}/${data.icon}`,
list: data.list.map(item => {
return Object.assign(item, {
type: `emoticon`,
asset: `images/emoticon/${data.path}/${item.path}`,
src: `${baseUrl}/${data.path}/${item.path}`
})
})
});
});
}
return [];

View File

@ -11,8 +11,8 @@
popperClass="chat-quick-emoji-popover">
<div slot="reference"></div>
<ul class="chat-quick-emoji-wrapper">
<li v-for="emoji in emojiQuickItems" @click="onEmojiQuick(emoji)">
<img :title="emoji.item.name" :alt="emoji.item.name" :src="emoji.item.src"/>
<li v-for="item in emojiQuickItems" @click="onEmojiQuick(item)">
<img :title="item.name" :alt="item.name" :src="item.src"/>
</li>
</ul>
</EPopover>
@ -708,16 +708,21 @@ export default {
if (text
&& text.indexOf(" ") === -1
&& text.length >= 1
&& text.length <= 8
&& text.length <= 4
&& $A.isArray(window.emoticonData)) {
// 线
this.searchEmoji(text);
//
this.emojiQuickItems = [];
let baseUrl = $A.apiUrl("../images/emoticon")
window.emoticonData.some(data => {
let item = data.list.find(({name}) => $A.strExists(name, text))
if (item) {
this.emojiQuickItems.push({data, item})
this.emojiQuickItems.push(Object.assign(item, {
type: `emoticon`,
asset: `images/emoticon/${data.path}/${item.path}`,
src: `${baseUrl}/${data.path}/${item.path}`
}))
if (this.emojiQuickItems.length >= 2) {
return true
}
@ -746,24 +751,19 @@ export default {
url: '../emo/search',
data: {
key: text,
}
},
checkNetwork: false,
}).then(({data}) => {
if (this.emojiSearchKey !== text) {
return;
}
let maxNum = 3;
if (this.windowWidth > 1000) maxNum = 5;
else if (this.windowWidth > 900) maxNum = 4;
const array = this.getRandomArrayElements(data.map(item => {
return {
data: {},
item: {
type: "online",
name: this.$L("动画表情"),
src: this.asciiConvertNative(item)
}
type: "online",
name: this.$L("动画表情"),
src: this.asciiConvertNative(item)
}
}), maxNum - this.emojiQuickItems.length)
}), 3 - this.emojiQuickItems.length)
if (array.length > 0) {
this.emojiQuickItems.push(...array)
this.$nextTick(_ => {
@ -973,19 +973,13 @@ export default {
reader.readAsDataURL(this.recordBlob);
},
onEmojiQuick({data, item}) {
onEmojiQuick(item) {
if (item.type === 'online') {
this.$emit('input', "")
this.$emit('on-send', `<img src="${item.src}"/>`)
} else {
const baseUrl = $A.apiUrl("../images/emoticon")
const emoji = {
asset: `images/emoticon/${data.path}/${item.path}`,
name: item.name,
src: `${baseUrl}/${data.path}/${item.path}`
}
this.$emit('input', "")
this.$emit('on-send', `<img class="emoticon" data-asset="${emoji.asset}" data-name="${emoji.name}" src="${emoji.src}"/>`)
this.$emit('on-send', `<img class="emoticon" data-asset="${item.asset}" data-name="${item.name}" src="${item.src}"/>`)
}
this.emojiQuickShow = false
this.focus()