diff --git a/frontend/package-lock.json b/frontend/package-lock.json index f440498..cfa25c5 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -1,15 +1,16 @@ { "name": "godoos", - "version": "1.0.2", + "version": "1.0.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "godoos", - "version": "1.0.2", + "version": "1.0.3", "dependencies": { "@element-plus/icons-vue": "^2.3.1", "@liripeng/vue-audio-player": "^1.6.2", + "@onlyoffice/document-editor-vue": "^1.4.0", "cherry-markdown": "^0.8.52", "dexie": "^4.0.8", "element-plus": "^2.7.7", @@ -644,6 +645,14 @@ "node": ">= 8" } }, + "node_modules/@onlyoffice/document-editor-vue": { + "version": "1.4.0", + "resolved": "https://registry.npmmirror.com/@onlyoffice/document-editor-vue/-/document-editor-vue-1.4.0.tgz", + "integrity": "sha512-Fg5gSc1zF6bmpRapUd7rMpm7kEDF7mQIHQKfcsfJcILdFX9bwIhnkXEucETEA9zdt92nWMS6qiAgVeT61TdCyw==", + "peerDependencies": { + "vue": "^3.0.0" + } + }, "node_modules/@parcel/watcher": { "version": "2.5.0", "resolved": "https://registry.npmmirror.com/@parcel/watcher/-/watcher-2.5.0.tgz", diff --git a/frontend/package.json b/frontend/package.json index a334fc9..3d7edc6 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -11,6 +11,7 @@ "dependencies": { "@element-plus/icons-vue": "^2.3.1", "@liripeng/vue-audio-player": "^1.6.2", + "@onlyoffice/document-editor-vue": "^1.4.0", "cherry-markdown": "^0.8.52", "dexie": "^4.0.8", "element-plus": "^2.7.7", diff --git a/frontend/src/components/desktop/LockDesktop.vue b/frontend/src/components/desktop/LockDesktop.vue index 7266955..f597528 100644 --- a/frontend/src/components/desktop/LockDesktop.vue +++ b/frontend/src/components/desktop/LockDesktop.vue @@ -72,7 +72,6 @@ > 切换角色 diff --git a/frontend/src/components/setting/SetSystem.vue b/frontend/src/components/setting/SetSystem.vue index 61b00ea..cd1d9c3 100644 --- a/frontend/src/components/setting/SetSystem.vue +++ b/frontend/src/components/setting/SetSystem.vue @@ -63,6 +63,31 @@
+
+ + + + +
+ +
+ + + {{ t("confirm") }} + +
+
+

备份

@@ -112,7 +137,7 @@
-
+
@@ -155,7 +180,17 @@ const storeList = [ }, ]; -const items = ["用户角色", "存储配置", "备份还原", "文件密码箱"]; +const items = ["用户角色", "存储配置", "编辑器类型", "备份还原", "文件密码箱"]; +const editorType = [ + { + title: "系统默认", + value: "local", + }, + { + title: "OnlyOffice", + value: "onlyoffice", + }, +]; const urlRegex = /^(https?:\/\/)/; const userTypes = [ { @@ -181,7 +216,7 @@ function selectFile() { function submitOsInfo() { const saveData = toRaw(config.value); if (saveData.storeType === "local") { - const postData = parseData(saveData); + const postData = parseData(saveData); const postUrl = config.value.apiUrl + "/system/setting"; fetch(postUrl, { method: "POST", @@ -260,13 +295,21 @@ function submitOsInfo() { }); } } - +function submitEditInfo() { + const saveData = toRaw(config.value); + setSystemConfig(saveData); + Dialog.showMessageBox({ + message: "保存成功", + type: "success", + }); + return; +} function parseData(saveData: any) { let postData = [] if (saveData.storePath !== "") { - postData.push({ name: "osPath", value: saveData.storePath }) - } - if (saveData.netPort != "" && saveData.netPort != "56780" && !isNaN(saveData.netPort) && saveData.netPort*1 > 0 && saveData.netPort*1 < 65535) { + postData.push({ name: "osPath", value: saveData.storePath }) + } + if (saveData.netPort != "" && saveData.netPort != "56780" && !isNaN(saveData.netPort) && saveData.netPort * 1 > 0 && saveData.netPort * 1 < 65535) { postData.push({ name: "netPort", value: saveData.netPort, diff --git a/frontend/src/components/window/OnlyOffice.vue b/frontend/src/components/window/OnlyOffice.vue new file mode 100644 index 0000000..73c9579 --- /dev/null +++ b/frontend/src/components/window/OnlyOffice.vue @@ -0,0 +1,101 @@ + + + \ No newline at end of file diff --git a/frontend/src/components/window/WindowInner.vue b/frontend/src/components/window/WindowInner.vue index ed28a5d..1aa56b3 100644 --- a/frontend/src/components/window/WindowInner.vue +++ b/frontend/src/components/window/WindowInner.vue @@ -1,5 +1,9 @@