no message

This commit is contained in:
kuaifan 2022-06-14 10:51:34 +08:00
parent 8b394819c4
commit dbba2a1b8f
8 changed files with 54 additions and 33 deletions

View File

@ -452,10 +452,6 @@ ipcMain.on('updateCheckAndDownload', (event, args) => {
ipcMain.on('updateQuitAndInstall', (event) => {
event.returnValue = "ok"
willQuitApp = true
if(process.platform == 'darwin'){
// Mac 触发升级时跳动Dock图标
app.dock.bounce('critical');
}
setTimeout(() => autoUpdater.quitAndInstall(true, true), 1)
})

View File

@ -409,11 +409,11 @@ export default {
this.viewPicture(msg.path);
return
}
const uri = `/single/file/msg/${this.msgData.id}`;
const path = `/single/file/msg/${this.msgData.id}`;
if (this.$Electron) {
this.$Electron.sendMessage('windowRouter', {
name: `file-msg-${this.msgData.id}`,
path: uri,
path: path,
userAgent: "/hideenOfficeTitle/",
force: false,
config: {
@ -422,7 +422,10 @@ export default {
parent: null,
width: Math.min(window.screen.availWidth, 1440),
height: Math.min(window.screen.availHeight, 900),
}
},
webPreferences: {
nodeIntegrationInSubFrames: msg.ext === 'drawio'
},
});
} else if (this.$isEEUiApp) {
$A.eeuiAppOpenPage({
@ -431,11 +434,11 @@ export default {
url: 'web.js',
params: {
titleFixed: true,
url: $A.rightDelete(window.location.href, window.location.hash) + `#${uri}`
url: $A.rightDelete(window.location.href, window.location.hash) + `#${path}`
},
});
} else {
window.open($A.apiUrl(`..${uri}`))
window.open($A.apiUrl(`..${path}`))
}
},

View File

@ -1,7 +1,7 @@
<template>
<div v-if="ready" class="file-content">
<IFrame v-if="isPreview" class="preview-iframe" :src="previewUrl" @on-message="onMessage"/>
<template v-else>
<template v-else-if="contentDetail">
<EPopover
v-if="['word', 'excel', 'ppt'].includes(file.type)"
v-model="historyShow"
@ -69,7 +69,7 @@
<Button :disabled="equalContent" :loading="loadSave > 0" class="header-button" size="small" type="primary" @click="handleClick('save')">{{$L('保存')}}</Button>
</template>
</div>
<div v-if="contentDetail" class="content-body">
<div class="content-body">
<div v-if="historyShow" class="content-mask"></div>
<template v-if="file.type=='document'">
<MDEditor v-if="contentDetail.type=='md'" v-model="contentDetail.content" height="100%"/>
@ -340,7 +340,9 @@ export default {
return;
}
this.loadSave++;
this.loadContent++;
setTimeout(_ => {
this.loadContent++;
}, 600)
this.$store.dispatch("call", {
url: 'file/content',
data: {

View File

@ -180,11 +180,11 @@ export default {
break;
case 'preview':
const uri = `/single/file/${this.fileId}?history_id=${row.id}&history_at=${row.created_at}`;
const path = `/single/file/${this.fileId}?history_id=${row.id}&history_at=${row.created_at}`;
if (this.$Electron) {
this.$Electron.sendMessage('windowRouter', {
name: `file-${this.fileId}-${row.id}`,
path: uri,
path: path,
userAgent: "/hideenOfficeTitle/",
force: false,
config: {
@ -205,11 +205,11 @@ export default {
url: 'web.js',
params: {
titleFixed: true,
url: $A.rightDelete(window.location.href, window.location.hash) + `#${uri}`
url: $A.rightDelete(window.location.href, window.location.hash) + `#${path}`
},
});
} else {
window.open($A.apiUrl(`..${uri}`))
window.open($A.apiUrl(`..${path}`))
}
break;
}

View File

@ -1,7 +1,7 @@
<template>
<div class="file-preview">
<IFrame v-if="isPreview" class="preview-iframe" :src="previewUrl" @on-message="onMessage"/>
<template v-else>
<template v-else-if="contentDetail">
<div v-show="headerShow && !['word', 'excel', 'ppt'].includes(file.type)" class="edit-header">
<div class="header-title">
<div class="title-name">{{$A.getFileName(file)}}</div>
@ -23,7 +23,7 @@
</DropdownMenu>
</Dropdown>
</div>
<div v-if="contentDetail" class="content-body">
<div class="content-body">
<template v-if="file.type=='document'">
<MDPreview v-if="contentDetail.type=='md'" :initialValue="contentDetail.content"/>
<TEditor v-else :value="contentDetail.content" height="100%" readOnly/>
@ -131,7 +131,9 @@ export default {
this.contentDetail = $A.cloneJSON(this.file);
return;
}
this.loadContent++;
setTimeout(_ => {
this.loadContent++;
}, 600)
this.$store.dispatch("call", {
url: 'file/content',
data: {

View File

@ -1286,11 +1286,11 @@ export default {
}
return
}
const uri = `/single/file/task/${file.id}`;
const path = `/single/file/task/${file.id}`;
if (this.$Electron) {
this.$Electron.sendMessage('windowRouter', {
name: `file-task-${file.id}`,
path: uri,
path: path,
userAgent: "/hideenOfficeTitle/",
force: false,
config: {
@ -1299,7 +1299,10 @@ export default {
parent: null,
width: Math.min(window.screen.availWidth, 1440),
height: Math.min(window.screen.availHeight, 900),
}
},
webPreferences: {
nodeIntegrationInSubFrames: file.ext === 'drawio'
},
});
} else if (this.$isEEUiApp) {
$A.eeuiAppOpenPage({
@ -1308,11 +1311,11 @@ export default {
url: 'web.js',
params: {
titleFixed: true,
url: $A.rightDelete(window.location.href, window.location.hash) + `#${uri}`
url: $A.rightDelete(window.location.href, window.location.hash) + `#${path}`
},
});
} else {
window.open($A.apiUrl(`..${uri}`))
window.open($A.apiUrl(`..${path}`))
}
},

View File

@ -27,7 +27,7 @@
<span>{{$L('全部文件')}}</span>
</li>
<li v-if="searchKey">{{$L('搜索')}} "{{searchKey}}"</li>
<li v-else v-for="item in navigator" @click="browseFolder(item.id)">
<li v-else v-for="item in navigator" :ref="`nav_${item.id}`" @click="browseFolder(item.id)">
<i v-if="item.share" class="taskfont">&#xe63f;</i>
<span :title="item.name">{{item.name}}</span>
<span v-if="item.share && item.permission == 0" class="readonly">{{$L('只读')}}</span>
@ -653,6 +653,17 @@ export default {
}
},
navigator: {
handler() {
this.$nextTick(_ => {
if (this.$refs[`nav_${this.pid}`]) {
$A.scrollToView(this.$refs[`nav_${this.pid}`][0], false)
}
});
},
immediate: true
},
selectIds: {
handler(ids) {
if (ids.length > 0) {
@ -692,7 +703,7 @@ export default {
{
title: this.$L('文件名'),
key: 'name',
minWidth: 200,
minWidth: 300,
sortable: true,
render: (h, {row}) => {
let array = [];
@ -763,7 +774,11 @@ export default {
}
}
}, [
h('AutoTip', $A.getFileName(row))
h('AutoTip', {
props: {
placement: 'right'
}
}, $A.getFileName(row))
]));
//
const iconArray = [];
@ -1005,11 +1020,11 @@ export default {
},
openFileSingle(item) {
const uri = `/single/file/${item.id}`;
const path = `/single/file/${item.id}`;
if (this.$Electron) {
this.$Electron.sendMessage('windowRouter', {
name: `file-${item.id}`,
path: uri,
path: path,
userAgent: "/hideenOfficeTitle/",
force: false, //
config: {
@ -1030,11 +1045,11 @@ export default {
url: 'web.js',
params: {
titleFixed: true,
url: $A.rightDelete(window.location.href, window.location.hash) + `#${uri}`
url: $A.rightDelete(window.location.href, window.location.hash) + `#${path}`
},
});
} else {
window.open($A.apiUrl(`..${uri}`))
window.open($A.apiUrl(`..${path}`))
}
this.browseFile(0);
},

View File

@ -651,7 +651,7 @@
justify-content: center;
font-size: 13px;
padding: 3px 0;
margin: 0 0 12px;
margin: 0 0 16px;
opacity: 0.6;
transition: opacity 0.2s;
@ -681,7 +681,7 @@
}
&.loading {
padding: 0 0 12px;
padding: 0 0 16px;
justify-content: center;
.common-loading {