Commit 7d408f0b authored by rocosen's avatar rocosen

fix:bug

parent 2dee1a5c
...@@ -236,7 +236,7 @@ ...@@ -236,7 +236,7 @@
] ]
}, },
"nsis": { "nsis": {
"include": "build/installer.nsh", "include": "",
"oneClick": false, "oneClick": false,
"perMachine": true, "perMachine": true,
"allowElevation": true, "allowElevation": true,
......
...@@ -98,7 +98,7 @@ ipcMain.on('resize-home', (event) => { ...@@ -98,7 +98,7 @@ ipcMain.on('resize-home', (event) => {
homeWindown.loadURL(resolveHtmlPath(`index.html#/home`)); homeWindown.loadURL(resolveHtmlPath(`index.html#/home`));
positioner.position(homeWindown, tray.getBounds(), alignment); positioner.position(homeWindown, tray.getBounds(), alignment);
isDev && homeWindown.webContents.openDevTools(); isDev && homeWindown.webContents.openDevTools();
homeWindown.webContents.openDevTools(); // homeWindown.webContents.openDevTools();
homeWindown.once('ready-to-show', () => { homeWindown.once('ready-to-show', () => {
homeWindown?.show(); homeWindown?.show();
}); });
...@@ -156,6 +156,7 @@ const createWindow = async () => { ...@@ -156,6 +156,7 @@ const createWindow = async () => {
frame: true, frame: true,
resizable: false, resizable: false,
titleBarStyle: 'hidden', titleBarStyle: 'hidden',
titleBarOverlay: true,
// autoHideMenuBar: true, // autoHideMenuBar: true,
webPreferences: { webPreferences: {
sandbox: false, sandbox: false,
......
...@@ -15,7 +15,7 @@ body { ...@@ -15,7 +15,7 @@ body {
); */ ); */
font-family: sans-serif; font-family: sans-serif;
overflow-y: hidden; overflow-y: hidden;
-webkit-app-region: drag; /* -webkit-app-region: drag; */
/* display: flex; /* display: flex;
justify-content: center; justify-content: center;
align-items: center; */ align-items: center; */
......
...@@ -30,6 +30,7 @@ const useStyles = makeStyles()((theme) => { ...@@ -30,6 +30,7 @@ const useStyles = makeStyles()((theme) => {
width: '300px', width: '300px',
margin: '0 auto', margin: '0 auto',
paddingTop: '10%', paddingTop: '10%',
'-webkit-app-region': 'drag'
}, },
root: { root: {
height: '40px', height: '40px',
...@@ -102,9 +103,7 @@ export default (props) => { ...@@ -102,9 +103,7 @@ export default (props) => {
Constants.TOKEN_KEY, Constants.TOKEN_KEY,
JSON.stringify(response.data) JSON.stringify(response.data)
); );
getUserData(); getUserData();
navigate('/home');
electron.ipcRenderer.send('resize-home');
}) })
.catch(function (error) { .catch(function (error) {
localStorage.removeItem(Constants.TOKEN_KEY); localStorage.removeItem(Constants.TOKEN_KEY);
...@@ -122,6 +121,8 @@ export default (props) => { ...@@ -122,6 +121,8 @@ export default (props) => {
Constants.USER_INFO_TOKEN_KEY, Constants.USER_INFO_TOKEN_KEY,
JSON.stringify(data.res) JSON.stringify(data.res)
); );
navigate('/home');
electron.ipcRenderer.send('resize-home');
} }
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment