fix update-window-size is no effect on windows

This commit is contained in:
geekgeekrun
2025-04-26 22:10:34 +08:00
parent 6f9533c2b7
commit f6e1b799ce
4 changed files with 5 additions and 4 deletions

View File

@@ -18,6 +18,7 @@ export default function initPublicIpc() {
if (!win) {
return
}
win.setMinimumSize(size.width, size.height)
win.setSize(size.width, size.height, size.animate)
}
)

View File

@@ -15,7 +15,6 @@ export function createLlmConfigWindow(
resizable: false,
show: false,
autoHideMenuBar: true,
frame: false,
webPreferences: {
preload: path.join(__dirname, '../preload/index.js'),
sandbox: false

View File

@@ -15,7 +15,6 @@ export function createResumeEditorWindow(
resizable: true,
show: false,
autoHideMenuBar: true,
// frame: false,
webPreferences: {
preload: path.join(__dirname, '../preload/index.js'),
sandbox: false

View File

@@ -257,6 +257,7 @@ import { ref, onMounted, watch, nextTick, computed } from 'vue'
import { gtagRenderer } from '@renderer/utils/gtag'
import { SINGLE_ITEM_DEFAULT_SERVE_WEIGHT } from '../../../../common/constant'
import { v4 as uuid } from 'uuid'
import { sleep } from '@geekgeekrun/utils/sleep.mjs'
interface LlmConfigItem {
id: string
providerCompleteApiUrl: string
@@ -498,11 +499,12 @@ function removeConfig(index) {
watch(
() => formContent.value.length,
(nVal) => {
async (nVal) => {
await sleep(100)
if (nVal <= 1) {
electron.ipcRenderer.send('update-window-size', {
width: window.innerWidth,
height: 550
height: 576
})
} else {
electron.ipcRenderer.send('update-window-size', {