feat(electron): 设置窗口尺寸并移除菜单栏

- 设置主窗口默认尺寸为 1200x800
- 移除窗口菜单栏显示
- 更新构建脚本使用 pnpm 替代 npm
This commit is contained in:
coolxitech
2025-12-14 13:15:44 +08:00
parent 61dee24933
commit f1d90eb06c
2 changed files with 6 additions and 3 deletions

View File

@@ -11,7 +11,10 @@ app.whenReady().then(() => {
const win = new BrowserWindow({ const win = new BrowserWindow({
title: 'OGame', title: 'OGame',
icon: path.join(__dirname, '../public/favicon.ico'), icon: path.join(__dirname, '../public/favicon.ico'),
width: 1200,
height: 800,
}) })
win.setMenu(null);
// You can use `process.env.VITE_DEV_SERVER_URL` when the vite command is called `serve` // You can use `process.env.VITE_DEV_SERVER_URL` when the vite command is called `serve`
if (process.env.VITE_DEV_SERVER_URL) { if (process.env.VITE_DEV_SERVER_URL) {

View File

@@ -6,15 +6,15 @@
"author": "setube", "author": "setube",
"private": true, "private": true,
"version": "1.1.0", "version": "1.1.0",
"buildDate": "2025/12/14 12:02:29", "buildDate": "2025/12/14 13:13:07",
"main": "dist-electron/main.js", "main": "dist-electron/main.js",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite --port 25121", "dev": "vite --port 25121",
"build": "vue-tsc -b && vite build && node update-build-date.js", "build": "vue-tsc -b && vite build && node update-build-date.js",
"preview": "vite preview", "preview": "vite preview",
"build:server": "npm run build && go build", "build:server": "pnpm run build && go build",
"build:electron": "npm run build && electron-builder" "build:electron": "pnpm run build && electron-builder"
}, },
"dependencies": { "dependencies": {
"@tailwindcss/vite": "^4.1.17", "@tailwindcss/vite": "^4.1.17",