diff --git a/apps/stage-tamagotchi/src/main/index.ts b/apps/stage-tamagotchi/src/main/index.ts index ab85349a5..b0523aa6c 100644 --- a/apps/stage-tamagotchi/src/main/index.ts +++ b/apps/stage-tamagotchi/src/main/index.ts @@ -177,4 +177,28 @@ app.whenReady().then(() => { rebuildTrayMenu() createApplicationMenu(i18n, showQuitDialog, createSettingsWindow) }) + + ipcMain.on('start-resize-window', () => { + mainWindow.setResizable(true) + }) + + ipcMain.on('stop-resize-window', () => { + mainWindow.setResizable(false) + }) + + ipcMain.handle('stop-move-window', () => { + return mainWindow.getPosition() + }) + + ipcMain.on('window-size-changed', (_, width: number, height: number) => { + if (width === 0 || height === 0) { + mainWindow.setSize(300 * 1.5, 400 * 1.5) // back to default size + return + } + mainWindow.setSize(width, height) + }) + + ipcMain.on('window-position-changed', (_, x: number, y: number) => { + mainWindow.setPosition(x, y) + }) }) diff --git a/apps/stage-tamagotchi/src/renderer/src/App.vue b/apps/stage-tamagotchi/src/renderer/src/App.vue index 049ccfac7..531da5988 100644 --- a/apps/stage-tamagotchi/src/renderer/src/App.vue +++ b/apps/stage-tamagotchi/src/renderer/src/App.vue @@ -1,11 +1,20 @@ diff --git a/apps/stage-tamagotchi/src/renderer/src/pages/index.vue b/apps/stage-tamagotchi/src/renderer/src/pages/index.vue index f728450e5..214ca0c2f 100644 --- a/apps/stage-tamagotchi/src/renderer/src/pages/index.vue +++ b/apps/stage-tamagotchi/src/renderer/src/pages/index.vue @@ -71,6 +71,21 @@ const modeIndicatorClass = computed(() => { + +
+
+
+