mirror of
https://github.com/setube/ogame-vue-ts.git
synced 2026-05-12 16:05:12 +08:00
feat: 新增docs静态资源与Electron主进程
添加了docs目录及其静态资源文件,支持前端文档和演示页面部署。新增dist-electron/main.js,实现Electron主进程窗口加载本地docs或开发服务器。更新.gitignore,允许docs目录纳入版本控制。
This commit is contained in:
12
dist-electron/main.js
Normal file
12
dist-electron/main.js
Normal file
@@ -0,0 +1,12 @@
|
||||
import { BrowserWindow, app } from "electron";
|
||||
import path, { dirname } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
app.whenReady().then(() => {
|
||||
let i = dirname(fileURLToPath(import.meta.url)), a = new BrowserWindow({
|
||||
title: "OGame",
|
||||
icon: path.join(i, "../public/favicon.ico"),
|
||||
width: 1200,
|
||||
height: 800
|
||||
});
|
||||
a.setMenu(null), process.env.VITE_DEV_SERVER_URL ? a.loadURL(process.env.VITE_DEV_SERVER_URL) : a.loadFile("docs/index.html");
|
||||
});
|
||||
Reference in New Issue
Block a user