feat:backup
|
@ -2,4 +2,5 @@ node_modules/
|
|||
rpm-4.18.0
|
||||
out/
|
||||
ueditor-1.4.3.3/
|
||||
ueditor/
|
||||
ueditor/
|
||||
asset-manifest.json
|
||||
|
|
|
@ -21,8 +21,8 @@ module.exports = {
|
|||
configure: (webpackConfig, { env, paths }) => {
|
||||
// 修改output.publicPath为'./'
|
||||
// webpackConfig.output.publicPath = './';
|
||||
webpackConfig.output.path = path.join(__dirname,);
|
||||
webpackConfig.output.publicPath = "";
|
||||
webpackConfig.output.path = path.join(__dirname,"/build");
|
||||
webpackConfig.output.publicPath = "./";
|
||||
// webpackConfig.output.module
|
||||
// .rule("icons")
|
||||
// .test(/\.svg$/)
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
"@testing-library/jest-dom": "^5.16.5",
|
||||
"@testing-library/react": "^13.4.0",
|
||||
"@testing-library/user-event": "^13.5.0",
|
||||
"antd": "^4.24.8",
|
||||
"antd": "5.17.0",
|
||||
"axios": "^1.3.3",
|
||||
"concurrently": "^4.1.1",
|
||||
"craco-less": "^2.0.0",
|
||||
|
@ -52,10 +52,13 @@
|
|||
"make": "electron-forge make"
|
||||
},
|
||||
"dependencies": {
|
||||
"@ant-design/icons": "^5.3.7",
|
||||
"cos-nodejs-sdk-v5": "^2.13.3",
|
||||
"electron-is-dev": "^1.1.0",
|
||||
"electron-squirrel-startup": "^1.0.0",
|
||||
"electron-store": "^8.1.0",
|
||||
"less": "^4.2.0",
|
||||
"less-loader": "^12.2.0",
|
||||
"md5": "^2.3.0",
|
||||
"mousetrap": "^1.6.5",
|
||||
"redux-persist": "^6.0.0"
|
||||
|
|
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 1.1 KiB |
|
@ -10,4 +10,11 @@ node version manage
|
|||
## npm
|
||||
node package manage
|
||||
## nrm
|
||||
node remote manage
|
||||
npm remote manage nrm
|
||||
npm install -g nrm
|
||||
|
||||
|
||||
jpg转icon:https://cn.pic2ico.com/
|
||||
1. npm build 将react应用打包为html
|
||||
2. 将打包出来的文件放到根目录下
|
||||
3. npm package 将项目打包
|
|
@ -1,7 +1,6 @@
|
|||
import React from 'react';
|
||||
import {Menu} from 'antd';
|
||||
import {useDispatch} from "react-redux";
|
||||
import {dirRemove} from "../../../redux/dirMessage_reducer";
|
||||
import {dirRemove} from "@/redux/dirMessage_reducer";
|
||||
|
||||
function CloseDir (prop) {
|
||||
console.log("prop",prop)
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import React, {useRef, useState} from 'react';
|
||||
import {Input, message, Modal} from 'antd';
|
||||
import {useDispatch, useSelector} from "react-redux";
|
||||
import {newDir} from "../../../utils/File";
|
||||
import {dirDirAdd} from "../../../redux/dirMessage_reducer";
|
||||
import {isEmpty} from "../../../utils/ObjectUtils";
|
||||
import {fileDirFormat} from "../../../utils/PathOperate";
|
||||
import {newDir} from "@/utils/File";
|
||||
import {dirDirAdd} from "@/redux/dirMessage_reducer";
|
||||
import {isEmpty} from "@/utils/ObjectUtils";
|
||||
import {fileDirFormat} from "@/utils/PathOperate";
|
||||
|
||||
const DirAddDir = (prop) => {
|
||||
console.log("prop",prop)
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import React, {useRef, useState} from 'react';
|
||||
import {Input, message, Modal} from 'antd';
|
||||
import {useDispatch, useSelector} from "react-redux";
|
||||
import {newFile} from "../../../utils/File";
|
||||
import {dirFileAdd} from "../../../redux/dirMessage_reducer";
|
||||
import {addTableBarItem} from "../../../redux/tableBarItem_reducer";
|
||||
import {isEmpty} from "../../../utils/ObjectUtils";
|
||||
import {fileNameFormat, fullFileNameFormat} from "../../../utils/PathOperate";
|
||||
import {newFile} from "@/utils/File";
|
||||
import {dirFileAdd} from "@/redux/dirMessage_reducer";
|
||||
import {addTableBarItem} from "@/redux/tableBarItem_reducer";
|
||||
import {isEmpty} from "@/utils/ObjectUtils";
|
||||
import {fileNameFormat, fullFileNameFormat} from "@/utils/PathOperate";
|
||||
|
||||
const DirAddFile = (prop) => {
|
||||
console.log("prop",prop)
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import React from 'react';
|
||||
import {Popconfirm} from 'antd';
|
||||
import {deleteFileAndDir} from "../../../utils/File";
|
||||
import {deleteFileAndDir} from "@/utils/File";
|
||||
import {useDispatch, useSelector} from "react-redux";
|
||||
import {dirFileRemove} from "../../../redux/dirMessage_reducer";
|
||||
import {removeTableBarItem, setActiveKey} from "../../../redux/tableBarItem_reducer";
|
||||
import {dirFileRemove} from "@/redux/dirMessage_reducer";
|
||||
import {removeTableBarItem, setActiveKey} from "@/redux/tableBarItem_reducer";
|
||||
const DirDeleteFile = (prop) => {
|
||||
console.log("prop",prop)
|
||||
const dispatch= useDispatch()
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
import React from 'react';
|
||||
import {openInDir} from "@/utils/File"
|
||||
const OpenInDir = (prop) => {
|
||||
return <a className="menuItemClick" onClick={()=>openInDir(prop)}>文件夹中打开</a>
|
||||
};
|
||||
export default OpenInDir;
|
|
@ -1,10 +1,10 @@
|
|||
import React, {useRef, useState} from 'react';
|
||||
import {Input, Menu, Modal} from 'antd';
|
||||
import {updateFileName} from "../../../utils/File";
|
||||
import {updateFileName} from "@/utils/File";
|
||||
import {useDispatch} from "react-redux";
|
||||
import {updateFileName as updateFileNameRedux} from "../../../redux/dirMessage_reducer";
|
||||
import {updateFileName as updateFileNameBar} from "../../../redux/tableBarItem_reducer";
|
||||
import {replaceFileNameByFilePath} from "../../../utils/PathOperate";
|
||||
import {replaceFileNameByFilePath} from "@/utils/PathOperate";
|
||||
|
||||
const UpdateFileName = (prop) => {
|
||||
console.log("prop",prop)
|
||||
|
|
|
@ -2,13 +2,13 @@ import React, {Fragment, useEffect, useMemo, useState} from 'react';
|
|||
import {Input, Menu, Tree} from 'antd';
|
||||
import {FolderOutlined, FileMarkdownOutlined, FileOutlined} from '@ant-design/icons';
|
||||
import "./index.less"
|
||||
import {getFileDirByPath, getFileFullNameByPath, getFileNameByPath} from "../../utils/PathOperate";
|
||||
import {getFileDirByPath, getFileFullNameByPath, getFileNameByPath} from "@/utils/PathOperate";
|
||||
const {Search} = Input;
|
||||
import {useSelector, useDispatch} from "react-redux";
|
||||
import {addExpandedKeys, addTableBarItem, setExpandedKeys} from "../../redux/tableBarItem_reducer";
|
||||
import {readDir} from "../../utils/File";
|
||||
import {addExpandedKeys, addTableBarItem, setExpandedKeys} from "@/redux/tableBarItem_reducer";
|
||||
import {readDir} from "@/utils/File";
|
||||
import {nextDirAdd,refreshDir as refreshDirReducer} from "../../redux/dirMessage_reducer";
|
||||
import {isEmpty} from "../../utils/ObjectUtils";
|
||||
import {isEmpty} from "@/utils/ObjectUtils";
|
||||
import UpdateFileName from "./UpdateFileName";
|
||||
import RefreshDir from "./RefreshDir";
|
||||
import CloseDir from "./CloseDir";
|
||||
|
@ -17,6 +17,7 @@ import DirDeleteFile from "./DirDeleteFile";
|
|||
import DirAddDir from "./DirAddDir";
|
||||
import {createPortal} from "react-dom";
|
||||
import {isArray} from "@craco/craco/lib/utils";
|
||||
import OpenInDir from "@/components/ItemTree/OpenInDir";
|
||||
// 将树平铺用于查找
|
||||
const dataList = [];
|
||||
const generateList = (data) => {
|
||||
|
@ -319,6 +320,7 @@ const ItemTree = (prop) => {
|
|||
menuItem.push(getMenuItem('5',<UpdateFileName fileName={title} filePath={key}/>))
|
||||
menuItem.push(getMenuItem('6',<DirDeleteFile filePath={key} />))
|
||||
}
|
||||
menuItem.push(getMenuItem('7',<OpenInDir filePath={key} />))
|
||||
return <Fragment>
|
||||
{createPortal(
|
||||
<Menu style={tmpStyle} onClick={e =>
|
||||
|
|
Before Width: | Height: | Size: 613 B After Width: | Height: | Size: 613 B |
Before Width: | Height: | Size: 708 B After Width: | Height: | Size: 708 B |
Before Width: | Height: | Size: 469 B After Width: | Height: | Size: 469 B |
Before Width: | Height: | Size: 338 B After Width: | Height: | Size: 338 B |
Before Width: | Height: | Size: 400 B After Width: | Height: | Size: 400 B |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 742 B After Width: | Height: | Size: 742 B |
Before Width: | Height: | Size: 729 B After Width: | Height: | Size: 729 B |
Before Width: | Height: | Size: 376 B After Width: | Height: | Size: 376 B |
Before Width: | Height: | Size: 956 B After Width: | Height: | Size: 956 B |
Before Width: | Height: | Size: 423 B After Width: | Height: | Size: 423 B |
Before Width: | Height: | Size: 565 B After Width: | Height: | Size: 565 B |
Before Width: | Height: | Size: 393 B After Width: | Height: | Size: 393 B |
Before Width: | Height: | Size: 446 B After Width: | Height: | Size: 446 B |
Before Width: | Height: | Size: 258 B After Width: | Height: | Size: 258 B |
Before Width: | Height: | Size: 458 B After Width: | Height: | Size: 458 B |
Before Width: | Height: | Size: 622 B After Width: | Height: | Size: 622 B |
Before Width: | Height: | Size: 304 B After Width: | Height: | Size: 304 B |
Before Width: | Height: | Size: 595 B After Width: | Height: | Size: 595 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 327 B After Width: | Height: | Size: 327 B |
Before Width: | Height: | Size: 555 B After Width: | Height: | Size: 555 B |
Before Width: | Height: | Size: 310 B After Width: | Height: | Size: 310 B |
|
@ -31,7 +31,8 @@ import TableCellActionMenuPlugin from '@/pages/Note/Hlexical/plugins/TableAction
|
|||
import ExcalidrawPlugin from "@/pages/Note/Hlexical/plugins/ExcalidrawPlugin";
|
||||
import TableOfContentsPlugin from "@/pages/Note/Hlexical/plugins/TableOfContentsPlugin";
|
||||
import ContextMenuPlugin from "@/pages/Note/Hlexical/plugins/ContextMenuPlugin"
|
||||
import {Spin} from "antd";
|
||||
import {Spin,FloatButton } from "antd";
|
||||
import { CommentOutlined, CustomerServiceOutlined } from '@ant-design/icons';
|
||||
import {useState} from "react";
|
||||
import DragDropPaste from "@/pages/Note/Hlexical/plugins/DragDropPastePlugin";
|
||||
import TreeViewPlugin from "@/pages/Note/Hlexical/plugins/TreeViewPlugin";
|
||||
|
@ -114,6 +115,17 @@ export default function Hlexical(props) {
|
|||
<SaveFilePlugin filePath={props.filePath}/>
|
||||
{/*文件操作导入文件*/}
|
||||
{/*<ActionPlugin/>*/}
|
||||
<FloatButton.Group
|
||||
trigger="hover"
|
||||
type="primary"
|
||||
style={{
|
||||
right: 94,
|
||||
}}
|
||||
icon={<CustomerServiceOutlined />}
|
||||
>
|
||||
<FloatButton />
|
||||
<FloatButton icon={<CommentOutlined />} />
|
||||
</FloatButton.Group>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
const fs = window.require("fs").promises
|
||||
const {ipcRenderer} = window.require('electron')
|
||||
const {ipcRenderer,dialog} = window.require('electron')
|
||||
const pathOp = window.require("path")
|
||||
export async function readDir(filePath){
|
||||
const files = await fs.readdir(filePath);
|
||||
|
@ -51,4 +51,8 @@ export async function updateFileName(oldFileName,newFileName){
|
|||
|
||||
export async function saveFileWithName(){
|
||||
return ipcRenderer.invoke("saveFileWithName" )
|
||||
}
|
||||
|
||||
export async function openInDir(filePath){
|
||||
return dialog.showOpenDialog({defaultPath:"filePath",properties: ['openDirectory']} )
|
||||
}
|