|
|
@@ -51,10 +51,10 @@ const system = { |
|
|
|
* todo |
|
|
|
* 通知系统进入当前的工作空间 |
|
|
|
*/ |
|
|
|
entryProject: safeCall((projectId, userId, fileChangeHandler) => { |
|
|
|
entryProject: safeCall((projName, userId, fileChangeHandler) => { |
|
|
|
const socket = io('init'); |
|
|
|
socket.on('open', () => { |
|
|
|
socket.send([projectId, userId].join('|')); |
|
|
|
socket.send([userId, projName].join('|')); |
|
|
|
socket.close(); |
|
|
|
}); |
|
|
|
const watchSocket = io('subscriptionFileChange'); |
|
|
@@ -115,7 +115,7 @@ const system = { |
|
|
|
socket.close(); |
|
|
|
// {"size":"88.69","currentSize":"88.69","unit":"KiB","process":100,"hash":""} |
|
|
|
// {"size":"","currentSize":"","unit":"","process":100,"hash":"QmPJ9i4z5UdoQpLH1DrkhZiTZra2rGicXiPabiLw4LvTmX"} |
|
|
|
const maybeFile = fileList.find(iFile => `${iFile.archName}${iFile.extension ? `.${iFile.extension}` : ''}`); |
|
|
|
const maybeFile = fileList.find(iFile => `${iFile.archName}${iFile.extension ? `.${iFile.extension}` : ''}` === fileName); |
|
|
|
if(maybeFile) { // 更新同名文件 |
|
|
|
const copyFile = firstCharToUpperCase({ ...maybeFile, ipfsCid: hash, ModifyUserId: sessionStorage.userId }); |
|
|
|
|
|
|
|