no message

This commit is contained in:
kuaifan 2022-06-06 19:19:32 +08:00
parent 902c0262f2
commit 4bc05e258d
11 changed files with 94 additions and 39 deletions

View File

@ -151,10 +151,10 @@ export default {
}, },
windowSizeListener() { windowSizeListener() {
this.$store.state.windowWidth = window.innerWidth this.$store.state.windowWidth = window.outerWidth
this.$store.state.windowHeight = window.innerHeight this.$store.state.windowHeight = window.outerHeight
this.$store.state.windowLarge = window.innerWidth > 768 this.$store.state.windowLarge = window.outerWidth > 768
this.$store.state.windowSmall = window.innerWidth <= 768 this.$store.state.windowSmall = window.outerWidth <= 768
}, },
windowScrollListener() { windowScrollListener() {

View File

@ -182,13 +182,13 @@ export default {
let top = e.clientY - this.record.y; let top = e.clientY - this.record.y;
if (left < 0) { if (left < 0) {
left = 0 left = 0
} else if (left > (window.innerWidth - this.floatDrag.offsetWidth)) { } else if (left > (window.outerWidth - this.floatDrag.offsetWidth)) {
left = window.innerWidth - this.floatDrag.offsetWidth left = window.outerWidth - this.floatDrag.offsetWidth
} }
if (top < 0) { if (top < 0) {
top = 0 top = 0
} else if (top > (window.innerHeight - this.floatDrag.offsetHeight)) { } else if (top > (window.outerHeight - this.floatDrag.offsetHeight)) {
top = window.innerHeight - this.floatDrag.offsetHeight top = window.outerHeight - this.floatDrag.offsetHeight
} }
this.left = left; this.left = left;
this.top = top; this.top = top;
@ -219,13 +219,13 @@ export default {
let top = touch.clientY - this.floatDrag.offsetHeight / 2; let top = touch.clientY - this.floatDrag.offsetHeight / 2;
if (left < 0) { if (left < 0) {
left = 0 left = 0
} else if (left > (window.innerWidth - this.floatDrag.offsetWidth)) { } else if (left > (window.outerWidth - this.floatDrag.offsetWidth)) {
left = window.innerWidth - this.floatDrag.offsetWidth left = window.outerWidth - this.floatDrag.offsetWidth
} }
if (top < 0) { if (top < 0) {
top = 0 top = 0
} else if (top > (window.innerHeight - this.floatDrag.offsetHeight)) { } else if (top > (window.outerHeight - this.floatDrag.offsetHeight)) {
top = window.innerHeight - this.floatDrag.offsetHeight top = window.outerHeight - this.floatDrag.offsetHeight
} }
this.left = left; this.left = left;
this.top = top; this.top = top;

View File

@ -4317,7 +4317,7 @@ function maybeScrollWindow(cm, rect) {
var display = cm.display, box = display.sizer.getBoundingClientRect(), doScroll = null; var display = cm.display, box = display.sizer.getBoundingClientRect(), doScroll = null;
if (rect.top + box.top < 0) { if (rect.top + box.top < 0) {
doScroll = true; doScroll = true;
} else if (rect.bottom + box.top > (window.innerHeight || document.documentElement.clientHeight)) { } else if (rect.bottom + box.top > (window.outerHeight || document.documentElement.clientHeight)) {
doScroll = false; doScroll = false;
} }
if (doScroll != null && !phantom) { if (doScroll != null && !phantom) {
@ -11172,7 +11172,7 @@ function findPosH(doc, pos, dir, unit, visually) {
function findPosV(cm, pos, dir, unit) { function findPosV(cm, pos, dir, unit) {
var doc = cm.doc, x = pos.left, y; var doc = cm.doc, x = pos.left, y;
if (unit == "page") { if (unit == "page") {
var pageSize = Math.min(cm.display.wrapper.clientHeight, window.innerHeight || document.documentElement.clientHeight); var pageSize = Math.min(cm.display.wrapper.clientHeight, window.outerHeight || document.documentElement.clientHeight);
var moveAmount = Math.max(pageSize - .5 * textHeight(cm.display), 3); var moveAmount = Math.max(pageSize - .5 * textHeight(cm.display), 3);
y = (dir > 0 ? pos.bottom : pos.top) + dir * moveAmount; y = (dir > 0 ? pos.bottom : pos.top) + dir * moveAmount;

View File

@ -0,0 +1,20 @@
<template>
<div class="app-view-loading">
<div>
<div>PAGE LOADING</div>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
</div>
</div>
</template>
<script>
export default {
name: 'PageLoading',
}
</script>

View File

@ -236,20 +236,7 @@
</div> </div>
<!--等待覆盖层--> <!--等待覆盖层-->
<div v-if="userLoad" class="manage-box-load"> <PageLoading v-if="userLoad" class="manage-box-load"/>
<div class="app-view-loading">
<div>
<div>PAGE LOADING</div>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
</div>
</div>
</div>
<!--新建项目--> <!--新建项目-->
<Modal <Modal
@ -391,9 +378,11 @@ import DialogModal from "./manage/components/DialogModal";
import TaskModal from "./manage/components/TaskModal"; import TaskModal from "./manage/components/TaskModal";
import notificationKoro from "notification-koro1"; import notificationKoro from "notification-koro1";
import {Store} from "le5le-store"; import {Store} from "le5le-store";
import PageLoading from "../components/PageLoading";
export default { export default {
components: { components: {
PageLoading,
TaskModal, TaskModal,
DialogModal, DialogModal,
MeetingManager, MeetingManager,

View File

@ -90,6 +90,9 @@
<div ref="recwave"></div> <div ref="recwave"></div>
</li> </li>
</ul> </ul>
<!-- 覆盖层 -->
<div class="chat-cover" @click.stop="onClickCover"></div>
</div> </div>
<!-- 移动端表情底部 --> <!-- 移动端表情底部 -->
@ -301,6 +304,12 @@ export default {
array.push('record-progress'); array.push('record-progress');
} }
} }
if (this.showMore) {
array.push('show-more');
}
if (this.showEmoji) {
array.push('show-emoji');
}
if (this.mentionMode) { if (this.mentionMode) {
array.push(this.mentionMode); array.push(this.mentionMode);
} }
@ -396,7 +405,7 @@ export default {
} else if (this.windowSmall) { } else if (this.windowSmall) {
this.timerScroll = setInterval(() => { this.timerScroll = setInterval(() => {
if (this.quill?.hasFocus()) { if (this.quill?.hasFocus()) {
$A.scrollIntoViewIfNeeded(this.$refs.editor); this.windowScrollY > 0 && $A.scrollIntoViewIfNeeded(this.$refs.editor);
} else { } else {
clearInterval(this.timerScroll); clearInterval(this.timerScroll);
} }
@ -759,6 +768,13 @@ export default {
this.showMore = false; this.showMore = false;
}, },
onClickCover() {
this.hidePopover();
this.$nextTick(_ => {
this.quill?.focus()
})
},
uploadRecord(duration) { uploadRecord(duration) {
if (this.recordBlob === null) { if (this.recordBlob === null) {
return; return;

View File

@ -674,12 +674,17 @@ export default {
onTouchstart(e) { onTouchstart(e) {
this.wrapperStart = Object.assign(this.scrollInfo(), { this.wrapperStart = Object.assign(this.scrollInfo(), {
clientY: e.touches[0].clientY clientY: e.touches[0].clientY,
exclud: !this.$refs.scroller.$el.contains(e.target),
}); });
}, },
onTouchmove(e) { onTouchmove(e) {
if (this.windowSmall && this.windowScrollY > 0) { if (this.windowSmall && this.windowScrollY > 0) {
if (this.wrapperStart.exclud) {
e.preventDefault();
return;
}
if (this.wrapperStart.clientY > e.touches[0].clientY) { if (this.wrapperStart.clientY > e.touches[0].clientY) {
// //
if (this.wrapperStart.scrollE === 0) { if (this.wrapperStart.scrollE === 0) {

View File

@ -1234,8 +1234,8 @@ export default {
resizeDialog() { resizeDialog() {
return new Promise(resolve => { return new Promise(resolve => {
this.$Electron.sendSyncMessage('windowSize', { this.$Electron.sendSyncMessage('windowSize', {
width: Math.max(1100, window.innerWidth), width: Math.max(1100, window.outerWidth),
height: Math.max(720, window.innerHeight), height: Math.max(720, window.outerHeight),
minWidth: 800, minWidth: 800,
minHeight: 600, minHeight: 600,
autoZoom: true, autoZoom: true,

View File

@ -68,11 +68,11 @@
@dragover.prevent="fileDragOver(true, $event)" @dragover.prevent="fileDragOver(true, $event)"
@dragleave.prevent="fileDragOver(false, $event)"> @dragleave.prevent="fileDragOver(false, $event)">
<template v-if="tableMode === 'block'"> <template v-if="tableMode === 'block'">
<div v-if="fileList.length == 0 && loadIng == 0" class="file-no" @contextmenu.prevent="handleRightClick"> <div v-if="fileList.length == 0 && loadIng == 0" class="file-no" @contextmenu.prevent="handleContextmenu">
<i class="taskfont">&#xe60b;</i> <i class="taskfont">&#xe60b;</i>
<p>{{$L('没有任何文件')}}</p> <p>{{$L('没有任何文件')}}</p>
</div> </div>
<div v-else class="file-list" @contextmenu.prevent="handleRightClick"> <div v-else class="file-list" @contextmenu.prevent="handleContextmenu">
<ul> <ul>
<li <li
v-for="item in fileList" v-for="item in fileList"
@ -120,7 +120,7 @@
</ul> </ul>
</div> </div>
</template> </template>
<div v-else class="file-table" @contextmenu.prevent="handleRightClick"> <div v-else class="file-table" @contextmenu.prevent="handleContextmenu">
<Table <Table
:columns="columns" :columns="columns"
:data="fileList" :data="fileList"
@ -910,6 +910,12 @@ export default {
this.handleRightClick(event, fileItem) this.handleRightClick(event, fileItem)
}, },
handleContextmenu(event) {
if (this.windowLarge) {
this.handleRightClick(event)
}
},
handleRightClick(event, item, isAddButton) { handleRightClick(event, item, isAddButton) {
this.contextMenuItem = $A.isJson(item) ? item : {}; this.contextMenuItem = $A.isJson(item) ? item : {};
if (this.contextMenuVisible) { if (this.contextMenuVisible) {

View File

@ -1,12 +1,12 @@
const stateData = { const stateData = {
// 浏览器尺寸信息 // 浏览器尺寸信息
windowWidth: window.innerWidth, windowWidth: window.outerWidth,
windowHeight: window.innerHeight, windowHeight: window.outerHeight,
windowScrollY: 0, windowScrollY: 0,
// 浏览器窗口类型 // 浏览器窗口类型
windowLarge: window.innerWidth > 768, // 大窗口 windowLarge: window.outerWidth > 768, // 大窗口
windowSmall: window.innerWidth <= 768, // 小窗口 windowSmall: window.outerWidth <= 768, // 小窗口
// 播放中的音频地址 // 播放中的音频地址
audioPlaying: null, audioPlaying: null,

View File

@ -42,6 +42,15 @@
} }
} }
&.show-more,
&.show-emoji {
.chat-input-wrapper {
.chat-cover {
display: block;
}
}
}
.chat-input-wrapper { .chat-input-wrapper {
position: relative; position: relative;
display: inline-block; display: inline-block;
@ -201,6 +210,16 @@
} }
} }
} }
.chat-cover {
display: none;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 4;
}
} }
.chat-emoji-wrapper { .chat-emoji-wrapper {