diff --git a/src/main/main.ts b/src/main/main.ts index 523f9ce..df7587c 100644 --- a/src/main/main.ts +++ b/src/main/main.ts @@ -17,6 +17,11 @@ if (require('electron-squirrel-startup')) { app.quit(); } +const WindowSizeMap = { + minimized: { width: 400, height: 220 }, + normal: { width: 400, height: 720 }, +}; + const createWindow = () => { // Create the browser window. const mainWindow = new BrowserWindow({ @@ -24,10 +29,10 @@ const createWindow = () => { preload: path.join(__dirname, 'preload.js'), webSecurity: false, }, - width: 400, - minWidth: 400, - height: 800, - minHeight: 800, + width: WindowSizeMap.normal.width, + minWidth: WindowSizeMap.normal.width, + height: WindowSizeMap.normal.height, + minHeight: WindowSizeMap.normal.height, title: '', titleBarStyle: 'hidden', }); @@ -153,11 +158,11 @@ app.whenReady().then(() => { }); ipcMain.handle('set-minimized', (event, isMinimized: boolean) => { if (isMinimized) { - mainWindow?.setMinimumSize(400, 220); - mainWindow?.setSize(400, 220); + mainWindow?.setMinimumSize(WindowSizeMap.minimized.width, WindowSizeMap.minimized.height); + mainWindow?.setSize(WindowSizeMap.minimized.width, WindowSizeMap.minimized.height); } else { - mainWindow?.setMinimumSize(400, 800); - mainWindow?.setSize(400, 800); + mainWindow?.setMinimumSize(WindowSizeMap.normal.width, WindowSizeMap.normal.height); + mainWindow?.setSize(WindowSizeMap.normal.width, WindowSizeMap.normal.height); } }); }); diff --git a/src/renderer/pages/mycat.tsx b/src/renderer/pages/mycat.tsx index 2e2b4b2..916fcaf 100644 --- a/src/renderer/pages/mycat.tsx +++ b/src/renderer/pages/mycat.tsx @@ -43,27 +43,25 @@ const MyCat = () => { navigate(PATH.MY_PAGE)} /> -
-
- +
+ + + - - -
- -
+
+
diff --git a/src/renderer/pages/naming.tsx b/src/renderer/pages/naming.tsx index f2210d8..4c8a5bc 100644 --- a/src/renderer/pages/naming.tsx +++ b/src/renderer/pages/naming.tsx @@ -44,39 +44,40 @@ const Naming = () => { -
-
- +
+ { clickCatInput?.fire(); }} /> -
- - setTypedCatName(e.target.value)} - /> - {errorMessage && ( -
-
- {errorMessage} -
+ + +
+ + setTypedCatName(e.target.value)} + /> + {errorMessage && ( +
+
+ {errorMessage}
- )} -
+
+ )}
+