diff --git a/README.md b/README.md
index a0960d6..758f0bf 100644
--- a/README.md
+++ b/README.md
@@ -20,6 +20,7 @@
- word新增ai优化/续写/纠错/翻译/总结,生成大纲,根据大纲一键创建文章
- markdown更换为更实用的cherry-markdown,支持draw.io绘图,支持导出为思维导图/pdf/长图/md/html格式
- 修复截图/截屏路径
+- 修复更换存储将路径后系统不重置的问题
- 新增文件密码箱(系统设置里),可根据不同文件进行加密存储
## 🏭 第三阶段目标(十二月底发布)
diff --git a/frontend/components.d.ts b/frontend/components.d.ts
index 9b49402..fe6480e 100644
--- a/frontend/components.d.ts
+++ b/frontend/components.d.ts
@@ -28,7 +28,6 @@ declare module 'vue' {
ChatBox: typeof import('./src/components/chat/ChatBox.vue')['default']
ChatContent: typeof import('./src/components/localchat/ChatContent.vue')['default']
ChatDomain: typeof import('./src/components/localchat/ChatDomain.vue')['default']
- ChatEditInfo: typeof import('./src/components/localchat/ChatEditInfo.vue')['default']
ChatEditor: typeof import('./src/components/localchat/ChatEditor.vue')['default']
ChatFoot: typeof import('./src/components/localchat/ChatFoot.vue')['default']
ChatGroupMember: typeof import('./src/components/chat/chatGroupMember.vue')['default']
@@ -126,12 +125,10 @@ declare module 'vue' {
LocalChat: typeof import('./src/components/localchat/LocalChat.vue')['default']
LockDesktop: typeof import('./src/components/desktop/LockDesktop.vue')['default']
Magnet: typeof import('./src/components/taskbar/Magnet.vue')['default']
- MarkDown: typeof import('./src/components/builtin/MarkDown.vue')['default']
MenuBar: typeof import('./src/components/window/MenuBar.vue')['default']
MenuList: typeof import('./src/components/taskbar/MenuList.vue')['default']
MessageCenterPop: typeof import('./src/components/taskbar/MessageCenterPop.vue')['default']
MessageIcon: typeof import('./src/components/taskbar/MessageIcon.vue')['default']
- Model: typeof import('./src/components/ai/model.vue')['default']
MusicStore: typeof import('./src/components/builtin/MusicStore.vue')['default']
MusicViewer: typeof import('./src/components/builtin/MusicViewer.vue')['default']
NetWork: typeof import('./src/components/taskbar/NetWork.vue')['default']
@@ -186,7 +183,4 @@ declare module 'vue' {
WinSelect: typeof import('./src/components/ui/WinSelect.vue')['default']
WinUpButtonGroup: typeof import('./src/components/ui/WinUpButtonGroup.vue')['default']
}
- export interface ComponentCustomProperties {
- vLoading: typeof import('element-plus/es')['ElLoadingDirective']
- }
}
diff --git a/frontend/src/components/ai/DownLabeleditor.vue b/frontend/src/components/ai/DownLabeleditor.vue
index 5da7a07..6d39b74 100644
--- a/frontend/src/components/ai/DownLabeleditor.vue
+++ b/frontend/src/components/ai/DownLabeleditor.vue
@@ -2,7 +2,7 @@
import { db } from "@/stores/db"
import { useModelStore } from "@/stores/model";
import { notifyError } from "@/util/msg";
-import { getSystemKey } from "@/system/config";
+// import { getSystemKey } from "@/system/config";
import { t } from "@/i18n/index";
import { watchEffect, ref, toRaw } from "vue";
const modelStore = useModelStore();
diff --git a/frontend/src/components/computer/QuickLink.vue b/frontend/src/components/computer/QuickLink.vue
index 9be9352..fe55a9e 100644
--- a/frontend/src/components/computer/QuickLink.vue
+++ b/frontend/src/components/computer/QuickLink.vue
@@ -39,7 +39,7 @@ const quickLinks = [
{
img: "excel",
name: t("excel"),
- path: "/C/Users/Documents/Execl",
+ path: "/C/Users/Documents/Excel",
},
{
img: "pptexe",
diff --git a/frontend/src/components/localchat/AiChatInfo.vue b/frontend/src/components/localchat/AiChatInfo.vue
index 1e49d76..ad37c82 100644
--- a/frontend/src/components/localchat/AiChatInfo.vue
+++ b/frontend/src/components/localchat/AiChatInfo.vue
@@ -1,9 +1,9 @@
diff --git a/frontend/src/system/core/SystemFileConfig.ts b/frontend/src/system/core/SystemFileConfig.ts
index 0e81f40..4654a46 100644
--- a/frontend/src/system/core/SystemFileConfig.ts
+++ b/frontend/src/system/core/SystemFileConfig.ts
@@ -78,7 +78,7 @@ const InitUserFile = {
mode: OsFileMode.ReadWriteExecute,
},
{
- name: 'Execl',
+ name: 'Excel',
type: 'dir',
mode: OsFileMode.ReadWriteExecute,
},
diff --git a/frontend/src/system/index.ts b/frontend/src/system/index.ts
index 2aec99a..38239bb 100644
--- a/frontend/src/system/index.ts
+++ b/frontend/src/system/index.ts
@@ -29,7 +29,7 @@ import { defaultConfig } from './initConfig';
import { Tray, TrayOptions } from './menu/Tary';
import { Notify, NotifyConstructorOptions } from './notification/Notification';
import { Dialog } from './window/Dialog';
-import { md5 } from 'js-md5';
+// import { md5 } from 'js-md5';
export type OsPlugin = (system: System) => void;
export type FileOpener = {
@@ -447,6 +447,7 @@ export class System {
?.func.call(this, path, fileContent || '');
}
} else {
+ //console.log(path)
const fileStat = await this.fs.stat(path)
if (!fileStat) {
throw new Error('文件不存在');
diff --git a/godo/.air.toml b/godo/.air.toml
deleted file mode 100644
index 5b2168f..0000000
--- a/godo/.air.toml
+++ /dev/null
@@ -1,51 +0,0 @@
-root = "."
-testdata_dir = "testdata"
-tmp_dir = "tmp"
-
-[build]
- args_bin = []
- bin = "tmp\\main.exe"
- cmd = "go build -o ./tmp/main.exe ."
- delay = 1000
- exclude_dir = ["assets", "tmp", "vendor", "testdata", "depts"]
- exclude_file = []
- exclude_regex = ["_test.go"]
- exclude_unchanged = false
- follow_symlink = false
- full_bin = ""
- include_dir = []
- include_ext = ["go", "tpl", "tmpl", "html"]
- include_file = []
- kill_delay = "0s"
- log = "build-errors.log"
- poll = false
- poll_interval = 0
- post_cmd = []
- pre_cmd = []
- rerun = false
- rerun_delay = 500
- send_interrupt = false
- stop_on_error = false
-
-[color]
- app = ""
- build = "yellow"
- main = "magenta"
- runner = "green"
- watcher = "cyan"
-
-[log]
- main_only = false
- time = false
-
-[misc]
- clean_on_exit = false
-
-[proxy]
- app_port = 0
- enabled = false
- proxy_port = 0
-
-[screen]
- clear_on_rebuild = false
- keep_scroll = true
diff --git a/godo/files/fs.go b/godo/files/fs.go
index d23f631..0607876 100644
--- a/godo/files/fs.go
+++ b/godo/files/fs.go
@@ -82,7 +82,7 @@ func HandleReadDir(w http.ResponseWriter, r *http.Request) {
libs.HTTPError(w, http.StatusInternalServerError, fmt.Sprintf("Failed to read file content: %v", err))
return
}
- osFileInfo.IsPwd = IsPwdFile(content)
+
osFileInfo.Content = string(content)
// 检查文件内容是否以"link::"开头
if strings.HasPrefix(osFileInfo.Content, "link::") {
@@ -90,6 +90,8 @@ func HandleReadDir(w http.ResponseWriter, r *http.Request) {
} else {
osFileInfo.Content = ""
}
+
+ osFileInfo.IsPwd = IsPwdFile(content)
}
osFileInfos = append(osFileInfos, *osFileInfo)
@@ -124,29 +126,32 @@ func HandleStat(w http.ResponseWriter, r *http.Request) {
libs.HTTPError(w, http.StatusNotFound, err.Error())
return
}
- // 是否为加密文件
- file, err := os.Open(filepath.Join(basePath, path))
- if err != nil {
- libs.HTTPError(w, http.StatusInternalServerError, err.Error())
- return
- }
- buffer := make([]byte, 34)
- _, err = file.Read(buffer)
- if err != nil {
- if err == io.EOF {
- // EOF说明文件大小小于34字节
- osFileInfo.IsPwd = false
- res := libs.APIResponse{
- Message: "File information retrieved successfully.",
- Data: osFileInfo,
+ if osFileInfo.IsFile {
+ // 是否为加密文件
+ file, err := os.Open(filepath.Join(basePath, path))
+ if err != nil {
+ libs.HTTPError(w, http.StatusInternalServerError, err.Error())
+ return
+ }
+ buffer := make([]byte, 34)
+ _, err = file.Read(buffer)
+ if err != nil {
+ if err == io.EOF {
+ // EOF说明文件大小小于34字节
+ osFileInfo.IsPwd = false
+ res := libs.APIResponse{
+ Message: "File information retrieved successfully.",
+ Data: osFileInfo,
+ }
+ json.NewEncoder(w).Encode(res)
+ return
}
- json.NewEncoder(w).Encode(res)
+ libs.HTTPError(w, http.StatusInternalServerError, err.Error())
return
}
- libs.HTTPError(w, http.StatusInternalServerError, err.Error())
- return
+ osFileInfo.IsPwd = IsPwdFile(buffer)
}
- osFileInfo.IsPwd = IsPwdFile(buffer)
+
res := libs.APIResponse{
Message: "File information retrieved successfully.",
Data: osFileInfo,
diff --git a/godo/files/init.go b/godo/files/init.go
index 1e7f745..edab5a2 100644
--- a/godo/files/init.go
+++ b/godo/files/init.go
@@ -110,7 +110,7 @@ func InitOsSystem() error {
"PPT",
"Baiban",
"Kanban",
- "Execl",
+ "Excel",
"Mind",
"Screenshot",
"ScreenRecording",
diff --git a/godo/sys/setting.go b/godo/sys/setting.go
index 7ec62c1..084a771 100644
--- a/godo/sys/setting.go
+++ b/godo/sys/setting.go
@@ -21,6 +21,7 @@ package sys
import (
"encoding/json"
"fmt"
+ "godo/files"
"godo/libs"
"godo/webdav"
"net"
@@ -50,6 +51,11 @@ func ConfigHandler(w http.ResponseWriter, r *http.Request) {
return
}
libs.SetConfig(req)
+ err := files.InitOsSystem()
+ if err != nil {
+ libs.ErrorMsg(w, "The InitOsSystem is error:"+err.Error())
+ return
+ }
}
} else if req.Name == "aiDir" {
aiPath := req.Value.(string)