Skip to content

Commit a658b23

Browse files
committed
feat:编辑配置文件
1 parent eeb0c8a commit a658b23

6 files changed

Lines changed: 10 additions & 8 deletions

File tree

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@
4040
"nodemon": "^2.0.22",
4141
"react": "^17.0.2",
4242
"react-dom": "^17.0.2",
43+
"react-virtualized": "^9.22.5",
44+
"react-window": "^1.8.9",
4345
"typescript": "^5.1.6",
4446
"vite": "^4.3.9",
45-
"vite-plugin-react-virtualized": "^1.0.4",
46-
"react-virtualized": "^9.22.5",
47-
"react-window": "^1.8.9"
47+
"vite-plugin-react-virtualized": "^1.0.4"
4848
},
4949
"build": {
5050
"files": [

resources/config.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/view/controller/test.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import { config, roConfig } from "../services/config";
2+
23
import { getUsableLetter } from "../utils/disk/diskInfo";
34
import { setThemeMode } from "./setting/themeMode";
45

56
export async function AppTest(){
6-
console.log(config);
7+
/* console.log(config);
78
console.log(roConfig);
8-
console.log(await getUsableLetter());
9-
9+
console.log(await getUsableLetter()); */
10+
1011
}

src/view/page/setting.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { checkHPMFiles } from '../controller/hpm/checkHpmFiles';
77
import { updateState } from '../controller/init';
88
import { AppTest } from '../controller/test';
99
import { setThemeMode } from '../controller/setting/themeMode';
10+
import { runCmdSync } from '../utils/command';
1011
const { shell, ipcRenderer } = require('electron')
1112

1213
const { Text, Paragraph, Title } = Typography;
@@ -136,6 +137,7 @@ export default function Setting(props: any) {
136137
<Card style={{ marginBottom: "20px" }} title='工具' >
137138
<Button onClick={() => { ipcRenderer.send('windows:openDevTools') }}>打开开发工具</Button>
138139
<Button style={{ marginLeft: '8px' }} onClick={() => { AppTest() }}>测试</Button>
140+
<Button style={{ marginLeft: '8px' }} onClick={() => { runCmdSync('notepad.exe ./resources/config.json') }}>编辑配置文件</Button>
139141
</Card>
140142
</Collapse.Panel>
141143
</Collapse>

src/view/utils/aria2/downloader.ts

Whitespace-only changes.

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"moduleResolution": "bundler",
1111
"allowImportingTsExtensions": true,
1212
"resolveJsonModule": true,
13-
"isolatedModules": true,
13+
"isolatedModules": false,
1414
"noEmit": true,
1515
"jsx": "react-jsx",
1616

0 commit comments

Comments
 (0)