Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
netdisc
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rocosen
netdisc
Commits
1ac578a0
Commit
1ac578a0
authored
Nov 24, 2022
by
rocosen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:win
parent
fbd7f48d
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
426 additions
and
74 deletions
+426
-74
index.jsx
src/commons/routes/index.jsx
+2
-2
api_address.js
src/commons/utils/api_address.js
+2
-2
test.js
src/commons/utils/test.js
+18
-0
main.ts
src/main/main.ts
+52
-6
App.jsx
src/renderer/App.jsx
+1
-6
head.jsx
src/renderer/components/head.jsx
+83
-3
mount.jsx
src/renderer/components/mount.jsx
+3
-2
preference.jsx
src/renderer/components/preference.jsx
+107
-0
tab.jsx
src/renderer/components/tab.jsx
+68
-0
home.jsx
src/renderer/console/home.jsx
+3
-1
initialization.jsx
src/renderer/console/initialization.jsx
+0
-48
login.jsx
src/renderer/console/login.jsx
+5
-4
site.jsx
src/renderer/console/site.jsx
+82
-0
No files found.
src/commons/routes/index.jsx
View file @
1ac578a0
import
Login
from
'../../renderer/console/login'
;
import
Login
from
'../../renderer/console/login'
;
import
Init
from
'../../renderer/console/initialization
'
;
import
Site
from
'../../renderer/console/site
'
;
import
Home
from
'../../renderer/console/home'
;
import
Home
from
'../../renderer/console/home'
;
...
@@ -8,7 +8,7 @@ import User from '../../renderer/console/userDetails';
...
@@ -8,7 +8,7 @@ import User from '../../renderer/console/userDetails';
var
indexRoutes
=
[
var
indexRoutes
=
[
{
exact
:
false
,
path
:
'/'
,
name
:
'Page'
,
component
:
<
Login
/>
},
//登录页面
{
exact
:
false
,
path
:
'/'
,
name
:
'Page'
,
component
:
<
Login
/>
},
//登录页面
{
exact
:
false
,
path
:
'/
init'
,
name
:
'Page2'
,
component
:
<
Init
/>
},
//初始化
{
exact
:
false
,
path
:
'/
site'
,
name
:
'Page2'
,
component
:
<
Site
/>
},
//设置
{
exact
:
false
,
path
:
'/home'
,
name
:
'Page0'
,
component
:
<
Home
/>
},
//主页面
{
exact
:
false
,
path
:
'/home'
,
name
:
'Page0'
,
component
:
<
Home
/>
},
//主页面
{
exact
:
false
,
path
:
'/details'
,
name
:
'Page4'
,
component
:
<
User
/>
},
//账号详情
{
exact
:
false
,
path
:
'/details'
,
name
:
'Page4'
,
component
:
<
User
/>
},
//账号详情
];
];
...
...
src/commons/utils/api_address.js
View file @
1ac578a0
const
BACKEND_API_URI_PREFIX
=
'https://www.cloudam.cn'
;
//
const BACKEND_API_URI_PREFIX = 'https://www.cloudam.cn';
//const BACKEND_API_URI_PREFIX = 'http://47.57.4.97'
//const BACKEND_API_URI_PREFIX = 'http://47.57.4.97'
//
const BACKEND_API_URI_PREFIX = 'http://47.75.104.171';
const
BACKEND_API_URI_PREFIX
=
'http://47.75.104.171'
;
export
{
BACKEND_API_URI_PREFIX
};
export
{
BACKEND_API_URI_PREFIX
};
src/commons/utils/test.js
0 → 100644
View file @
1ac578a0
const
child_process
=
require
(
'child_process'
);
let
child
=
child_process
.
spawn
(
'go'
,
[
'run'
,
'gochild.go'
],
{
stdio
:
[
0
,
1
,
2
,
'ipc'
],
});
child
.
on
(
'close'
,
(
code
)
=>
{
process
.
exit
(
code
);
});
child
.
send
({
hello
:
'child'
});
child
.
on
(
'message'
,
function
(
msg
,
handle
)
{
if
(
msg
.
hello
===
'parent'
)
{
console
.
log
(
msg
);
process
.
exit
(
0
);
}
process
.
exit
(
1
);
});
src/main/main.ts
View file @
1ac578a0
...
@@ -24,16 +24,41 @@ class AppUpdater {
...
@@ -24,16 +24,41 @@ class AppUpdater {
}
}
let
mainWindow
:
BrowserWindow
|
null
=
null
;
let
mainWindow
:
BrowserWindow
|
null
=
null
;
let
win
:
BrowserWindow
|
null
=
null
;
ipcMain
.
on
(
'resize-init'
,
(
event
)
=>
{
ipcMain
.
on
(
'resize-site'
,
(
event
)
=>
{
if
(
mainWindow
)
{
if
(
win
)
{
mainWindow
.
setContentSize
(
490
,
354
);
win
.
loadFile
(
'index.html/site'
);
// mainWindow.setResizable(true);
mainWindow
.
setMaximizable
(
false
);
// mainWindow.center();
}
}
});
});
ipcMain
.
on
(
'createNewWindow'
,
()
=>
{
win
=
new
BrowserWindow
({
width
:
546
,
height
:
425
,
minWidth
:
100
,
minHeight
:
100
,
frame
:
true
,
resizable
:
false
,
webPreferences
:
{
sandbox
:
false
,
nodeIntegration
:
true
,
contextIsolation
:
false
,
webSecurity
:
false
,
},
// parent: win, //win是主窗口
});
// win.loadURL(path.join('file:', __dirname, 'new.html')); //new.html是新开窗口的渲染进程
win
.
loadURL
(
'http://localhost:1212/#/site'
);
// win.loadFile(path.join(__dirname));
// win.loadFile('./index.html', {
// hash: 'site',
// });
win
.
on
(
'closed'
,
()
=>
{
win
=
null
;
});
});
ipcMain
.
on
(
'resize-home'
,
(
event
)
=>
{
ipcMain
.
on
(
'resize-home'
,
(
event
)
=>
{
if
(
mainWindow
)
{
if
(
mainWindow
)
{
mainWindow
.
setContentSize
(
350
,
425
);
mainWindow
.
setContentSize
(
350
,
425
);
...
@@ -43,6 +68,10 @@ ipcMain.on('resize-home', (event) => {
...
@@ -43,6 +68,10 @@ ipcMain.on('resize-home', (event) => {
}
}
});
});
ipcMain
.
on
(
'window-close'
,
(
event
)
=>
{
app
.
quit
();
});
if
(
process
.
env
.
NODE_ENV
===
'production'
)
{
if
(
process
.
env
.
NODE_ENV
===
'production'
)
{
const
sourceMapSupport
=
require
(
'source-map-support'
);
const
sourceMapSupport
=
require
(
'source-map-support'
);
sourceMapSupport
.
install
();
sourceMapSupport
.
install
();
...
@@ -98,6 +127,23 @@ const createWindow = async () => {
...
@@ -98,6 +127,23 @@ const createWindow = async () => {
},
},
});
});
// win = new BrowserWindow({
// show: true,
// width: 546,
// height: 425,
// minWidth: 100,
// minHeight: 100,
// icon: getAssetPath('icon.png'),
// frame: true,
// resizable: false,
// webPreferences: {
// sandbox: false,
// nodeIntegration: true,
// contextIsolation: false,
// webSecurity: false,
// },
// });
mainWindow
.
loadURL
(
resolveHtmlPath
(
'index.html'
));
mainWindow
.
loadURL
(
resolveHtmlPath
(
'index.html'
));
mainWindow
.
on
(
'ready-to-show'
,
()
=>
{
mainWindow
.
on
(
'ready-to-show'
,
()
=>
{
...
...
src/renderer/App.jsx
View file @
1ac578a0
import
{
import
{
HashRouter
as
Router
,
Route
,
Switch
,
Routes
}
from
'react-router-dom'
;
MemoryRouter
as
Router
,
Route
,
Switch
,
Routes
,
}
from
'react-router-dom'
;
import
{
Switch
}
from
'react-router-dom'
;
import
{
Switch
}
from
'react-router-dom'
;
import
icon
from
'../../assets/icon.svg'
;
import
icon
from
'../../assets/icon.svg'
;
import
{
createBrowserHistory
}
from
'history'
;
import
{
createBrowserHistory
}
from
'history'
;
...
...
src/renderer/components/head.jsx
View file @
1ac578a0
...
@@ -23,6 +23,9 @@ import commandIcon from '../../commons/assets/img/commandIcon.svg';
...
@@ -23,6 +23,9 @@ import commandIcon from '../../commons/assets/img/commandIcon.svg';
import
homeIcon
from
'../../commons/assets/img/homeIcon.svg'
;
import
homeIcon
from
'../../commons/assets/img/homeIcon.svg'
;
import
siteIcon
from
'../../commons/assets/img/siteIcon.svg'
;
import
siteIcon
from
'../../commons/assets/img/siteIcon.svg'
;
const
{
ipcRenderer
}
=
require
(
'electron'
);
const
electron
=
window
.
require
(
'electron'
);
const
useStyles
=
makeStyles
()((
theme
)
=>
{
const
useStyles
=
makeStyles
()((
theme
)
=>
{
return
{
return
{
headBody
:
{
headBody
:
{
...
@@ -54,7 +57,31 @@ const useStyles = makeStyles()((theme) => {
...
@@ -54,7 +57,31 @@ const useStyles = makeStyles()((theme) => {
},
},
rightBox
:
{
rightBox
:
{
display
:
'flex'
,
display
:
'flex'
,
// alignItems: 'end',
},
siteBox
:
{
width
:
'176px'
,
height
:
'116px'
,
background
:
'#FFFFFF'
,
boxShadow
:
'0px 4px 10px 0px rgba(25,37,61,0.24)'
,
borderRadius
:
'8px'
,
border
:
'2px solid rgba(255,255,255,0.65)'
,
position
:
'absolute'
,
top
:
'40px'
,
right
:
'20px'
,
zIndex
:
'100'
,
},
siteText
:
{
fontSize
:
'14px'
,
color
:
'#1E2633'
,
cursor
:
'pointer'
,
padding
:
'0 16px'
,
// marginTop: '12px',
display
:
'flex'
,
alignItems
:
'center'
,
height
:
'24px'
,
'&:hover'
:
{
background
:
'#F0F2F5'
,
},
},
},
};
};
});
});
...
@@ -74,9 +101,19 @@ export default (props) => {
...
@@ -74,9 +101,19 @@ export default (props) => {
const
[
level
,
setLevel
]
=
useState
(
props
.
level
);
const
[
level
,
setLevel
]
=
useState
(
props
.
level
);
const
[
hover
,
setHover
]
=
useState
(
false
);
const
[
hover
,
setHover
]
=
useState
(
false
);
const
[
open
,
setOpen
]
=
useState
(
false
);
const
iconClick
=
(
e
)
=>
{
const
iconClick
=
(
e
)
=>
{
console
.
log
(
'e: '
,
e
);
console
.
log
(
'e: '
,
e
);
switch
(
e
)
{
case
'1'
:
return
;
case
'5'
:
setOpen
(
true
);
return
;
default
:
return
;
}
};
};
return
(
return
(
...
@@ -101,8 +138,8 @@ export default (props) => {
...
@@ -101,8 +138,8 @@ export default (props) => {
className=
{
classes
.
name
}
className=
{
classes
.
name
}
sx=
{
{
color
:
hover
?
'#1370FF'
:
'#1E2633'
}
}
sx=
{
{
color
:
hover
?
'#1370FF'
:
'#1E2633'
}
}
>
>
{
/* {getUserInfo().name} */
}
{
getUserInfo
().
name
}
yaojierui100@gamil.com
{
/* yaojierui100@gamil.com */
}
</
Grid
>
</
Grid
>
<
Grid
sx=
{
{
fontSize
:
'12px'
,
color
:
'#B7B9BD'
}
}
>
<
Grid
sx=
{
{
fontSize
:
'12px'
,
color
:
'#B7B9BD'
}
}
>
已用200TB
已用200TB
...
@@ -149,6 +186,49 @@ export default (props) => {
...
@@ -149,6 +186,49 @@ export default (props) => {
</
Tooltip
>
</
Tooltip
>
);
);
})
}
})
}
<
Grid
sx=
{
{
display
:
open
?
'block'
:
'none'
}
}
onMouseLeave=
{
(
e
)
=>
setOpen
(
false
)
}
className=
{
classes
.
siteBox
}
>
<
Grid
className=
{
classes
.
siteText
}
sx=
{
{
margin
:
'8px 0px 6px 0px'
}
}
onClick=
{
()
=>
{
// navigate('/site');
// electron.ipcRenderer.send('resize-site');
electron
.
ipcRenderer
.
send
(
'createNewWindow'
);
}
}
>
云盘设置
</
Grid
>
<
Grid
className=
{
classes
.
siteText
}
onClick=
{
()
=>
{
// navigate('/site');
electron
.
ipcRenderer
.
send
(
'resize-site'
);
}
}
>
偏好设置
</
Grid
>
<
Grid
sx=
{
{
width
:
'176px'
,
height
:
'1px'
,
border
:
'1px solid #EDEFF2'
,
margin
:
'10px 0px 8px 0px'
,
}
}
></
Grid
>
<
Grid
className=
{
classes
.
siteText
}
onClick=
{
()
=>
{
electron
.
ipcRenderer
.
send
(
'window-close'
);
}
}
>
退出应用
</
Grid
>
</
Grid
>
</
Grid
>
</
Grid
>
</
Grid
>
</
Grid
>
);
);
...
...
src/renderer/components/mount.jsx
View file @
1ac578a0
...
@@ -22,8 +22,9 @@ const useStyles = makeStyles()((theme) => {
...
@@ -22,8 +22,9 @@ const useStyles = makeStyles()((theme) => {
alignItems
:
'flex-start'
,
alignItems
:
'flex-start'
,
flexDirection
:
'column'
,
flexDirection
:
'column'
,
width
:
'300px'
,
width
:
'300px'
,
margin
:
'0 auto'
,
// margin: '0 auto',
marginTop
:
'8%'
,
marginTop
:
'1.5%'
,
marginLeft
:
'24px'
,
},
},
title
:
{
title
:
{
fontSize
:
'16px'
,
fontSize
:
'16px'
,
...
...
src/renderer/components/preference.jsx
0 → 100644
View file @
1ac578a0
import
React
,
{
useState
}
from
'react'
;
//js
import
public
from
'commons/public'
;
//ui
import
TextField
from
'@mui/material/TextField'
;
import
{
Grid
}
from
'@mui/material'
;
import
FormControlLabel
from
'@mui/material/FormControlLabel'
;
import
Checkbox
from
'@mui/material/Checkbox'
;
import
{
makeStyles
}
from
'tss-react/mui'
;
import
FolderOpenIcon
from
'@mui/icons-material/FolderOpen'
;
import
file
from
'../../commons/assets/img/file.svg'
;
const
useStyles
=
makeStyles
()((
theme
)
=>
{
return
{
preferenceBody
:
{
display
:
'flex'
,
alignItems
:
'flex-start'
,
flexDirection
:
'column'
,
width
:
'300px'
,
marginTop
:
'1.5%'
,
marginLeft
:
'24px'
,
},
title
:
{
fontSize
:
'16px'
,
fontWeight
:
'600'
,
color
:
'#1E2633'
,
marginBottom
:
'16px'
,
},
};
});
export
default
(
props
)
=>
{
const
{
classes
}
=
useStyles
();
const
{
render
,
navigate
}
=
public
();
const
[
selfStart
,
setSelfStart
]
=
useState
(
false
);
const
handleChange
=
(
event
)
=>
{
setSelfStart
(
event
.
target
.
checked
);
};
return
(
<
Grid
className=
{
classes
.
preferenceBody
}
>
<
Grid
className=
{
classes
.
title
}
>
偏好设置
</
Grid
>
<
FormControlLabel
control=
{
<
Checkbox
checked=
{
selfStart
}
onChange=
{
handleChange
}
size=
"small"
/>
}
label=
{
<
Grid
sx=
{
{
color
:
'#1E2633'
,
fontSize
:
'14px'
}
}
>
开机时运行北鲲云盘
</
Grid
>
}
/>
<
Grid
sx=
{
{
marginTop
:
'8px'
}
}
>
<
Grid
sx=
{
{
color
:
'#1E2633'
,
fontSize
:
'14px'
,
marginBottom
:
'10px'
,
}
}
>
本地缓存的文件目录
</
Grid
>
<
Grid
sx=
{
{
display
:
'flex'
,
alignItems
:
'center'
,
}
}
>
<
img
src=
{
file
}
alt=
""
/>
<
Grid
sx=
{
{
color
:
'#8A9099'
,
fontSize
:
'14px'
,
marginLeft
:
'10px'
,
}
}
>
C:\Users\…\Desktopopsjw
</
Grid
>
<
Grid
sx=
{
{
color
:
'#1370FF'
,
fontSize
:
'14px'
,
marginLeft
:
'16px'
,
cursor
:
'pointer'
,
}
}
onClick=
{
(
event
)
=>
{
event
.
stopPropagation
();
console
.
log
(
'222222222'
);
}
}
>
更改
</
Grid
>
</
Grid
>
</
Grid
>
</
Grid
>
);
};
src/renderer/components/tab.jsx
0 → 100644
View file @
1ac578a0
import
React
,
{
useState
}
from
'react'
;
import
Tabs
from
'@mui/material/Tabs'
;
import
Tab
from
'@mui/material/Tab'
;
import
{
Grid
}
from
'@mui/material'
;
import
{
makeStyles
}
from
'tss-react/mui'
;
const
useStyles
=
makeStyles
()((
theme
)
=>
{
return
{
indicator
:
{
height
:
'3px'
,
},
tabRoot
:
{
opacity
:
'1'
,
minWidth
:
'50%'
,
boxShadow
:
'none'
,
'&:hover'
:
{
transform
:
'inherit'
,
backgroundColor
:
'#F5F6F7'
,
},
},
flexContainer
:
{
// justifyContent: 'space-around',
},
line
:
{
width
:
'100%'
,
height
:
'1px'
,
border
:
'1px solid #EDEFF2'
,
},
};
});
export
default
(
props
)
=>
{
const
{
classes
}
=
useStyles
();
const
[
value
,
setValue
]
=
useState
(
'one'
);
const
handleChange
=
(
event
,
newValue
)
=>
{
setValue
(
newValue
);
};
return
(
<
Grid
sx=
{
{
width
:
'100%'
,
marginTop
:
'5px'
}
}
>
<
Tabs
value=
{
value
}
onChange=
{
handleChange
}
classes=
{
{
indicator
:
classes
.
indicator
,
flexContainer
:
classes
.
flexContainer
,
}
}
>
<
Tab
value=
"one"
label=
{
<
Grid
>
传输
</
Grid
>
}
classes=
{
{
root
:
classes
.
tabRoot
,
}
}
/>
<
Tab
value=
"two"
label=
{
<
Grid
>
通知
</
Grid
>
}
classes=
{
{
root
:
classes
.
tabRoot
,
}
}
/>
</
Tabs
>
<
Grid
className=
{
classes
.
line
}
></
Grid
>
</
Grid
>
);
};
src/renderer/console/home.jsx
View file @
1ac578a0
import
React
from
'react'
;
import
React
from
'react'
;
import
public
from
'commons/public'
;
import
public
from
'commons/public'
;
import
Head
from
'../components/head'
;
import
Head
from
'../components/head'
;
import
Tab
from
'../components/tab'
;
import
{
Button
,
Grid
}
from
'@mui/material'
;
import
{
Button
,
Grid
}
from
'@mui/material'
;
import
{
makeStyles
}
from
'tss-react/mui'
;
import
{
makeStyles
}
from
'tss-react/mui'
;
...
@@ -21,7 +22,8 @@ export default (props) => {
...
@@ -21,7 +22,8 @@ export default (props) => {
return
(
return
(
<
Grid
className=
{
classes
.
initBody
}
>
<
Grid
className=
{
classes
.
initBody
}
>
<
Head
level=
{
false
}
/>
<
Head
level=
{
false
}
/>
<
Grid
>
11111111111111111
</
Grid
>
<
Tab
/>
{
/* <Grid>11111111111111111</Grid> */
}
</
Grid
>
</
Grid
>
);
);
};
};
src/renderer/console/initialization.jsx
deleted
100644 → 0
View file @
fbd7f48d
import
React
from
'react'
;
import
public
from
'commons/public'
;
import
Mount
from
'../components/mount'
;
import
{
Button
,
Grid
}
from
'@mui/material'
;
import
{
makeStyles
}
from
'tss-react/mui'
;
const
{
ipcRenderer
}
=
require
(
'electron'
);
const
electron
=
window
.
require
(
'electron'
);
const
useStyles
=
makeStyles
()((
theme
)
=>
{
return
{
initBody
:
{
display
:
'flex'
,
flexDirection
:
'column'
,
alignItems
:
'center'
,
},
rootButton
:
{
backgroundColor
:
'#1370FF'
,
boxShadow
:
'none !important'
,
color
:
'#ffffff'
,
'&:hover'
:
{
backgroundColor
:
'#0055D9'
,
transform
:
'inherit'
},
},
};
});
export
default
(
props
)
=>
{
const
{
classes
}
=
useStyles
();
const
{
render
,
navigate
}
=
public
();
return
(
<
Grid
className=
{
classes
.
initBody
}
>
<
Mount
/>
<
Button
variant=
"contained"
sx=
{
{
width
:
'300px'
,
marginTop
:
'24px'
}
}
classes=
{
{
root
:
classes
.
rootButton
,
}
}
onClick=
{
()
=>
{
navigate
(
'/home'
);
electron
.
ipcRenderer
.
send
(
'resize-home'
);
}
}
>
确定
</
Button
>
</
Grid
>
);
};
src/renderer/console/login.jsx
View file @
1ac578a0
...
@@ -98,14 +98,13 @@ export default (props) => {
...
@@ -98,14 +98,13 @@ export default (props) => {
};
};
axios
(
options
)
axios
(
options
)
.
then
(
function
(
response
)
{
.
then
(
function
(
response
)
{
console
.
log
(
'response: '
,
response
.
data
);
localStorage
.
setItem
(
localStorage
.
setItem
(
Constants
.
TOKEN_KEY
,
Constants
.
TOKEN_KEY
,
JSON
.
stringify
(
response
.
data
)
JSON
.
stringify
(
response
.
data
)
);
);
getUserData
();
getUserData
();
navigate
(
'/
init
'
);
navigate
(
'/
home
'
);
electron
.
ipcRenderer
.
send
(
'resize-
init
'
);
electron
.
ipcRenderer
.
send
(
'resize-
home
'
);
})
})
.
catch
(
function
(
error
)
{
.
catch
(
function
(
error
)
{
localStorage
.
removeItem
(
Constants
.
TOKEN_KEY
);
localStorage
.
removeItem
(
Constants
.
TOKEN_KEY
);
...
@@ -231,7 +230,9 @@ export default (props) => {
...
@@ -231,7 +230,9 @@ export default (props) => {
root
:
classes
.
rootButton
,
root
:
classes
.
rootButton
,
}
}
}
}
onClick=
{
()
=>
{
onClick=
{
()
=>
{
login
();
electron
.
ipcRenderer
.
send
(
'createNewWindow'
);
// login();
// navigate('/test');
// navigate('/test');
// electron.ipcRenderer.send('resize-init');
// electron.ipcRenderer.send('resize-init');
}
}
}
}
...
...
src/renderer/console/site.jsx
0 → 100644
View file @
1ac578a0
import
React
,
{
useState
}
from
'react'
;
import
public
from
'commons/public'
;
import
Mount
from
'../components/mount'
;
import
Preference
from
'../components/preference'
;
import
{
Button
,
Grid
}
from
'@mui/material'
;
import
{
makeStyles
}
from
'tss-react/mui'
;
const
{
ipcRenderer
}
=
require
(
'electron'
);
const
electron
=
window
.
require
(
'electron'
);
const
useStyles
=
makeStyles
()((
theme
)
=>
{
return
{
siteBody
:
{
display
:
'flex'
,
marginLeft
:
'-8px'
,
marginTop
:
'19px'
,
// flexDirection: 'column',
// alignItems: 'center',
},
text
:
{
display
:
'flex'
,
alignItems
:
'center'
,
color
:
'#1E2633'
,
width
:
'126px'
,
height
:
'36px'
,
// background: '#E8F0FE',
// borderRadius: '0px 100px 100px 0px',
fontSize
:
'14px'
,
paddingLeft
:
'20px'
,
cursor
:
'pointer'
,
},
checkText
:
{
display
:
'flex'
,
alignItems
:
'center'
,
color
:
'#1370FF'
,
width
:
'126px'
,
height
:
'36px'
,
background
:
'#E8F0FE'
,
borderRadius
:
'0px 100px 100px 0px'
,
fontSize
:
'14px'
,
paddingLeft
:
'20px'
,
cursor
:
'pointer'
,
},
// rootButton: {
// backgroundColor: '#1370FF',
// boxShadow: 'none !important',
// color: '#ffffff',
// '&:hover': { backgroundColor: '#0055D9', transform: 'inherit' },
// },
};
});
export
default
(
props
)
=>
{
const
{
classes
}
=
useStyles
();
const
{
render
,
navigate
}
=
public
();
const
[
check
,
setChecked
]
=
useState
(
'1'
);
return
(
<
Grid
className=
{
classes
.
siteBody
}
>
<
Grid
>
<
Grid
className=
{
check
===
'1'
?
classes
.
checkText
:
classes
.
text
}
onClick=
{
()
=>
{
setChecked
(
'1'
);
}
}
>
云盘设置
</
Grid
>
<
Grid
className=
{
check
===
'2'
?
classes
.
checkText
:
classes
.
text
}
onClick=
{
()
=>
{
setChecked
(
'2'
);
}
}
>
偏好设置
</
Grid
>
</
Grid
>
{
check
===
'1'
&&
<
Mount
/>
}
{
check
===
'2'
&&
<
Preference
/>
}
</
Grid
>
);
};
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment