diff --git a/README.md b/README.md index 19e693a..373b8cb 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,7 @@ - 内网聊天新增ai对话,可保存对话历史,可更换模型和prompt - 新增可定义端口和访问路径,支持web端系统重启 - 新增企业端gitee登录和github登录 +- 新增每个文件可独立设置密码,支持不可逆加密文件(加密文件后不可更改密码) ## 🏭 第三阶段目标(十二月底发布) 1. **文档处理与Markdown智能升级**: diff --git a/frontend/components.d.ts b/frontend/components.d.ts index 157a331..f5fa7d8 100644 --- a/frontend/components.d.ts +++ b/frontend/components.d.ts @@ -74,24 +74,16 @@ declare module 'vue' { ElCol: typeof import('element-plus/es')['ElCol'] ElCollapse: typeof import('element-plus/es')['ElCollapse'] ElCollapseItem: typeof import('element-plus/es')['ElCollapseItem'] - ElColorPicker: typeof import('element-plus/es')['ElColorPicker'] ElContainer: typeof import('element-plus/es')['ElContainer'] ElDialog: typeof import('element-plus/es')['ElDialog'] ElDrawer: typeof import('element-plus/es')['ElDrawer'] - ElDropdown: typeof import('element-plus/es')['ElDropdown'] - ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem'] - ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu'] ElEmpty: typeof import('element-plus/es')['ElEmpty'] - ElFooter: typeof import('element-plus/es')['ElFooter'] ElForm: typeof import('element-plus/es')['ElForm'] ElFormItem: typeof import('element-plus/es')['ElFormItem'] ElHeader: typeof import('element-plus/es')['ElHeader'] ElIcon: typeof import('element-plus/es')['ElIcon'] ElImage: typeof import('element-plus/es')['ElImage'] ElInput: typeof import('element-plus/es')['ElInput'] - ElMain: typeof import('element-plus/es')['ElMain'] - ElMenu: typeof import('element-plus/es')['ElMenu'] - ElMenuItem: typeof import('element-plus/es')['ElMenuItem'] ElOption: typeof import('element-plus/es')['ElOption'] ElPageHeader: typeof import('element-plus/es')['ElPageHeader'] ElPagination: typeof import('element-plus/es')['ElPagination'] @@ -100,18 +92,15 @@ declare module 'vue' { ElRow: typeof import('element-plus/es')['ElRow'] ElScrollbar: typeof import('element-plus/es')['ElScrollbar'] ElSelect: typeof import('element-plus/es')['ElSelect'] + ElSelectV2: typeof import('element-plus/es')['ElSelectV2'] ElSlider: typeof import('element-plus/es')['ElSlider'] ElSpace: typeof import('element-plus/es')['ElSpace'] ElSwitch: typeof import('element-plus/es')['ElSwitch'] - ElTable: typeof import('element-plus/es')['ElTable'] - ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] ElTabPane: typeof import('element-plus/es')['ElTabPane'] ElTabs: typeof import('element-plus/es')['ElTabs'] ElTag: typeof import('element-plus/es')['ElTag'] ElText: typeof import('element-plus/es')['ElText'] ElTooltip: typeof import('element-plus/es')['ElTooltip'] - ElTransfer: typeof import('element-plus/es')['ElTransfer'] - ElTree: typeof import('element-plus/es')['ElTree'] Error: typeof import('./src/components/taskbar/Error.vue')['default'] FileIcon: typeof import('./src/components/builtin/FileIcon.vue')['default'] FileIconImg: typeof import('./src/components/builtin/FileIconImg.vue')['default'] diff --git a/frontend/src/components/builtin/FileList.vue b/frontend/src/components/builtin/FileList.vue index 50ad084..4856712 100644 --- a/frontend/src/components/builtin/FileList.vue +++ b/frontend/src/components/builtin/FileList.vue @@ -291,7 +291,7 @@ function handleRightClick( // }, // }, ]; - if (item.isDirectory && !item.isShare) { + if (item.isDirectory) { if (getSystemKey("storeType") == "local") { menuArr.push({ label: t("zip"), @@ -383,7 +383,7 @@ function handleRightClick( }, }, ]; - if (!item.isShare || item.path.indexOf("/F/othershare") !== 0) { + if (item.path.indexOf("/F") < 0) { fileMenus.push({ label: t("delete"), click: async () => { @@ -399,8 +399,6 @@ function handleRightClick( } }, }); - } - if (!item.isShare) { fileMenus.push({ label: t("create.shortcut"), click: () => { @@ -412,7 +410,7 @@ function handleRightClick( }); } const userType = sys.getConfig("userType"); - if (userType == "member" && !item.isShare && !item.isDirectory) { + if (userType == "member") { menuArr.push({ label: "分享给...", click: () => { @@ -429,40 +427,26 @@ function handleRightClick( win.show(); }, }); - - // menuArr.push({ - // label: "评论", - // click: () => { - // const win = new BrowserWindow({ - // title: "评论", - // content: "CommentsFiles", - // config: { - // path: item.path, - // }, - // width: 350, - // height: 400, - // center: true, - // }); - // win.show(); - // }, - // }); } - menuArr.push({ - label: "文件加密", - click: () => { - const win = new BrowserWindow({ - title: "文件加密", - content: "FilePwd", - config: { - path: item.path, - }, - width: 400, - height: 200, - center: true, - }); - win.show(); - }, - }); + if (!item.isDirectory) { + menuArr.push({ + label: "文件加密", + click: () => { + const win = new BrowserWindow({ + title: "文件加密", + content: "FilePwd", + config: { + path: item.path, + }, + width: 400, + height: 200, + center: true, + }); + win.show(); + }, + }); + } + menuArr.push.apply(menuArr, fileMenus); } const sysEndMenu = [ diff --git a/frontend/src/components/computer/Computer.vue b/frontend/src/components/computer/Computer.vue index 123d8e7..5257ccc 100644 --- a/frontend/src/components/computer/Computer.vue +++ b/frontend/src/components/computer/Computer.vue @@ -132,8 +132,6 @@ diff --git a/frontend/src/hook/useComputer.ts b/frontend/src/hook/useComputer.ts index af72158..b66fc9a 100644 --- a/frontend/src/hook/useComputer.ts +++ b/frontend/src/hook/useComputer.ts @@ -15,7 +15,7 @@ export const useComputer = (adpater: { isDirectory: (file: OsFileWithoutContent) => boolean; notify: (title: string, content: string) => void; search: (keyword: string) => Promise; - readShareDir: (path: RouterPath) => Promise; + //readShareDir: (path: RouterPath) => Promise; }) => { const isVia = async (path: RouterPath) => { if (path === '') path = '/'; @@ -43,12 +43,7 @@ export const useComputer = (adpater: { return; } if (!(await isVia(currentPath))) return; - let result - if (currentPath === '/F/myshare' || currentPath === '/F/othershare') { - result = await adpater.sharedir(currentPath) - } else { - result = await adpater.readdir(currentPath); - } + const result = await adpater.readdir(currentPath); // else if (currentPath.indexOf('/F') === 0) { // //判断是否是回退 // // console.log('currentPath:', currentPath); diff --git a/frontend/src/system/core/FileOs.ts b/frontend/src/system/core/FileOs.ts index ce971f4..8e64130 100644 --- a/frontend/src/system/core/FileOs.ts +++ b/frontend/src/system/core/FileOs.ts @@ -1,9 +1,6 @@ -import { getSystemConfig } from "@/system/config"; -import { isShareFile, turnLocalPath, turnServePath } from "@/util/sharePath.ts"; import { md5 } from "js-md5"; import { fetchGet, fetchPost, getFileUrl } from "../config.ts"; import { OsFileMode } from '../core/FileMode'; -import { OsFile } from "./FileSystem.ts"; const API_BASE_URL = getFileUrl() // import { notifyError } from "@/util/msg"; export async function handleReadDir(path: any): Promise { @@ -288,10 +285,6 @@ export const useOsFile = () => { return false; }, async writeFile(path: string, content: string | Blob, header?: { [key: string]: any }) { - // const head: any = header ? { ...header } : {} - // if (head.pwd && head.pwd !== '') { - // head.pwd = md5(head.pwd) - // } const response = await handleWriteFile(path, content, header); if (response) { return response; diff --git a/frontend/src/system/index.ts b/frontend/src/system/index.ts index d9f8e7b..ae68061 100644 --- a/frontend/src/system/index.ts +++ b/frontend/src/system/index.ts @@ -19,7 +19,7 @@ import { useModelStore } from "@/stores/model.ts"; import { useUpgradeStore } from '@/stores/upgrade'; import { RestartApp } from '@/util/goutil'; import { notifyError } from '@/util/msg'; -import { isShareFile } from '@/util/sharePath'; +//import { isShareFile } from '@/util/sharePath'; import { pick } from '../util/modash'; import { clearSystemConfig, fetchGet, getClientId, getFileUrl, getSystemConfig, getSystemKey, setSystemConfig, setSystemKey } from './config'; import { OsFileInterface } from './core/FIleInterface';