mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-11 18:42:54 +00:00
no message
This commit is contained in:
parent
b78f93979d
commit
8bdd31ae67
@ -90,9 +90,9 @@
|
||||
<i class="taskfont"></i>
|
||||
</ETooltip>
|
||||
<template v-if="!isAiBot">
|
||||
<div v-if="maybePhotoSrc" class="chat-input-popover-item maybe-photo" @click="onToolbar('maybe-photo')">
|
||||
<div v-if="maybePhotoShow" class="chat-input-popover-item maybe-photo" @click="onToolbar('maybe-photo')">
|
||||
<span>{{$L('你可能要发送的照片')}}:</span>
|
||||
<img :src="maybePhotoSrc" :style="maybePhotoStyle">
|
||||
<div class="photo-preview" :style="maybePhotoStyle"></div>
|
||||
</div>
|
||||
<div v-if="recordReady" class="chat-input-popover-item" @click="onToolbar('meeting')">
|
||||
<i class="taskfont"></i>
|
||||
@ -386,7 +386,8 @@ export default {
|
||||
|
||||
mentionMode: '',
|
||||
|
||||
maybePhotoSrc: '',
|
||||
maybePhotoShow: false,
|
||||
maybePhotoData: {},
|
||||
maybePhotoStyle: {},
|
||||
|
||||
userList: null,
|
||||
@ -788,11 +789,33 @@ export default {
|
||||
},
|
||||
|
||||
showMore(val) {
|
||||
this.maybePhotoShow = false
|
||||
if (val) {
|
||||
this.showMenu = false;
|
||||
// this.showMore = false;
|
||||
this.showEmoji = false;
|
||||
this.emojiQuickShow = false;
|
||||
//
|
||||
$A.eeuiAppGetLatestPhoto(({status, created, thumbnail, original}) => {
|
||||
if (status !== 'success'
|
||||
// || created + 60 < $A.dayjs().unix()
|
||||
|| !thumbnail.base64
|
||||
|| !original.path) {
|
||||
return
|
||||
}
|
||||
const width = 120;
|
||||
const height = Math.min(150, thumbnail.height / (thumbnail.width / width));
|
||||
this.maybePhotoStyle = {
|
||||
width: width + 'px',
|
||||
height: height + 'px',
|
||||
backgroundImage: `url(${thumbnail.base64})`,
|
||||
}
|
||||
this.maybePhotoData = original
|
||||
this.maybePhotoShow = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.more?.updatePopper()
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
@ -1619,6 +1642,33 @@ export default {
|
||||
this.openMenu("#");
|
||||
break;
|
||||
|
||||
case 'maybe-photo':
|
||||
$A.eeuiAppUploadPhoto({
|
||||
url: $A.apiUrl('dialog/msg/sendfile'),
|
||||
data: {
|
||||
dialog_id: this.dialogId,
|
||||
},
|
||||
headers: {
|
||||
token: this.userToken,
|
||||
},
|
||||
path: this.maybePhotoData.path,
|
||||
fieldName: "files"
|
||||
}, ({status, data}) => {
|
||||
/*switch (status) {
|
||||
case "uploading":
|
||||
break;
|
||||
case "success":
|
||||
if (data.ret !== 1) {
|
||||
$A.messageError(data.msg || "上传失败")
|
||||
}
|
||||
break;
|
||||
case "error":
|
||||
$A
|
||||
break;
|
||||
}*/
|
||||
})
|
||||
break;
|
||||
|
||||
case 'meeting':
|
||||
emitter.emit('addMeeting', {
|
||||
type: 'create',
|
||||
|
||||
@ -755,10 +755,11 @@
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
> img {
|
||||
display: flex;
|
||||
max-width: 100%;
|
||||
width: 120px;
|
||||
.photo-preview {
|
||||
background-size: cover;
|
||||
background-position: center center;
|
||||
background-repeat: no-repeat;
|
||||
border-radius: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1 +1 @@
|
||||
Subproject commit 5bcd05203171ee552e56bddc621f43d1ce366f83
|
||||
Subproject commit 0ed743c24355aed405433b0de472b5f878fd3bab
|
||||
Loading…
x
Reference in New Issue
Block a user