|
|
@@ -254,25 +254,32 @@ |
|
|
|
syncResult.classList.add('hide'); |
|
|
|
syncIncoming.classList.add('hide'); |
|
|
|
|
|
|
|
closeBtn.addEventListener('click', function () { window.ipcRenderer.invoke('window:hide'); }); |
|
|
|
function closeWindow() { |
|
|
|
window.ipcRenderer.invoke('window:hide'); |
|
|
|
} |
|
|
|
closeBtn.addEventListener('click', closeWindow); |
|
|
|
|
|
|
|
syncMsgBtn.addEventListener('click', function () { |
|
|
|
if (contextMsg.taskSyncStatus === 'TASK_SYNC_STATUS_FINISH') { // 查看 |
|
|
|
window.ipcRenderer.invoke('open-file-position', contextMsg); |
|
|
|
closeWindow(); |
|
|
|
return; |
|
|
|
} |
|
|
|
if (contextMsg.taskSyncStatus === 'TASK_SYNC_STATUS_FAIL') { // 重新同步 |
|
|
|
window.ipcRenderer.invoke('re-sync-file', contextMsg); |
|
|
|
closeWindow(); |
|
|
|
return; |
|
|
|
} |
|
|
|
if (contextMsg.notifyType === 1) { // 下载 |
|
|
|
window.ipcRenderer.invoke('download-file', contextMsg); |
|
|
|
closeWindow(); |
|
|
|
return; |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
conflictMsgBtn.addEventListener('click', function () { |
|
|
|
conflictMsgBtn.addEventListener('click', function () { // 下载 |
|
|
|
window.ipcRenderer.invoke('download-file', contextMsg); |
|
|
|
closeWindow(); |
|
|
|
}); |
|
|
|
|
|
|
|
window.addIpcRendererListener('on-notify', function (_, message) { // message: DATA.SocketFileMsg |
|
|
|