forked from Surachai-kent/nxshell
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathapp.js
More file actions
56 lines (49 loc) · 1.37 KB
/
app.js
File metadata and controls
56 lines (49 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import React, {useState, useEffect} from 'react';
import Panel from './panel/panel'
import NewSSHDialogContents from './dialog/newssh';
import NewSettingContents from './dialog/setting';
import SSHView from './view/sshview';
const App = () => {
const [panelId, setPanelId] = useState(null);
useEffect(() => {
const fetchData = async () => {
const id = await window.electronAPI.panelCreatePanelId();
setPanelId(id);
};
fetchData();
}, []);
/**
* TODO:Feature1: 根据上一次的运行状态进行恢复(比如打开了哪些窗口,布局如何)
*/
/**
* 启动默认布局
*/
if (panelId == null)
return null;
/*
return (
<div>
<SSHView />
</div>
);
*/
return (
<div>
{/* 这里放置你的组件内容 */}
<Panel panelId={panelId} key="panel1"/>
</div>
)
//return (
// <Layout >
// <Content>
// {/* 内容部分 */}
// <div>
// {/* 这里放置你的组件内容 */}
// <Panel panelId={panelId} onSubmit={onSubmit}/>
// {views}
// </div>
// </Content>
// </Layout>
//)
};
export default App;