156 Commits

Author SHA1 Message Date
谦君
b9b2b0966c ci: 构建流程中显式安装ImageMagick
在GitHub Actions构建流程中新增ImageMagick安装步骤,确保生成Android图标时依赖环境一致,提升CI稳定性。
2025-12-25 18:29:19 +08:00
谦君
724a70bebb docs: 新增西班牙语和日语README并优化多语言文档
新增README-ES.md(西班牙语)和README-JA.md(日语)文档,完善多语言README互链。优化各语言README徽章、技术栈、外链格式及语言切换区,提升文档一致性与可读性。
2025-12-25 18:25:08 +08:00
谦君
b24a262ca7 Update build.gradle 2025-12-24 03:44:42 +08:00
谦君
06b878a731 chore: 统一Server文件名与产品名为OGame-Vue-Ts
CI构建流程中Server产物文件名统一为OGame-Vue-Ts前缀,package.json中productName同步改为OGame-Vue-Ts,保持产品命名一致性,便于识别与管理。
2025-12-24 03:36:19 +08:00
谦君
8c799dc3bf chore: 精简README下载区与统一产品名
移除各语言README中的下载区内容,保持文档简洁一致。package.json中productName由“OGame-Vue-Ts”改为“OGame”,统一产品命名。
2025-12-24 03:22:06 +08:00
谦君
4a0734bb04 chore: README下载区样式微调
移除README下载区多余空行,保持文档结构简洁一致。
2025-12-24 03:13:51 +08:00
谦君
c11699706b chore: 多语言README下载区样式优化
统一德语、英文、韩语、俄语、繁体中文README下载区样式,移除多语言下载标题,提升文档结构一致性与可读性。
2025-12-24 03:12:53 +08:00
谦君
11dbdcc82a chore: 统一项目名称为OGame-Vue-Ts
将android打包文件名、package.json中的productName统一为“OGame-Vue-Ts”,去除main.go中的emoji符号,控制台输出更简洁。提升品牌一致性与可读性。
2025-12-24 03:11:18 +08:00
谦君
9ea6fabbd1 fix: 资源操作兼容Partial类型
将addResources和deductResources的参数类型由Resources调整为Partial<Resources>,避免部分字段缺失时报错。同步修正任务奖励发放逻辑,提升资源操作的健壮性。
2025-12-24 02:51:27 +08:00
谦君
5a06022798 chore: 版本号升级至1.5.0
package.json中的version字段由1.4.0提升至1.5.0,为新功能或重要更新做准备。
2025-12-24 02:01:32 +08:00
谦君
b85b84399a chore: 修改go模块名与更新构建日期
go.mod中的模块名由“OGame Vue Ts”更改为“ogame-vue-ts”,package.json的buildDate更新为2025/12/24 01:51:29。
2025-12-24 01:52:58 +08:00
谦君
b6be379702 fix: 优化成就页头部布局适配
将成就页头部容器由响应式flex方向调整为始终横向排列,统一各端显示效果,提升布局一致性。
2025-12-24 01:47:17 +08:00
谦君
5e3557e2da feat: 新增多语言README并优化文档结构
新增德语、俄语、韩语、繁体中文多语言README,英文与简体中文README同步优化,统一下载链接与徽章样式,完善多语言入口。提升国际化支持与文档可读性。
2025-12-24 01:45:17 +08:00
谦君
a475b1b554 chore: 移除多余依赖与PostCSS配置
删除@capacitor/share、@capacitor/status-bar、@capawesome/capacitor-file-picker、postcss及相关依赖,移除postcss.config.js,简化依赖树。README下载链接样式调整为纯文本列表,提升可维护性。
2025-12-20 04:05:20 +08:00
谦君
dc5f1c1370 feat: 优化原生端顶部间距与资源栏样式
根据平台动态调整主内容区与资源栏的顶部间距,原生端顶部间距由60px提升至80px,资源栏与展开栏的padding与定位同步适配,提升Android/Capacitor端显示一致性。
2025-12-20 03:41:16 +08:00
谦君
8e34d08545 feat: 支持Android端导出到Documents并多语言提示
Android端数据导出改为直接保存至Documents目录,导出成功后弹出带路径的多语言提示。引入@capacitor/status-bar与@capawesome/capacitor-file-picker依赖,主入口设置原生状态栏颜色与样式。各语言包补充导出成功带路径提示文案。
2025-12-20 02:55:00 +08:00
谦君
65a143bec2 feat: 支持Android端数据导出与分享
引入@capacitor/filesystem与@capacitor/share,实现Android端通过原生文件系统导出数据并调用系统分享面板。新增colors.xml并调整MainActivity,设置状态栏与导航栏颜色,提升原生端显示一致性。
2025-12-20 02:32:11 +08:00
谦君
9a52bac7f1 feat: 支持Android返回键退出确认与多语言提示
新增Android端返回键退出确认弹窗,防止误触直接退出应用。各语言包补充退出确认标题与提示语,提升多语言体验。依赖新增@capacitor/app,样式与主题适配同步优化。
2025-12-20 02:21:18 +08:00
谦君
c16d264209 fix: 优化Android安全区域顶部间距
将顶部安全区域适配由env(safe-area-inset-top, 0)调整为calc(env(safe-area-inset-top, 0px) + 8px),避免内容过于靠近状态栏,提升Android/Capacitor端显示体验。
2025-12-20 02:02:38 +08:00
谦君
9469486174 feat: 优化Android主题与安全区域适配
调整styles.xml主题色为自定义深色,并实现状态栏与导航栏透明。CSS新增安全区域适配,提升Android/Capacitor端显示效果。
2025-12-20 01:55:20 +08:00
谦君
ba3330c0f3 feat: 优化APK发布流程与更新README下载链接
CI流程中新增自动删除同名APK资源步骤,避免重复上传导致的422错误。README优化各平台下载链接,采用徽章样式并补充Android端下载入口,Go版本号同步为1.23。
2025-12-20 01:39:53 +08:00
谦君
859418e50c feat: 配置Android签名与APK后缀大写
新增release.keystore并在build.gradle中配置签名信息,发布包启用签名。统一Android APK文件后缀为大写.APK,调整CI流程相关路径匹配。
2025-12-20 01:32:48 +08:00
谦君
3fe1e4a347 chore: CI流程中安装ImageMagick依赖
在CI构建流程中新增ImageMagick安装步骤,为后续自动生成Android多尺寸图标提供依赖支持。
2025-12-20 01:21:50 +08:00
谦君
d7dfe3c824 feat: 支持Android明文流量与自定义网络安全配置
AndroidManifest.xml新增明文流量支持及networkSecurityConfig配置,添加network_security_config.xml文件。CI流程集成自动生成多尺寸Android图标脚本,补充logo.png与resources/icon.png资源。
2025-12-20 01:19:21 +08:00
谦君
18843e271f chore: 更新CI构建Go与Java版本
将CI流程中的Go版本由1.25降至1.23,Java版本由17升级至21,确保兼容性与构建环境一致性。
2025-12-20 01:01:27 +08:00
谦君
1185dad4da Update build.yml 2025-12-20 00:52:33 +08:00
谦君
5c4ca2b07c Update build.yml 2025-12-20 00:50:53 +08:00
谦君
1368bb4445 feat: 新增Android平台支持及构建流程
集成Android平台相关目录与配置文件,包含Gradle构建脚本、资源文件、启动图标、Java入口、Proguard规则等,完善.gitignore以排除Android构建产物。更新CI流程,支持自动构建并发布Android APK。移除README中项目结构说明,简化文档。
2025-12-20 00:48:36 +08:00
谦君
20fb2bb6a4 feat: 实现远征任务事件与报告展示
新增远征任务事件逻辑,支持资源、暗物质、舰船发现及遭遇海盗/外星人等多种结果,并生成对应任务报告。MessagesView支持远征任务详情展示,包括获得资源、舰船及损失舰船。补充多语言包相关远征事件提示。
2025-12-19 12:37:34 +08:00
谦君
752cade67c refactor: 优化主界面布局与通知系统
重构App.vue,首页独立无侧边栏,其他页面采用统一侧边栏布局。新增右下角固定通知区,集成返回顶部、队列通知、外交通知和敌方警报。移除新手引导组件,替换为弱引导提示系统。支持星球重命名弹窗。优化NPC成长与行为定时器逻辑,提升性能和可维护性。删除issue模板及相关文档描述。
2025-12-19 12:01:45 +08:00
谦君
a689ce21b7 Merge pull request #15 from StarsEnd33A2D17/notification
feat: 添加了浏览器通知和页面内通知
2025-12-18 19:02:34 +08:00
谦君
37045b432b refactor: 移除冗余的前置条件显示方法
删除BuildingsView.vue和ResearchView.vue中未被使用的getRequirementsDisplay简化版方法,优化代码结构,提升可维护性。同步清理多语言包中无用的build字段。
2025-12-18 04:54:36 +08:00
谦君
a0ab4beaf4 feat: 新手保护及NPC攻击概率优化
为积分低于1000的玩家增加新手保护,NPC不会侦查或攻击。优化NPC攻击概率逻辑:中立NPC按正常概率攻击,敌对NPC攻击概率翻倍,提升游戏平衡性。
2025-12-18 04:47:49 +08:00
谦君
53d5216e88 fix: 优化NPC冷却与成长平衡及多语言提示
为NPC初始化和数据迁移时增加侦查/攻击冷却的随机延迟,避免所有NPC同时行动。调整NPC成长难度参数,降低前期NPC威胁,提升平滑度。修正多语言包中侦查被发现提示内容。优化舰队警报弹窗滚动体验。
2025-12-18 04:41:52 +08:00
谦君
2ed15c4782 refactor: 优化UI组件结构与积分系统
重构部分UI组件脚本结构,统一导入风格,提升可维护性。CardUnlockOverlay解锁条件弹窗改为列表展示,提升可读性。修复QueueNotifications滚动区域高度。ScrollableDialogContent增加最大高度。StarsBackground与ParticlesBg组件代码格式优化。App.vue引入玩家积分定时更新逻辑,NPC成长系统补充间谍探测器修复。
2025-12-18 03:47:38 +08:00
StarsEnd
0da82802b8 移出player 2025-12-18 02:21:00 +08:00
StarsEnd
d2465b5d4b 补全国际化 2025-12-18 02:03:09 +08:00
StarsEnd
e8590d54c7 feat: 添加了浏览器通知和页面内通知
暂包含建造完成和科研完成
2025-12-18 01:36:51 +08:00
谦君
2e3ac1231f Merge pull request #14 from coolxitech/main
feat(ui): 更新背景粒子效果和路由视图布局
2025-12-17 23:42:56 +08:00
coolxitech
99e4dbbb0d feat(ui): 更新背景粒子效果和路由视图布局
- 调整 RouterView 的包装 div 结构以支持 z-index 控制
- 为非暗黑模式下的 ParticlesBg 组件设置固定颜色值
- 修改 ParticlesBg 组件的层级样式确保其在背景中正确显示
- 在默认和暗黑模式下优化视图容器的相对定位与全屏尺寸
- 引入新的嵌套 div 结构来增强页面元素的层次管理
2025-12-17 23:38:07 +08:00
谦君
07ece4412f Merge pull request #13 from coolxitech/main
新增特效背景并优化Docker容器大小
2025-12-17 23:16:11 +08:00
谦君
bde0532dbd Merge branch 'main' into main 2025-12-17 23:16:02 +08:00
谦君
d69b842c80 Update package.json 2025-12-17 23:15:13 +08:00
谦君
57fdc1b637 Update App.vue 2025-12-17 23:15:09 +08:00
酷曦科技
d700216cfc Merge branch 'setube:main' into main 2025-12-17 23:07:53 +08:00
谦君
6813456d12 feat: 资源与舰队安全添加及容量校验优化
实现资源和舰队安全添加函数,防止超出仓储/舰队容量时溢出,超出部分自动丢弃。运输、部署、舰队返回等流程统一使用安全添加逻辑。建造队列纳入容量校验,导弹容量校验支持队列中导弹数量。修复NPC舰船建造极端情况下的除零和NaN问题。
2025-12-17 23:07:48 +08:00
coolxitech
97db1324b6 fix(App): 修复路由切换时的页面过渡动画
- 为 Transition 组件中的 div 元素正确绑定 key 属性
- 移除 main.css 中冗余的 tailwindcss 和 tw-animate-css 导入
- 确保页面切换时动画效果正常显示
2025-12-17 22:55:18 +08:00
谦君
ebd7eb1405 Merge pull request #12 from yruh/fix/gameSpeed-resource
fix: 同步 gameSpeed 倍率展示并修复移动端资源栏遮挡
2025-12-17 22:50:02 +08:00
coolxitech
310372b8e2 chore(build): 更新构建日期时间戳
- 将构建日期从 2025/12/17 21:05:49 更新为 2025/12/17 22:25:06
2025-12-17 22:49:00 +08:00
coolxitech
d5a6dd49a1 build(docker): 更新Docker构建环境配置
- 使用node:lts-alpine替换node:latest基础镜像
- 添加git安装和npm镜像源配置
- 修改apk软件源为中科大镜像站
- 更新构建命令为pnpm run build格式
- 优化构建阶段依赖安装逻辑
2025-12-17 22:48:47 +08:00
coolxitech
f30676df07 feat(ui): 星空背景组件支持过渡动画类型
- 导入 Transition 类型以支持动画过渡配置
- 为星层1添加明确的 Transition 类型注解
- 为星层2添加明确的 Transition 类型注解
- 为星层3添加明确的 Transition 类型注解
- 统一设置缓动函数为常量 "linear"
- 确保各星层动画持续时间按倍数递增
2025-12-17 22:25:36 +08:00
lpj
690e6cbbf5 fix: 同步 gameSpeed 倍率展示并修复移动端资源栏遮挡
- 顶部资源栏/概览页:产量、能耗、明细按 gameSpeed 统一缩放,避免显示与实际产出不一致
- 支持 gameSpeed=0:避免 “|| 1” 抹掉 0,并在循环间隔计算中规避除 0
- 修复移动端资源横向滚动时被菜单按钮遮挡(min-w-0/overflow-hidden + 对齐规则)
2025-12-17 22:23:27 +08:00
coolxitech
bd24ca02ae feat(ui): 添加粒子背景和星空背景组件
- 新增 ParticlesBg 组件,实现动态粒子效果背景
- 新增 StarsBackground 组件,创建可交互的星空背景
- 支持自定义颜色、数量、动画速度等属性配置
- 集成鼠标交互,实现视差效果和动态跟随
- 导出两个新组件便于全局使用
2025-12-17 22:03:12 +08:00
coolxitech
d9a8accad7 chore(deps): 更新 electron/node-gyp 依赖引用方式
- 将 @electron/node-gyp 的 Git 协议引用改为 HTTPS tarball 引用
- 统一依赖源为 GitHub 的代码加载地址
- 避免使用 git+ssh 协议可能带来的权限问题
- 确保依赖版本锁定的一致性
- 提高依赖安装的稳定性和可重复性
2025-12-17 22:02:59 +08:00
coolxitech
b166babf12 feat(ui): 添加粒子背景组件支持
- 在非星空背景模式下引入 ParticlesBg 组件
- 配置粒子数量、缓动效果及颜色适配暗色主题
- 设置粒子静态值并启用刷新功能
- 导入 ParticlesBg 组件并注册使用
2025-12-17 22:02:47 +08:00
coolxitech
4aa4d9d350 feat(ui): 添加页面切换动画和星空背景效果
- 使用 Transition 组件实现页面切换的淡入淡出动画
- 根据路由路径设置组件 key 值以触发过渡效果
- 在暗色模式下添加 StarsBackground 星空背景组件
- 为 RouterView 和 StarsBackground 设置高度样式
- 引入 StarsBackground 组件并注册使用
2025-12-17 21:58:28 +08:00
coolxitech
60fd4135ec chore(deps): 重新组织依赖项并更新 motion-v
- 移除 class-variance-authority 和 clsx 的重复声明
- 移除 tailwind-merge 的重复声明
- 在 devDependencies 中正确添加 class-variance-authority
- 在 devDependencies 中正确添加 clsx
- 在 devDependencies 中正确添加 tailwind-merge
- 添加 motion-v 动画库到 dependencies
- 确保所有依赖项按字母顺序排列
- 更新 vite 使用 rolldown-vite 版本 7.2.5
2025-12-17 21:58:20 +08:00
coolxitech
0bb9244214 feat(styles): 引入暗色主题支持并优化样式结构
- 添加 `main.css` 文件定义基础样式和暗色主题变量
- 在 `style.css` 中导入新的主样式文件
- 更新 `utils.ts` 中的 `cn` 函数实现方式
- 调整 pnpm 锁定文件以反映依赖变化
- 集成 `motion-v` 和相关动画库支持
- 移除旧版不必要的样式依赖项
- 修复 `@electron/node-gyp` 的 Git 引用路径格式问题
2025-12-17 21:58:00 +08:00
谦君
cfcde0b024 feat: 新增队列与外交通知组件及新手引导
引入队列通知(QueueNotifications)和外交通知(DiplomaticNotifications)组件,优化主界面队列与外交报告展示,支持一键查看与跳转。重构App.vue,移除原有队列展示,改为弹出式通知,支持功能解锁提示与新手引导(TutorialOverlay)。完善NPC外交事件处理,导弹攻击等行为影响好感度并生成报告。优化部分UI细节与多语言文本,提升交互体验。
2025-12-17 21:06:34 +08:00
谦君
053bd24855 fix(package): 解决buildDate字段冲突
合并package.json中的buildDate字段,移除合并冲突标记,保持字段一致性。
2025-12-15 22:36:33 +08:00
谦君
7d1f36046d Merge pull request #9 from coolxitech/main
chore(workflow): 更新 GitHub Pages 工作流名称
2025-12-15 22:35:11 +08:00
谦君
22ae07de90 Merge branch 'main' into main 2025-12-15 22:35:02 +08:00
谦君
a76909a2c7 Merge pull request #8 from setube/revert-7-main
Revert "chore(github-pages): 更新GitHub Pages构建工作流"
2025-12-15 22:31:18 +08:00
coolxitech
8144f305e2 chore(workflow): 更新 GitHub Pages 工作流名称
- 将工作流名称从 "构建Github Pages" 更改为 "构建 Github Pages"
- 保持其他配置不变
2025-12-15 22:31:03 +08:00
谦君
04721e2450 Revert "chore(github-pages): 更新GitHub Pages构建工作流" 2025-12-15 22:30:46 +08:00
谦君
85ab19fb4a Merge branch 'main' of https://github.com/setube/ogame-vue-ts 2025-12-15 22:27:25 +08:00
谦君
03f76b6497 Merge pull request #7 from coolxitech/main
chore(github-pages): 更新GitHub Pages构建工作流
2025-12-15 22:22:58 +08:00
谦君
9a571da4b1 feat: 管理员工具支持一键拉满资源与完成队列
新增GM界面一键拉满所有资源和一键完成所有建筑、科技、舰队、防御队列及飞行任务功能。舰队界面支持终止返航/已到达任务,相关多语言文本已补充(含中英文完整,其他语言留空待完善)。
2025-12-15 22:20:20 +08:00
coolxitech
797cc815f6 chore(github-pages): 更新GitHub Pages构建工作流
- 将工作流名称从"Deploy Vue Project"更改为"构建Github Pages"
- 添加workflow_dispatch触发器以支持手动触发部署
- 保留main分支的推送触发器
- 维持内容读取权限设置
2025-12-15 22:19:41 +08:00
谦君
30aceb2a76 Merge pull request #6 from coolxitech/main
新增PWA服务并优化Github pages服务
2025-12-15 22:11:09 +08:00
coolxitech
4340450d78 chore(ci): 优化 GitHub Pages 部署工作流
- 合并 pnpm 安装与构建步骤
- 移除冗余的 node-version 配置
- 简化工作流中的缓存逻辑
- 更新 pnpm 版本管理方式
- 减少不必要的 workflow 执行时间
2025-12-15 22:07:23 +08:00
coolxitech
2bac87cd39 chore(ci): 更新 pnpm 版本至 v10
- 将 GitHub Actions 中的 pnpm 版本从 v9 升级到 v10
- 保持缓存配置不变以提高构建性能
2025-12-15 22:04:28 +08:00
coolxitech
1aac97dfee perf(workbox): 优化资源缓存匹配模式
- 修改 globPatterns 配置以递归匹配所有静态资源
- 确保深层嵌套的文档目录资源被正确缓存
- 提升离线访问性能和资源加载速度
2025-12-15 22:02:56 +08:00
酷曦科技
84b090d51d Update .github/workflows/github-pages.yml
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
2025-12-15 22:02:29 +08:00
coolxitech
a592713623 chore(github-pages): 配置 GitHub Pages 环境变量
- 添加 environment 字段以指定部署环境
- 设置页面 URL 输出变量以便后续使用
- 确保工作流能够正确识别和部署到 GitHub Pages
2025-12-15 21:52:32 +08:00
coolxitech
ec6b9cee07 chore(pages): 更新 GitHub Pages 部署工作流
- 添加 permissions 配置以支持 GitHub Pages 部署
- 使用 actions/setup-node 安装 Node.js 环境
- 添加缓存配置以加速依赖安装
- 使用 actions/configure-pages 跳过 Jekyll 处理
- 使用 actions/upload-pages-artifact 上传构建产物
- 使用 actions/deploy-pages 部署到 GitHub Pages
- 更新构建命令以确保正确执行
- 修改路径配置以匹配项目结构
2025-12-15 21:47:08 +08:00
coolxitech
b6fcad0a65 chore(electron): 移除Electron相关配置和构建产物
- 删除了Electron主进程文件 dist-electron/main.js
- 在.gitignore中添加了dist-electron和docs目录的忽略规则
- 清理了Electron相关的构建配置和开发资源引用
- 移除了Electron应用的窗口创建和路由加载逻辑
- 删除了对VITE开发服务器URL的条件判断和处理
- 去除了Electron菜单栏设置及相关图标引用
2025-12-15 21:34:51 +08:00
coolxitech
5273520305 refactor(buildings): 删除构建版 2025-12-15 21:33:25 +08:00
coolxitech
751cb1e341 ci(github-actions): 添加 GitHub Pages 部署工作流
- 新增部署到 GitHub Pages 的自动化流程
- 配置在 main 分支推送时触发构建和部署
- 使用 pnpm 进行依赖安装与项目构建
- 通过 github-pages-deploy-action 推送构建产物至 gh-pages 分支
- 指定 docs 目录作为部署源文件夹
2025-12-15 21:32:46 +08:00
coolxitech
add90c5603 feat(tsconfig): 启用 JSON 模块解析和 ES 模块互操作
- 添加 resolveJsonModule 选项以支持导入 JSON 文件
- 启用 esModuleInterop 以改善 CommonJS 和 ES 模块之间的兼容性
- 设置 allowSyntheticDefaultImports 允许合成默认导入
2025-12-15 21:23:26 +08:00
coolxitech
3410eeda19 feat(pwa): 集成 PWA 支持并配置离线缓存策略
- 添加 vite-plugin-pwa 插件依赖
- 配置应用清单(manifest)支持全屏模式
- 设置工作箱(workbox)缓存静态资源
- 实现图片和音频资源的运行时缓存
- 调整缓存大小限制至 5MB 以适应游戏资源
- 更新构建时间戳
2025-12-15 21:23:15 +08:00
coolxitech
c690323803 Merge remote-tracking branch 'origin/main' 2025-12-15 20:45:35 +08:00
谦君
59dd7bfd05 feat: 重构战报弹窗与模拟器视图,优化UI与逻辑
重构BattleReportDialog和BattleSimulatorView相关静态资源,替换旧版JS/CSS文件,提升界面一致性和交互体验。新增和优化空状态、滚动区域等通用UI组件,移除部分冗余composable,完善多语言内容。引入导弹逻辑,补充版本检测工具,提升整体代码结构和可维护性。
2025-12-15 20:04:40 +08:00
谦君
9b9fda0400 feat: 新增NPC与外交逻辑,优化UI组件结构
重构并精简了部分UI组件,移除冗余弹窗与详情组件,新增NPC相关逻辑(npcBehaviorLogic、npcGrowthLogic、npcStore等)及外交逻辑(diplomaticLogic、DiplomacyView)。完善分页、标签、复选框等通用UI组件。优化战报弹窗,调整README下载链接为相对路径,修复部分国际化内容。
2025-12-15 08:23:45 +08:00
coolxitech
3fa716e515 Merge remote-tracking branch 'origin/main'
# Conflicts:
#	docs/index.html
2025-12-14 16:07:20 +08:00
coolxitech
9aa240e335 build(workflows): 更新Docker构建缓存配置
- 在GitHub Actions工作流中启用最大模式缓存
- 添加OCI镜像描述注解支持
- 配置Docker镜像输出元数据
2025-12-14 16:00:03 +08:00
谦君
44580909a3 feat: 新增docs静态资源与Electron主进程
添加了docs目录及其静态资源文件,支持前端文档和演示页面部署。新增dist-electron/main.js,实现Electron主进程窗口加载本地docs或开发服务器。更新.gitignore,允许docs目录纳入版本控制。
2025-12-14 15:59:32 +08:00
coolxitech
88fa8aa2ee Merge remote-tracking branch 'origin/main' 2025-12-14 15:55:46 +08:00
coolxitech
2601f1b776 github-pages 2025-12-14 15:55:27 +08:00
coolxitech
763dfdde04 github-pages 2025-12-14 15:55:05 +08:00
谦君
00d7f15380 Merge pull request #4 from coolxitech/main
重构构建方式
2025-12-14 15:40:44 +08:00
酷曦科技
1cbc9f0ea8 Update .github/workflows/build.yml
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
2025-12-14 14:40:05 +08:00
coolxitech
6e5c0cc745 docs(readme): 更新下载链接和文档结构
- 在 README 中添加了桌面版下载链接
- 完善了服务端和桌面版的分类说明
- 补充了 Ubuntu 和 MacOS 的安装包链接
- 优化了英文文档的标题和结构
- 统一了下载链接的展示格式
- 增加了必要的空行提升可读性
2025-12-14 14:23:14 +08:00
coolxitech
9451b7619d docs(readme): 更新桌面版下载链接
- 将 Windows 桌面版下载链接更新为 OGame.Setup.exe
- 将 Linux 桌面版下载链接更新为 OGame.AppImage
- 将 MacOS 桌面版下载链接更新为 OGame-mac.dmg
- 将 Linux 系统标注从 "Linux" 更改为 "Ubuntu"
2025-12-14 14:21:13 +08:00
coolxitech
5e8fdea34a chore(package): 更新包元数据信息 2025-12-14 14:14:52 +08:00
coolxitech
dbd95689be chore(package): 更新包元数据信息 2025-12-14 14:11:51 +08:00
coolxitech
77b4a7adf2 chore(package): 更新包元数据信息 2025-12-14 14:10:48 +08:00
coolxitech
face17971e feat(electron): 配置多平台构建产物名称
- 为 Windows 平台设置安装包文件名格式
- 添加 macOS 平台支持并配置产物命名规则
- 配置 Linux 平台构建选项及文件命名方式
- 统一各平台构建产物的命名变量使用
- 确保所有目标平台的 artifactName 格式一致
- 更新 electron-builder 配置以支持跨平台部署
2025-12-14 14:03:37 +08:00
coolxitech
9a8d9ff820 fix(docker): 更新Nginx配置文件路径
- 将nginx.conf复制目标从/etc/nginx/nginx.conf改为/etc/nginx/conf.d/default.conf
- 确保Nginx配置能正确加载默认站点配置
- 保持与Alpine版Nginx的目录结构一致
2025-12-14 13:50:48 +08:00
coolxitech
452874c9cb docs(readme): 更新构建工具描述和下载链接
- 在 README 和 README-EN 中添加 Electron 构建说明
- 更新 Golang 构建目标描述为 Web 服务端
- 添加桌面版应用程序的下载链接
- 重新组织下载部分结构,区分服务端和桌面版
- 为不同平台添加对应的桌面版可执行文件链接
2025-12-14 13:50:29 +08:00
coolxitech
070f12a5a0 Merge remote-tracking branch 'origin/main' 2025-12-14 13:30:14 +08:00
coolxitech
f29366330d build(docker): 优化Docker构建流程并配置Nginx
- 合并RUN指令以减少镜像层数
- 移除不必要的cd和mkdir命令
- 添加Nginx配置文件复制步骤
- 清理HTML目录内容
- 暴露端口80用于Web服务
2025-12-14 13:30:01 +08:00
酷曦科技
b6f9999cdc Update README-EN.md
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
2025-12-14 13:29:07 +08:00
coolxitech
f1d90eb06c feat(electron): 设置窗口尺寸并移除菜单栏
- 设置主窗口默认尺寸为 1200x800
- 移除窗口菜单栏显示
- 更新构建脚本使用 pnpm 替代 npm
2025-12-14 13:15:44 +08:00
coolxitech
61dee24933 fix(build): 修复 GitHub Release 上传失败问题
- 调整 artifacts 下载方式,避免文件覆盖冲突
- 手动扁平化并重命名发布资产文件
- 确保服务端可执行文件唯一性
- 排除 electron 构建产生的 unpacked 目录
- 统一上传目录内容至 GitHub Release
- 避免使用通配符导致的重复匹配问题
2025-12-14 13:01:00 +08:00
coolxitech
00853372cd fix(build): 修复发布流程中上传文件的问题
- 调整 artifact 下载路径并启用平铺模式
- 清理中间产物目录避免上传无关文件
- 更新上传规则以支持多种安装包格式
- 优化 release assets 文件匹配逻辑
- 移除冗余的 zip 包上传配置项
- 增强构建脚本的健壮性和可维护性
2025-12-14 12:53:19 +08:00
coolxitech
37b330c4d6 chore(workflow): 优化构建与发布流程
- 统一上传步骤命名,增强可读性
- 精确指定上传文件后缀,避免多余目录或文件被上传
- 合并下载与上传步骤,简化 release 流程
- 移除冗余的权限声明与注释
- 修复 release assets 路径引用问题
2025-12-14 12:46:12 +08:00
coolxitech
e2666e1d73 chore(workflow): 优化 Release 工作流以提高稳定性
- 调整作业依赖顺序,确保构建完成后再执行发布
- 明确设置 GitHub 权限,增强对 PR 和内容的访问控制
- 重构版本号获取逻辑,使用更清晰的脚本方式
- 分步创建 Release 并上传资产,避免并发冲突
- 指定具体文件路径进行上传,防止误传 package.json
- 启用自动生成 Release Notes 功能
- 统一管理下载路径并明确文件命名规则
2025-12-14 12:41:13 +08:00
coolxitech
ec77a0656a chore(workflow): 优化构建与发布流程
- 统一可执行文件命名规则,去除架构后缀
- 合并 Node 与 Go 环境设置步骤
- 简化前端与服务端构建流程
- 显式指定 Electron 安装包上传路径
- 优化 Release Assets 下载与合并方式
- 修复版本号获取逻辑并显式声明发布文件类型
- 排除 package.json 文件被误上传至 Release 页面
2025-12-14 12:36:15 +08:00
coolxitech
10071f5e54 chore(workflow): 优化 GitHub Actions 构建流程
- 合并前端安装与构建步骤以提高效率
- 移除重复的 checkout 和 setup 步骤
- 简化 artifact 上传路径配置
- 调整 release 步骤中的版本号获取逻辑
- 更新注释说明以反映最新改动
- 统一 Electron 构建命令执行方式
2025-12-14 12:27:28 +08:00
coolxitech
e3f95cd69b chore(workflow): 迁移构建流程至 pnpm
- 在 GitHub Actions 中安装 pnpm 并指定版本为 8
- 将 Node.js 缓存策略从 npm 更改为 pnpm
- 使用 pnpm 替代 npm 安装依赖和执行构建命令
- 更新 Electron 构建脚本参数传递方式以适配 pnpm
- 移除冗余的 npm 配置并统一使用 pnpm 管理前端依赖
2025-12-14 12:23:03 +08:00
coolxitech
9fc76ff6c1 ci(build): 更新构建流程以包含前端资源
- 修改服务器构建步骤以嵌入前端静态资源
- 添加 Node.js 设置和前端依赖安装
- 更新 Electron 构建脚本和输出路径
- 调整 package.json 中的构建命令
- 优化构建注释和版本获取方式
2025-12-14 12:18:56 +08:00
coolxitech
37862ae7ac chore(build): 优化多平台构建流程并更新依赖
- 更新 GitHub Actions 工作流名称,明确区分服务端与客户端构建
- 修改 Go 服务端构建任务命名及输出 artifact 名称
- 升级 Electron 构建环境从 Bun 到 Node.js 并调整相关指令
- 调整构建脚本以适配 npm 和标准 Electron 打包命令
- 增加 Debian 包支持并扩展上传安装包的路径规则
- 改进版本号提取逻辑,确保正确读取 package.json 中的版本
- 统一使用较旧但稳定的 GitHub Actions 版本以提高可靠性
2025-12-14 12:15:45 +08:00
coolxitech
fef38d40ee feat(electron): 引入 Electron 桌面应用支持
- 添加 Electron 主进程入口文件 main.ts
- 配置 Vite 插件以支持 Electron 构建
- 更新 package.json 添加 Electron 相关依赖和构建脚本
- 修改路由历史模式为 HashHistory 以兼容 Electron 环境
- 调整构建流程分离服务端与客户端打包任务
- 新增 Electron 应用图标和基础窗口配置
- 集成开发服务器 URL 加载逻辑与静态文件加载 fallback
- 更新构建日期并设置主进程入口点字段
- 添加 Windows 安装包构建目标及输出目录配置
- 优化依赖预构建列表以提升启动性能
- 分离 release 资源收集路径并增强跨平台兼容性
- 升级部分工具链版本以获得最新功能支持
2025-12-14 12:06:56 +08:00
coolxitech
9f5a873513 chore(tsconfig): 调整TypeScript编译目标和库版本
- 将编译目标从ES2023降级到ES2022
- 更新库定义版本从ES2023升级到ES2024
2025-12-14 12:06:32 +08:00
coolxitech
95b4f23268 docs(readme): 更新 README 文档以支持 Go 语言环境
- 在 README 中添加 Go 语言版本徽章
- 更新依赖环境列表,新增 Go 1.21+ 的安装要求
- 补充多平台二进制可执行文件下载链接
- 说明使用 Golang 构建跨平台兼容程序的功能
- 添加 Windows、Linux 和 MacOS 平台的最新构建版本下载地址
- 修改构建工具描述,加入对 Golang 支持的说明
- 调整文档结构以便更好地展示项目技术栈和快速启动指南
2025-12-14 12:06:20 +08:00
coolxitech
24efe3da2d docs(readme): 更新 README 文档内容
- 在构建工具描述中增加对 Golang 的说明
- 添加各平台下载链接至快速开始部分
- 补充 Windows、Linux 和 MacOS 的二进制文件下载地址
2025-12-13 17:25:50 +08:00
coolxitech
790c1b5840 chore(ci): 优化 GitHub Actions 构建流程
- 强制指定使用 bash shell,解决 Windows 环境下的执行错误
- 在构建前运行 go mod tidy,确保依赖整洁
- 保留编译过程中的控制台输出,便于调试追踪
2025-12-13 17:06:31 +08:00
coolxitech
67012cb273 feat(go): 初始化 Go 模块配置
- 创建 go.mod 文件
- 设置模块名为 ogame
- 指定 Go 版本为 1.25.4
2025-12-13 17:02:15 +08:00
coolxitech
9c4cfa02d8 ci(workflow): 更新构建工作流以支持多架构编译
- 添加对 Linux ARM64 和 macOS Apple Silicon 的支持
- 重命名可执行文件以明确平台和架构
- 更新构建步骤注释和顺序
- 修改上传构件名称以匹配可执行文件
- 调整发布流程以包含新增的架构文件
- 移除冗余的 Go 模块初始化逻辑
- 优化构建脚本中的条件判断结构
2025-12-13 17:00:24 +08:00
coolxitech
1cabf329d3 refactor(utils): 简化数据加密函数实现
- 移除不必要的变量赋值
- 直接返回加密结果
- 保持错误处理逻辑不变
2025-12-13 16:59:48 +08:00
coolxitech
1cc1f8f009 删除构建文件 2025-12-13 16:53:11 +08:00
coolxitech
dc40dace28 refactor(server): 移除 Express 服务器实现
- 删除了基于 Express 的服务器配置
- 移除了静态资源服务逻辑
- 删除了局域网 IP 获取和 URL 自动打开功能
- 移除了 SPA fallback 处理
- 清理了相关依赖导入和变量声明
2025-12-13 16:38:48 +08:00
coolxitech
b15f13f25b feat(server): 支持命令行指定端口和改进静态资源服务
- 新增 -port 命令行参数,支持指定运行端口
- 改进静态资源处理逻辑,增强 SPA 路由兼容性
- 优化端口监听失败时的错误提示和程序退出机制
- 增强启动信息展示,包括运行模式和时间戳
- 自动打开浏览器功能保持后台运行不阻塞主服务
- 添加详细的实时访问日志提示信息
2025-12-13 16:18:53 +08:00
coolxitech
e4f7b20882 refactor(server): 将后端从 Node.js 迁移至 Go
- 移除对 Express 和相关中间件的依赖
- 新增 Go 编写的 HTTP 服务,支持嵌入前端资源
- 更新构建流程以使用 Go 编译跨平台可执行文件
- 配置 GitHub Actions 工作流以适应新的构建方式
- 实现自动打开浏览器和显示局域网访问地址功能
- 清理 package.json 中不再需要的脚本和依赖项
- 更新 pnpm-lock.yaml 文件以反映依赖变化
2025-12-13 15:50:41 +08:00
coolxitech
061d1f0152 feat(server): 优化静态资源服务与构建配置
- 添加 docs 目录到 .gitignore 忽略列表
- 修复统计脚本 URL 协议为 HTTPS
- 更新构建时间戳并新增 Windows 可执行文件构建脚本
- 重构服务端静态资源处理逻辑,支持 Bun 自动嵌入
- 改进 SPA 路由 fallback 机制
- 优化局域网 IP 获取函数变量声明
- 完善 Content-Type 响应头设置
- 移除冗余代码注释,提升可读性
2025-12-13 14:55:08 +08:00
coolxitech
b758c6e84d fix(server): 修复静态资源拦截器路径匹配问题
- 修改路由参数匹配模式,支持更灵活的路径处理
- 确保默认路径正确映射到 index.html
- 优化路径解析逻辑,提高静态资源访问准确性
2025-12-13 14:19:10 +08:00
coolxitech
fc481507f0 fix(server): 修复静态资源拦截器路径匹配问题
- 将路由从 '*' 更改为 '/*' 以正确处理所有路径
- 确保默认路径 '/' 正确映射到 '/index.html'
- 优化路径处理逻辑以增强单文件嵌入功能
2025-12-13 14:13:36 +08:00
coolxitech
cd14e88cc0 feat(server): 实现跨平台自动打开浏览器功能
- 移除对 'open' 包的依赖,改用 Node.js 内置模块实现自动打开浏览器
- 新增 openUrl 函数,支持 macOS、Windows 和 Linux 系统
- 更新网络接口遍历逻辑中的变量命名以提高可读性
- 静态资源处理中间件改为使用 Bun.file API 并内嵌到可执行文件中
- 优化控制台输出信息,增强用户体验和提示清晰度
- 调整服务器监听地址为 0.0.0.0,并移除 trust proxy 设置
- 修改获取局域网 IP 的函数名称和注释结构使其更加明确
- 删除 package.json 和 lock 文件中不再使用的依赖项及相关条目
- 更新 GitHub Actions 工作流配置以适配新的编译和打包方式
- 在 CI 流程中启用代码压缩选项以减小最终二进制文件体积
2025-12-13 14:08:12 +08:00
coolxitech
20dc6bd086 feat(server): 更新静态资源目录路径
- 将静态资源目录从 'dist' 更改为 'docs'
- 确保服务器能正确指向新的构建输出目录
- 适配 Vue 项目文档部署需求
2025-12-13 13:57:12 +08:00
coolxitech
c0b405ae98 refactor(server): 动态导入open模块以优化启动性能
- 将open模块的引入方式从同步改为动态导入
- 避免在服务器启动时立即加载不必要的依赖
- 提升应用初始化速度和资源利用率
- 确保浏览器自动打开功能正常运行
- 添加错误处理以应对模块加载失败情况
2025-12-13 13:53:53 +08:00
coolxitech
1b2718246f refactor(server): 重构浏览器自动打开功能
- 将导入的 open 模块重命名为 openUrl 以避免命名冲突
- 更新调用 openUrl 函数来打开指定 URL
- 保持错误处理逻辑不变,确保异常情况下的日志记录
2025-12-13 13:47:34 +08:00
coolxitech
7307791314 chore(build): 更新打包脚本包含文档目录
- 将 Windows 打包命令中的 dist 目录替换为 docs 目录
- 将 Linux/macOS 打包命令中的 dist/ 目录替换为 docs/ 目录
- 确保所有平台的打包流程统一使用 docs 目录
- 保持构建产物的一致性和完整性
- 避免因目录变更导致的打包遗漏问题
2025-12-13 13:41:57 +08:00
coolxitech
268c88a89c ci(workflow): 优化构建与发布流程
- 移除手动触发工作流配置
- 从 package.json 动态读取应用版本号
- 更新资源打包路径为 dist 目录
- 实现跨平台压缩命令统一处理
- 自动传递版本号至 Release 任务
- 启用自动生成 Release Notes 功能
- 确保构建产物正确上传与归档
2025-12-13 13:40:56 +08:00
coolxitech
56d98018e6 build(docker): 更新构建命令使用pnpm build
- 将vite build替换为pnpm build以优化构建流程
- 确保构建过程与项目依赖管理工具一致
2025-12-13 13:30:57 +08:00
coolxitech
d88296fd96 chore(ci): 更新构建工作流的标签触发规则
- 将标签匹配模式从 'v*' 更改为 'v*.*'
- 移除冗余的标签数组嵌套结构
- 优化工作流触发条件配置
2025-12-13 13:24:36 +08:00
coolxitech
85c90fed50 build(workflow): 更新打包路径为 docs 目录
- 修改 Windows 平台压缩命令,将 dist 替换为 docs
- 修改 Linux/macOS 平台打包命令,将 dist/ 替换为 docs/
2025-12-13 13:18:48 +08:00
coolxitech
b77ae14d5c chore(deps): 添加 express 和 open 依赖项
- 在 package.json 中添加 express 版本 5.2.1
- 在 package.json 中添加 open 版本 11.0.0
- 更新 pnpm-lock.yaml 文件以包含新的依赖项及其子依赖项
- 添加与新依赖项相关的中间件和工具库
- 确保所有新增依赖项的版本兼容性
2025-12-13 13:16:11 +08:00
coolxitech
7e937330bb ci(workflow): 添加多平台构建与发布工作流
- 新增 GitHub Actions 工作流文件
- 支持 Windows、Linux 和 macOS 平台构建
- 配置 Bun 环境并安装依赖
- 构建 Vue 前端资源
- 编译后端为可执行文件
- 打包静态资源与可执行程序
- 上传构建产物并创建 GitHub Release
2025-12-13 13:12:37 +08:00
coolxitech
cfbbb95ddb chore(ci): 修复Docker Hub登录变量引用
- 将DOCKERHUB_USERNAME从secrets改为vars引用
- 统一使用vars中的用户名进行Docker Hub认证
- 保持密码仍从secrets中读取以确保安全性
2025-12-13 12:28:44 +08:00
coolxitech
c1f7043690 fix(workflow): 修复Docker Hub登录检查条件
- 将登录检查条件从 vars.DOCKERHUB_USERNAME 修改为 secrets.DOCKERHUB_USERNAME
- 更新username输入变量引用从 vars.DOCKERHUB_USERNAME 到 secrets.DOCKERHUB_USERNAME
- 保持密码token引用为 secrets.DOCKERHUB_TOKEN 不变
- 确保只有在配置了Docker Hub凭据时才执行登录步骤
2025-12-13 12:26:45 +08:00
coolxitech
70b74509b3 Merge remote-tracking branch 'origin/main'
# Conflicts:
#	Dockerfile
2025-12-13 12:15:01 +08:00
coolxitech
da3215bcc1 chore(docker): 移除pnpm安装时的--shamefully-hoist参数
- 删除了Dockerfile中pnpm install命令的--shamefully-hoist选项
- 简化了依赖安装流程
- 保持构建过程的一致性
2025-12-13 12:14:41 +08:00
coolxitech
3ed03b5e37 build(docker): 更新pnpm安装命令以解决依赖问题
- 在pnpm install命令中添加--shamefully-hoist参数
- 保持vite构建步骤不变
- 维持nginx基础镜像配置
2025-12-13 12:08:55 +08:00
coolxitech
90f18952ec refactor(docker): 优化Docker构建流程
- 简化多阶段构建结构
- 移除不必要的注释和空行
- 更新基础镜像为node:latest
- 调整工作目录创建方式
- 合并git克隆和依赖安装步骤
- 修改构建命令执行顺序
- 清理nginx html目录内容
- 调整文件复制路径逻辑
2025-12-13 12:02:43 +08:00
coolxitech
9986a05d44 Merge remote-tracking branch 'origin/main'
# Conflicts:
#	src/stores/gameStore.ts
2025-12-13 12:02:08 +08:00
谦君
731d79673b feat: 新增战报弹窗与舰队模拟器,重构UI组件
新增 BattleReportDialog、SpyReportDialog、NumberWithTooltip 等组件,完善舰队模拟器功能。重构并引入 Sheet、Sidebar、Tooltip、Skeleton 等 UI 组件,优化界面结构。实现 battle.worker 支持战斗计算,增加 universeStore、fleetStorageLogic 等核心逻辑,完善多语言与类型定义。
2025-12-13 11:14:23 +08:00
coolxitech
cf5a62ed21 chore(deps): 更新依赖并移除冗余包
- 移除了 pnpm-lock.yaml 中的 esbuild 相关依赖项
- 清理了多个平台特定的 esbuild 子依赖
- 更新了 @tailwindcss/vite 和 @vitejs/plugin-vue 的依赖版本
- 标记多个工具包为可选依赖以优化安装体积
- 精简了 rolldown-vite 的依赖树结构
2025-12-13 10:35:15 +08:00
coolxitech
533c36b962 build(docker): 优化 Docker 构建流程
- 调整 pnpm 安装方式以提高构建稳定性
- 修改依赖安装顺序以更好利用缓存
- 更新注释内容以准确反映构建步骤
- 移除冗余指令以简化 Dockerfile 结构
2025-12-13 10:33:11 +08:00
coolxitech
b49e5f667c chore(ci): 优化 Docker 登录和镜像标签逻辑
- 调整 GHCR 登录注释,明确其始终执行
- 修改 Docker Hub 登录条件,仅检查 vars.DOCKERHUB_USERNAME 是否存在
- 更新 Docker Hub 镜像标签格式,添加 docker.io 前缀以确保唯一性
- 移除关于 GITHUB_TOKEN 的注释冗余内容
- 统一镜像推送逻辑中的标签生成方式
2025-12-13 10:30:54 +08:00
coolxitech
1e9c3ad37b ci(docker): 重构多架构镜像构建流程
- 合并原有分离的 amd64 和 arm64 构建任务为统一的多架构构建任务
- 使用 docker/setup-qemu-action 和 docker/setup-buildx-action 支持多架构构建
- 更新 GitHub Actions 的依赖版本至最新(checkout@v4、login-action@v3、build-push-action@v6)
- 修改平台配置为 linux/amd64,linux/arm64 实现一键双架构构建
- 改用 GITHUB_TOKEN 进行 GHCR 认证,提高安全性
- 优化 Docker Hub 登录逻辑,仅在配置凭据时执行
- 移除手动创建 manifest 步骤,由 build-push-action 自动处理多架构标签
- 增加对 git tag 触发的支持,实现版本化镜像推送
- 添加构建缓存支持以提升后续构建速度
- 更新镜像标签策略,同时推送 latest 和 commit SHA 标签到 GHCR 与 Docker Hub
2025-12-13 10:28:57 +08:00
coolxitech
190455a1bd chore(ci): 添加手动触发工作流的支持
- 在 GitHub Actions 工作流中启用 workflow_dispatch 触发器
- 允许通过 GitHub UI 手动启动 ogame-vue-ts 构建任务
- 保留现有的 push 到 main 分支的自动触发机制
2025-12-13 10:23:55 +08:00
coolxitech
67d71ece0c chore: 更新.gitignore文件
- 添加 pnpm-lock.yaml 到忽略列表
- 保持编辑器相关目录和文件的忽略规则不变
2025-12-13 10:20:54 +08:00
coolxitech
0520609f61 chore(pnpm): 配置仅构建依赖项并更新包管理器版本
- 添加 vue-demi 到 onlyBuiltDependencies 配置
- 更新 pnpm 包管理器到版本 10.13.1
- 升级 vite 覆盖配置为 rolldown-vite 7.2.5
2025-12-13 10:20:24 +08:00
coolxitech
ec69c77956 fix(gameStore): 修正侧边栏折叠逻辑
- 调整侧边栏折叠条件以适配大屏设备
- 移除小屏设备上的错误折叠状态
- 确保默认状态下侧边栏在宽屏上展开
2025-12-13 10:20:09 +08:00
coolxitech
469c5a0170 feat(docker): 优化Docker构建流程并支持生产环境部署
- 引入多阶段构建,分离构建与运行时环境
- 使用node:20-alpine作为构建基础镜像,减小体积
- 添加pnpm包管理器并优化依赖安装流程
- 利用缓存机制提升构建效率
- 新增nginx.conf配置文件解决Vue Router历史模式404问题
- 设置静态资源缓存策略提升性能
- 更改默认启动命令为Nginx服务方式运行应用
- 移除开发服务器相关指令,适配生产部署需求
2025-12-13 10:19:58 +08:00
329 changed files with 71110 additions and 4906 deletions

View File

@@ -1,31 +0,0 @@
---
name: BUG反馈
about: 报告项目中发现的缺陷或问题
title: '[BUG] 简要描述问题'
labels: 'bug'
assignees: ''
---
**问题描述**
清晰准确地描述遇到的问题
**重现步骤**
1. 第一步操作
2. 第二步操作
3. 出现问题的操作
**期望行为**
描述您认为正确的行为应该是怎样的
**实际行为**
描述实际发生的错误行为
**环境信息**
- 操作系统:
- 浏览器(如适用):
- 项目版本:
**截图或日志(可选)**
如果有错误截图或日志,请提供

View File

@@ -1,19 +0,0 @@
---
name: 功能请求
about: 请求添加新功能或改进现有功能
title: '[功能] 简要描述功能'
labels: 'enhancement'
assignees: ''
---
**功能描述**
清晰描述您希望添加的功能
**功能背景**
说明为什么需要这个功能,它能解决什么问题
**建议实现方案(可选)**
如果有具体的实现想法,可以在这里描述
**附加信息**
任何其他有助于理解这个功能的信息

View File

@@ -1,19 +0,0 @@
---
name: 反馈建议
about: 为这个项目提出功能建议或改进意见
title: '[建议] 简要描述您的建议'
labels: 'enhancement'
assignees: ''
---
**您的建议是什么?**
请清晰描述您希望添加的功能或改进点
**为什么需要这个功能/改进?**
说明这个建议会解决什么问题或带来什么价值
**您期望的实现方式(可选)**
如果有具体的实现想法,可以在这里描述
**附加信息(可选)**
任何其他有助于理解这个建议的信息

View File

@@ -1,19 +0,0 @@
---
name: 文档改进
about: 报告文档问题或建议改进
title: '[文档] 简要描述问题'
labels: 'documentation'
assignees: ''
---
**文档位置**
指出需要改进的文档路径或 URL
**当前问题**
描述当前文档存在的问题或不清晰的地方
**改进建议**
提出具体的改进建议
**附加信息(可选)**
任何其他有助于改进文档的信息

242
.github/workflows/build.yml vendored Normal file
View File

@@ -0,0 +1,242 @@
name: 构建多平台程序 (Go Server & Electron Client)
on:
push:
branches:
- main
jobs:
# 1. 构建 Go 服务端
build-server:
name: Build Server (${{ matrix.goos }}-${{ matrix.goarch }})
runs-on: ubuntu-latest
strategy:
matrix:
include:
- goos: windows
goarch: amd64
executable: OGame-Vue-Ts-server-win.exe
- goos: linux
goarch: amd64
executable: OGame-Vue-Ts-server-linux
- goos: linux
goarch: arm64
executable: OGame-Vue-Ts-server-linux-arm64
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 8
- name: Setup Node & Go
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- uses: actions/setup-go@v5
with:
go-version: '1.23'
cache: true
- name: Build Frontend & Server
run: |
pnpm install
pnpm run build
go mod tidy
GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -ldflags="-s -w" -o ${{ matrix.executable }} main.go
- name: Upload Server Binaries
uses: actions/upload-artifact@v4
with:
name: server-${{ matrix.goos }}-${{ matrix.goarch }}
path: ${{ matrix.executable }}
# 2. 构建 Android APK (ARM64, ARMv7, x86_64)
build-android:
name: Build Android APK
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 8
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'pnpm'
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Setup Android SDK
uses: android-actions/setup-android@v3
# 缓存 Gradle 依赖 (可节省 3-5 分钟)
- name: Cache Gradle
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: gradle-${{ runner.os }}-${{ hashFiles('android/**/*.gradle*', 'android/**/gradle-wrapper.properties') }}
restore-keys: |
gradle-${{ runner.os }}-
- name: Build Frontend
run: |
pnpm install
pnpm run build
- name: Install ImageMagick
run: sudo apt-get update && sudo apt-get install -y imagemagick
- name: Generate Android Icons
run: |
# 使用 ImageMagick 生成各尺寸图标
convert logo.png -resize 48x48 android/app/src/main/res/mipmap-mdpi/ic_launcher.png
convert logo.png -resize 48x48 android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
convert logo.png -resize 72x72 android/app/src/main/res/mipmap-hdpi/ic_launcher.png
convert logo.png -resize 72x72 android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
convert logo.png -resize 96x96 android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
convert logo.png -resize 96x96 android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
convert logo.png -resize 144x144 android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
convert logo.png -resize 144x144 android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
convert logo.png -resize 192x192 android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
convert logo.png -resize 192x192 android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
# foreground 图标需要更大108dp with 72dp safe zone
convert logo.png -resize 108x108 android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
convert logo.png -resize 162x162 android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
convert logo.png -resize 216x216 android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
convert logo.png -resize 324x324 android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
convert logo.png -resize 432x432 android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
- name: Sync Capacitor
run: npx cap sync android
- name: Build APK (Release)
working-directory: android
run: |
chmod +x ./gradlew
./gradlew assembleRelease --no-daemon
- name: Upload APK Artifacts
uses: actions/upload-artifact@v4
with:
name: android-apk
path: android/app/build/outputs/apk/release/*.APK
# 3. 构建 Electron 客户端
build-electron:
name: Build Electron (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
platform: win
- os: macos-latest
platform: mac
- os: ubuntu-latest
platform: linux
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 8
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: Cache Electron Builder
uses: actions/cache@v4
with:
path: |
~/.cache/electron
~/.cache/electron-builder
key: electron-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
electron-${{ runner.os }}-
- name: Build Electron
run: |
pnpm install
pnpm run build:electron --${{ matrix.platform }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# 【关键点】这里只上传安装包后缀,不上传文件夹
- name: Upload Electron Installers
uses: actions/upload-artifact@v4
with:
name: electron-${{ matrix.platform }}
path: |
pkg/*.exe
pkg/*.dmg
pkg/*.AppImage
# 4. 发布 Release
release:
needs: [ build-server, build-android, build-electron ]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Get Version
id: get_version
run: echo "VERSION=v$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT
# 1. 下载时,不使用 merge-multiple防止覆盖冲突
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
path: ./raw-assets
# 2. 核心步骤:手动移动文件到一个扁平目录,并强制重命名
- name: Flatten and Rename Assets
run: |
mkdir -p ./final-release
# 移动 Server 文件并确保名字唯一
cp ./raw-assets/server-windows-amd64/OGame-Vue-Ts-server-win.exe ./final-release/OGame-Vue-Ts-server-win.exe || cp ./raw-assets/server-windows-amd64/server-windows-amd64.exe ./final-release/OGame-Vue-Ts-server-win.exe || true
cp ./raw-assets/server-linux-amd64/OGame-Vue-Ts-server-linux ./final-release/OGame-Vue-Ts-server-linux || true
cp ./raw-assets/server-linux-arm64/OGame-Vue-Ts-server-linux-arm64 ./final-release/OGame-Vue-Ts-server-linux-arm64 || true
# 移动 Electron 安装包 (排除 unpacked 目录)
find ./raw-assets/electron-* -type f \( -name "*.exe" -o -name "*.dmg" -o -name "*.AppImage" -o -name "*.zip" \) -exec cp {} ./final-release/ \;
# 移动 Android APK
find ./raw-assets/android-apk -type f -name "*.APK" -exec cp {} ./final-release/ \; || true
# 检查结果
echo "Final assets to upload:"
ls -R ./final-release
# 3. 删除已存在的同名 APK 资源(避免 422 错误)
- name: Delete existing APK assets
run: |
VERSION=${{ steps.get_version.outputs.VERSION }}
# 获取 release 中的现有 assets 并删除 APK 文件
gh release view "$VERSION" --json assets -q '.assets[].name' 2>/dev/null | grep -i '\.APK$' | while read asset; do
echo "Deleting existing asset: $asset"
gh release delete-asset "$VERSION" "$asset" -y || true
done
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# 4. 一次性上传,禁止重复匹配
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.get_version.outputs.VERSION }}
name: Release ${{ steps.get_version.outputs.VERSION }}
# 重点:只上传这个干净目录下的所有文件,不要再写具体的通配符防止重复
files: ./final-release/*
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

47
.github/workflows/github-pages.yml vendored Normal file
View File

@@ -0,0 +1,47 @@
name: 构建 Github Pages
on:
push:
branches: [ main ] # 如果你的主分支叫 master请改为 master
permissions:
contents: read
pages: write
id-token: write
jobs:
build-and-deploy:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: 检出代码
uses: actions/checkout@v6
- name: 安装 pnpm
uses: pnpm/action-setup@v4
- name: 安装 Nodejs
uses: actions/setup-node@v6
with:
node-version: 20
cache: 'pnpm'
- name: 安装依赖
run: pnpm install
- name: 构建前端项目
run: pnpm run build
# 关键步骤:告诉 GitHub Actions 跳过 Jekyll 检查
- name: 配置 Github Pages
uses: actions/configure-pages@v5
- name: 上传构建版
uses: actions/upload-pages-artifact@v4
with:
path: './docs'
- name: 部署到 GitHub Pages
uses: actions/deploy-pages@v4

View File

@@ -1,105 +1,60 @@
name: 自动化创建Docker镜像
name: Docker 多架构构建并发布
on:
push:
branches:
- main
branches: [ main ]
tags: [ 'v*.*.*' ] # 打 tag 时也触发
workflow_dispatch:
permissions:
contents: read
packages: write
jobs:
build-amd64:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: 代码
uses: actions/checkout@v2
- name: 代码
uses: actions/checkout@v4
with:
fetch-depth: 0
# QEMU 用于支持多架构构建(必须)
- name: 设置 QEMU
uses: docker/setup-qemu-action@v3
# Buildx 是目前官方唯一推荐的多架构构建方式
- name: 设置 Docker Buildx
uses: docker/setup-buildx-action@v3
# 登录 GHCR始终执行
- name: 登录 GitHub Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_TOKEN }}
password: ${{ secrets.GITHUB_TOKEN }}
# 登录 Docker Hub只在用户名存在时执行
- name: 登录 Docker Hub
uses: docker/login-action@v2
if: vars.DOCKERHUB_USERNAME != '' # 只检查 vars忽略 secrets
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: 构建并推送 amd64 Docker镜像
uses: docker/build-push-action@v3
# 真正一键构建 + 推送多架构镜像amd64 + arm64
- name: 构建并推送多架构镜像
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64
platforms: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/ogame-vue-ts:amd64
${{ secrets.DOCKERHUB_USERNAME }}/ogame-vue-ts:amd64
build-arm64:
runs-on: ubuntu-22.04-arm
permissions:
contents: read
packages: write
steps:
- name: 检查代码
uses: actions/checkout@v2
- name: 登录 GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_TOKEN }}
- name: 登录 Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: 构建并推送 arm64 Docker镜像
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/arm64
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/ogame-vue-ts:arm64
${{ secrets.DOCKERHUB_USERNAME }}/ogame-vue-ts:arm64
create-manifest:
needs: [build-amd64, build-arm64]
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: 登录 GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_TOKEN }}
- name: 登录 Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: 创建并推送多架构清单
run: |
# GitHub Container Registry
docker manifest create ghcr.io/${{ github.repository_owner }}/ogame-vue-ts:latest \
ghcr.io/${{ github.repository_owner }}/ogame-vue-ts:amd64 \
ghcr.io/${{ github.repository_owner }}/ogame-vue-ts:arm64
docker manifest push ghcr.io/${{ github.repository_owner }}/ogame-vue-ts:latest
# Docker Hub
docker manifest create ${{ secrets.DOCKERHUB_USERNAME }}/ogame-vue-ts:latest \
${{ secrets.DOCKERHUB_USERNAME }}/ogame-vue-ts:amd64 \
${{ secrets.DOCKERHUB_USERNAME }}/ogame-vue-ts:arm64
docker manifest push ${{ secrets.DOCKERHUB_USERNAME }}/ogame-vue-ts:latest
ghcr.io/${{ github.repository_owner }}/ogame-vue-ts:latest
ghcr.io/${{ github.repository_owner }}/ogame-vue-ts:${{ github.sha }}
${{ vars.DOCKERHUB_USERNAME != '' && format('docker.io/{0}/ogame-vue-ts:latest', vars.DOCKERHUB_USERNAME) || '' }}
${{ vars.DOCKERHUB_USERNAME != '' && format('docker.io/{0}/ogame-vue-ts:{1}', vars.DOCKERHUB_USERNAME, github.sha) || '' }}
cache-from: type=gha
cache-to: type=gha,mode=max
outputs: type=image,name=target,annotation-index.org.opencontainers.image.description=OGame Vue Ts

13
.gitignore vendored
View File

@@ -11,6 +11,8 @@ CLAUDE.md
node_modules
dist
dist-ssr
dist-electron
docs
*.local
# Editor directories and files
@@ -24,3 +26,14 @@ dist-ssr
*.njsproj
*.sln
*.sw?
/docs
/docs/assets
# Android build outputs
android/.gradle
android/app/build
android/build
android/local.properties
android/.idea
android/*.iml
android/app/*.iml

View File

@@ -1,17 +1,22 @@
FROM node:latest
FROM node:lts-alpine AS builder
RUN mkdir -p /workspace
WORKDIR /workspace
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories
RUN apk update && apk add git
RUN npm config set registry https://registry.npmmirror.com
RUN cd /workspace
RUN git clone https://github.com/setube/ogame-vue-ts.git
RUN mv ./ogame-vue-ts/* . ; rm -rf ./ogame-vue-ts/
RUN npm install -g pnpm ; pnpm install ; npx vite build
RUN npm install -g pnpm ; pnpm install;
RUN pnpm run build
CMD ["npx", "vite", "preview", "--host", "0.0.0.0", "--port", "25121"]
FROM nginx:alpine
COPY nginx.conf /etc/nginx/conf.d/default.conf
RUN rm -rf /usr/share/nginx/html/*
COPY --from=builder /workspace/docs /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

125
README-DE.md Normal file
View File

@@ -0,0 +1,125 @@
<div align="center">
<img src="public/logo.svg" alt="OGame Vue TS Logo" width="128" height="128">
# OGame Vue TS
Ein modernes Weltraum-Strategiespiel basierend auf dem klassischen OGame, entwickelt mit Vue 3 und TypeScript.
[![GitHub Release](https://img.shields.io/github/v/release/setube/ogame-vue-ts?style=flat&logo=github&label=Release)](https://github.com/setube/ogame-vue-ts/releases/latest)
[![License: CC BY-NC 4.0](https://img.shields.io/badge/License-CC%20BY--NC%204.0-lightgrey.svg)](https://creativecommons.org/licenses/by-nc/4.0)
[![Tap Tap](https://img.shields.io/badge/TapTap-OGame%20Vue%20Ts-18d6e0)](https://www.taptap.cn/app/801190)
[简体中文](README.md)| [繁體中文](README-zh-TW.md) | [English](README-EN.md) | Deutsch | [Русский](README-RU.md) | [Español](README-ES.md) | [한국어](README-KO.md) | [日本語](README-JA.md)
</div>
## Über das Projekt
OGame Vue TS ist ein Einzelspieler-Weltraum-Strategiespiel im Browser, inspiriert vom klassischen OGame. Baue dein Imperium in der Galaxie auf, erforsche Technologien, konstruiere Raumschiffe und nimm an epischen Weltraumschlachten teil. Dieses Projekt wurde mit modernen Webtechnologien entwickelt und läuft vollständig im Browser mit lokaler Datenspeicherung.
## Hauptfunktionen
- **Gebäudeverwaltung** - Baue und verbessere verschiedene Gebäude auf Planeten und Monden
- **Technologieforschung** - Schalte fortschrittliche Technologien frei, um dein Imperium zu stärken
- **Flottenverwaltung** - Baue Schiffe, sende Missionen und nimm an taktischen Weltraumkämpfen teil
- **Verteidigungssysteme** - Errichte Verteidigungsanlagen zum Schutz deiner Kolonien
- **Offiziersystem** - Rekrutiere Offiziere für strategische Vorteile
- **Kampfsimulator** - Teste Kampfszenarien, bevor du Ressourcen einsetzt
- **Galaxieansicht** - Erkunde das Universum und interagiere mit anderen Planeten
- **Lokale Datenspeicherung** - Alle Spieldaten werden verschlüsselt im Browser gespeichert
- **Dunkler/Heller Modus** - Wähle dein bevorzugtes visuelles Thema
- **Warteschlangenverwaltung** - Verwalte mehrere Bau- und Forschungswarteschlangen
- **Mondgenerierung** - Wahrscheinlichkeitsbasierte Monderzeugung aus Trümmerfeldern
## Technologie-Stack
- **Frontend-Framework:** [Vue 3](https://vuejs.org) + Composition API (`<script setup>` Syntax)
- **Programmiersprache:** [TypeScript](https://www.typescriptlang.org) (mit strikter Typprüfung)
- **Build-Tool:** [Vite](https://vitejs.dev) (Custom Rolldown-Vite 7.2.5), [Golang](https://golang.org) (für plattformübergreifenden Webserver), [Electron](https://www.electronjs.org) (für plattformübergreifende Desktop-Anwendung)
- **Zustandsverwaltung:** [Pinia](https://pinia.vuejs.org) + Persistenz-Plugin
- **Routing:** [Vue Router 4](https://router.vuejs.org)
- **UI-Komponenten:** [shadcn-vue](https://www.shadcn-vue.com) (New York Stil)
- **Styling:** [Tailwind CSS v4](https://tailwindcss.com) + CSS-Variablen
- **Icons:** [Lucide Vue Next](https://lucide.dev)
- **Animationen:** [tw-animate-css](https://www.npmjs.com/package/tw-animate-css)
- **Internationalisierung:** Eigene i18n-Implementierung
## Schnellstart
### Voraussetzungen
- [Node.js](https://nodejs.org) (Version 18 oder höher empfohlen)
- [pnpm](https://pnpm.io) (Version 10.13.1 oder höher)
- [Go](https://golang.org) (Version 1.21 oder höher) (optional)
### Installation
```bash
# Repository klonen
git clone https://github.com/setube/ogame-vue-ts.git
# In das Projektverzeichnis wechseln
cd ogame-vue-ts
# Abhängigkeiten installieren
pnpm install
```
### Entwicklung
```bash
# Entwicklungsserver starten (läuft auf Port 25121)
pnpm dev
```
Öffne deinen Browser und besuche `http://localhost:25121`
### Produktions-Build
```bash
# Anwendung bauen
pnpm build
# Produktions-Build vorschauen
pnpm preview
```
## Datensicherheit
Alle Spieldaten werden automatisch mit AES-Verschlüsselung verschlüsselt, bevor sie im lokalen Speicher des Browsers gespeichert werden. Dein Spielfortschritt ist sicher und privat.
## Anpassung
Die Anwendung unterstützt vollständige Theme-Anpassung durch Tailwind CSS-Variablen, die in `src/style.css` definiert sind. Du kannst einfach zwischen hellem und dunklem Modus wechseln.
## Mitwirken
Beiträge sind willkommen! Bitte zögere nicht, Issues oder Pull Requests einzureichen.
## Lizenz
Dieses Werk ist lizenziert unter der [Creative Commons Namensnennung-Nicht kommerziell 4.0 International Lizenz](https://creativecommons.org/licenses/by-nc/4.0).
### Du darfst:
- **Teilen** — das Material in jedwedem Format oder Medium vervielfältigen und weiterverbreiten
- **Bearbeiten** — das Material remixen, verändern und darauf aufbauen
### Unter folgenden Bedingungen:
- **Namensnennung** — Du musst angemessene Urheber- und Rechteangaben machen, einen Link zur Lizenz beifügen und angeben, ob Änderungen vorgenommen wurden
- **Nicht kommerziell** — Du darfst das Material nicht für kommerzielle Zwecke nutzen
## Danksagung
Dieses Projekt wurde vom originalen [OGame](https://ogame.org) Browserspiel inspiriert. Alle Spielmechaniken und Designelemente wurden zu Bildungs- und Unterhaltungszwecken neu implementiert.
## Haftungsausschluss
Dieses Projekt ist nicht mit Gameforge AG oder dem offiziellen OGame-Spiel verbunden, wird nicht von diesen unterstützt oder ist mit diesen verbunden. Es ist ein unabhängiges Fan-Projekt, das zu Bildungszwecken und zur persönlichen Unterhaltung erstellt wurde.
---
<div align="center">
Mit ❤️ erstellt von <a href="https://github.com/setube">setube</a>
<br>
© 2025 - Alle Rechte vorbehalten (außer den durch die CC BY-NC 4.0 Lizenz gewährten Rechten)
</div>

View File

@@ -5,11 +5,11 @@
A modern of the classic OGame space strategy game, built with Vue 3 and TypeScript.
[![License: CC BY-NC 4.0](https://img.shields.io/badge/License-CC%20BY--NC%204.0-lightgrey.svg)](https://creativecommons.org/licenses/by-nc/4.0/)
[![Vue 3](https://img.shields.io/badge/Vue-3.5-brightgreen.svg)](https://vuejs.org/)
[![TypeScript](https://img.shields.io/badge/TypeScript-5.9-blue.svg)](https://www.typescriptlang.org/)
[![Vite](https://img.shields.io/badge/Vite-7.2-646CFF.svg)](https://vitejs.dev/)
[简体中文](README.md) | English
[![GitHub Release](https://img.shields.io/github/v/release/setube/ogame-vue-ts?style=flat&logo=github&label=Release)](https://github.com/setube/ogame-vue-ts/releases/latest)
[![License: CC BY-NC 4.0](https://img.shields.io/badge/License-CC%20BY--NC%204.0-lightgrey.svg)](https://creativecommons.org/licenses/by-nc/4.0)
[![Tap Tap](https://img.shields.io/badge/TapTap-OGame%20Vue%20Ts-18d6e0)](https://www.taptap.cn/app/801190)
[简体中文](README.md)| [繁體中文](README-zh-TW.md) | English | [Deutsch](README-DE.md) | [Русский](README-RU.md) | [Español](README-ES.md) | [한국어](README-KO.md) | [日本語](README-JA.md)
</div>
@@ -19,7 +19,6 @@ OGame Vue TS is a single-player, browser-based space strategy game inspired by t
## Features
- **Multi-language Support** - Available in 6 languages: English, Chinese (Simplified & Traditional), German, Russian, and Korean
- **Building Management** - Construct and upgrade various buildings on planets and moons
- **Research Technologies** - Unlock advanced technologies to enhance your empire
- **Fleet Management** - Build ships, send missions, and engage in tactical space battles
@@ -34,14 +33,14 @@ OGame Vue TS is a single-player, browser-based space strategy game inspired by t
## Tech Stack
- **Frontend Framework:** [Vue 3](https://vuejs.org/) with Composition API (`<script setup>`)
- **Language:** [TypeScript](https://www.typescriptlang.org/) with strict type checking
- **Build Tool:** [Vite](https://vitejs.dev/) (Custom Rolldown-Vite 7.2.5)
- **State Management:** [Pinia](https://pinia.vuejs.org/) with persisted state plugin
- **Routing:** [Vue Router 4](https://router.vuejs.org/)
- **UI Components:** [shadcn-vue](https://www.shadcn-vue.com/) (New York style)
- **Styling:** [Tailwind CSS v4](https://tailwindcss.com/) with CSS variables
- **Icons:** [Lucide Vue Next](https://lucide.dev/)
- **Frontend Framework:** [Vue 3](https://vuejs.org) with Composition API (`<script setup>`)
- **Language:** [TypeScript](https://www.typescriptlang.org) with strict type checking
- **Build Tool:** [Vite](https://vitejs.dev) (Custom Rolldown-Vite 7.2.5)、[Golang](https://golang.org)(Building cross-platform Web server.)、[Electron](https://www.electronjs.org)(Building cross-platform visual interfaces)
- **State Management:** [Pinia](https://pinia.vuejs.org) with persisted state plugin
- **Routing:** [Vue Router 4](https://router.vuejs.org)
- **UI Components:** [shadcn-vue](https://www.shadcn-vue.com) (New York style)
- **Styling:** [Tailwind CSS v4](https://tailwindcss.com) with CSS variables
- **Icons:** [Lucide Vue Next](https://lucide.dev)
- **Animations:** [tw-animate-css](https://www.npmjs.com/package/tw-animate-css)
- **Internationalization:** Custom i18n implementation
@@ -49,8 +48,9 @@ OGame Vue TS is a single-player, browser-based space strategy game inspired by t
### Prerequisites
- [Node.js](https://nodejs.org/) (version 18 or higher recommended)
- [pnpm](https://pnpm.io/) (version 10.13.1 or higher)
- [Node.js](https://nodejs.org) (version 18 or higher recommended)
- [pnpm](https://pnpm.io) (version 10.13.1 or higher)
- [Go](https://golang.org) (version 1.21 or higher recommended) (optional for binary builds)
### Installation
@@ -84,98 +84,6 @@ pnpm build
pnpm preview
```
## Project Structure
```
ogame-vue-ts/
├── public/ # Static assets
│ └── logo.svg # Application logo
├── src/
│ ├── assets/ # Dynamic assets
│ ├── components/ # Vue components
│ │ └── ui/ # shadcn-vue UI components
│ ├── composables/ # Vue composables
│ ├── config/ # Game configuration
│ ├── lib/ # Utility libraries
│ ├── locales/ # i18n translation files
│ ├── logic/ # Game logic modules
│ │ ├── buildingLogic.ts
│ │ ├── buildingValidation.ts
│ │ ├── fleetLogic.ts
│ │ ├── moonLogic.ts
│ │ ├── moonValidation.ts
│ │ ├── researchLogic.ts
│ │ ├── researchValidation.ts
│ │ ├── shipLogic.ts
│ │ └── shipValidation.ts
│ ├── router/ # Vue Router configuration
│ ├── stores/ # Pinia state stores
│ ├── types/ # TypeScript type definitions
│ ├── utils/ # Utility functions
│ ├── views/ # Page components
│ │ ├── OverviewView.vue
│ │ ├── BuildingsView.vue
│ │ ├── ResearchView.vue
│ │ ├── ShipyardView.vue
│ │ ├── DefenseView.vue
│ │ ├── FleetView.vue
│ │ ├── GalaxyView.vue
│ │ ├── OfficersView.vue
│ │ ├── BattleSimulatorView.vue
│ │ ├── MessagesView.vue
│ │ └── SettingsView.vue
│ ├── App.vue # Root component
│ ├── main.ts # Application entry point
│ └── style.css # Global styles
├── .github/
│ └── ISSUE_TEMPLATE/ # GitHub issue templates
├── LICENSE # CC BY-NC 4.0 License
├── package.json # Project dependencies
├── tsconfig.json # TypeScript configuration
└── vite.config.ts # Vite configuration
```
## Available Languages
- 🇺🇸 English
- 🇨🇳 简体中文 (Simplified Chinese)
- 🇹🇼 繁體中文 (Traditional Chinese)
- 🇩🇪 Deutsch (German)
- 🇷🇺 Русский (Russian)
- 🇰🇷 한국어 (Korean)
## Game Features
### Resource Management
- **Metal** - Primary construction material
- **Crystal** - Advanced technology component
- **Deuterium** - Fuel and research resource
- **Dark Matter** - Premium resource
- **Energy** - Powers your facilities
### Building Types
- **Resource Buildings** - Metal Mine, Crystal Mine, Deuterium Synthesizer, Solar Plant
- **Facilities** - Robotics Factory, Shipyard, Research Lab, Storage facilities
- **Special Buildings** - Nanite Factory, Terraformer, and more
### Technologies
- **Energy Technology** - Improves energy efficiency
- **Laser Technology** - Enhances weapon systems
- **Ion Technology** - Advanced propulsion and weapons
- **Hyperspace Technology** - Enables faster travel
- **Plasma Technology** - Ultimate weapon systems
- And many more...
### Ship Classes
- **Civil Ships** - Small/Large Cargo, Colony Ship, Recycler
- **Combat Ships** - Light/Heavy Fighter, Cruiser, Battleship, Bomber
- **Special Ships** - Deathstar, Battlecruiser, Destroyer
### Defense Systems
- Rocket Launcher, Light/Heavy Laser, Gauss Cannon
- Ion Cannon, Plasma Turret
- Small/Large Shield Dome
## Data Security
All game data is automatically encrypted using AES encryption before being stored in your browser's local storage. Your game progress is secure and private.
@@ -188,16 +96,9 @@ The application supports full theme customization through Tailwind CSS variables
Contributions are welcome! Please feel free to submit issues or pull requests.
### Issue Templates
We provide the following issue templates in both Chinese and English:
- Bug Report
- Feature Request
- Documentation Improvement
- eedback & Suggestion
## License
This work is licensed under the [Creative Commons Attribution-NonCommercial 4.0 International License](https://creativecommons.org/licenses/by-nc/4.0/).
This work is licensed under the [Creative Commons Attribution-NonCommercial 4.0 International License](https://creativecommons.org/licenses/by-nc/4.0).
### You are free to:
- **Share** — copy and redistribute the material in any medium or format
@@ -211,7 +112,7 @@ This work is licensed under the [Creative Commons Attribution-NonCommercial 4.0
## Acknowledgments
This project is inspired by the original [OGame](https://ogame.org/) browser game. All game mechanics and design elements are reimplemented for educational and entertainment purposes.
This project is inspired by the original [OGame](https://ogame.org) browser game. All game mechanics and design elements are reimplemented for educational and entertainment purposes.
## Disclaimer
@@ -220,7 +121,7 @@ This project is not affiliated with, endorsed by, or connected to Gameforge AG o
---
<div align="center">
Made with ❤️ by Jun Qian
Made with ❤️ by <a href="https://github.com/setube">setube</a>
<br>
© 2025 - All rights reserved (except those granted by CC BY-NC 4.0 License)
</div>

125
README-ES.md Normal file
View File

@@ -0,0 +1,125 @@
<div align="center">
<img src="public/logo.svg" alt="OGame Vue TS Logo" width="128" height="128">
# OGame Vue TS
Un juego de estrategia espacial moderno basado en Vue 3 y TypeScript.
[![GitHub Release](https://img.shields.io/github/v/release/setube/ogame-vue-ts?style=flat&logo=github&label=Release)](https://github.com/setube/ogame-vue-ts/releases/latest)
[![License: CC BY-NC 4.0](https://img.shields.io/badge/License-CC%20BY--NC%204.0-lightgrey.svg)](https://creativecommons.org/licenses/by-nc/4.0)
[![Tap Tap](https://img.shields.io/badge/TapTap-OGame%20Vue%20Ts-18d6e0)](https://www.taptap.cn/app/801190)
[简体中文](README.md) | [繁體中文](README-zh-TW.md) | [English](README-EN.md) | [Deutsch](README-DE.md) | [Русский](README-RU.md) | Español | [한국어](README-KO.md) | [日本語](README-JA.md)
</div>
## Acerca del Proyecto
OGame Vue TS es un juego de estrategia espacial basado en navegador, versión offline, inspirado en el clásico OGame. Construye tu imperio en la galaxia, investiga tecnologías, construye naves y participa en épicas batallas espaciales. Este proyecto está construido con tecnologías web modernas, se ejecuta completamente en el navegador, ofrece una experiencia de juego fluida y responsiva, y todos los datos se almacenan localmente.
## Características Principales
- **Gestión de Edificios** - Construye y mejora varios edificios en planetas y lunas
- **Investigación Tecnológica** - Desbloquea tecnologías avanzadas para fortalecer tu imperio
- **Gestión de Flotas** - Construye naves, envía misiones, participa en batallas espaciales tácticas
- **Sistema de Defensa** - Despliega instalaciones defensivas para proteger tus colonias
- **Sistema de Oficiales** - Recluta oficiales para obtener ventajas estratégicas
- **Simulador de Batallas** - Prueba escenarios de combate antes de invertir recursos
- **Vista Galáctica** - Explora el universo e interactúa con otros planetas
- **Persistencia de Datos Local** - Todos los datos del juego están encriptados y almacenados localmente en el navegador
- **Tema Oscuro/Claro** - Elige tu tema visual preferido
- **Gestión de Colas** - Administra múltiples colas de construcción e investigación
- **Generación de Lunas** - Mecanismo de generación de lunas basado en probabilidad desde campos de escombros
## Stack Tecnológico
- **Framework Frontend:** [Vue 3](https://vuejs.org) + Composition API (sintaxis `<script setup>`)
- **Lenguaje de Desarrollo:** [TypeScript](https://www.typescriptlang.org) (verificación de tipos estricta habilitada)
- **Herramientas de Construcción:** [Vite](https://vitejs.dev) (Rolldown-Vite 7.2.5 personalizado), [Golang](https://golang.org) (servidor web multiplataforma), [Electron](https://www.electronjs.org) (interfaz visual multiplataforma)
- **Gestión de Estado:** [Pinia](https://pinia.vuejs.org) + plugin de persistencia
- **Enrutamiento:** [Vue Router 4](https://router.vuejs.org)
- **Componentes UI:** [shadcn-vue](https://www.shadcn-vue.com) (estilo New York)
- **Estilos:** [Tailwind CSS v4](https://tailwindcss.com) + Variables CSS
- **Iconos:** [Lucide Vue Next](https://lucide.dev)
- **Animaciones:** [tw-animate-css](https://www.npmjs.com/package/tw-animate-css)
- **Internacionalización:** Implementación i18n personalizada
## Inicio Rápido
### Requisitos
- [Node.js](https://nodejs.org) (versión 18 o superior recomendada)
- [pnpm](https://pnpm.io) (versión 10.13.1 o superior)
- [Go](https://golang.org) (versión 1.21 o superior) (opcional)
### Instalación
```bash
# Clonar el repositorio
git clone https://github.com/setube/ogame-vue-ts.git
# Entrar al directorio del proyecto
cd ogame-vue-ts
# Instalar dependencias
pnpm install
```
### Desarrollo
```bash
# Iniciar servidor de desarrollo (puerto 25121)
pnpm dev
```
Visita `http://localhost:25121` en tu navegador
### Construcción para Producción
```bash
# Construir la aplicación
pnpm build
# Vista previa de la construcción
pnpm preview
```
## Seguridad de Datos
Todos los datos del juego se encriptan automáticamente usando AES antes de almacenarse en el almacenamiento local del navegador. Tu progreso de juego es seguro y privado.
## Personalización
La aplicación soporta personalización completa de temas a través de variables CSS de Tailwind definidas en `src/style.css`. Puedes cambiar fácilmente entre modo claro y oscuro.
## Contribuciones
¡Las contribuciones son bienvenidas! No dudes en enviar issues o pull requests.
## Licencia
Este trabajo está licenciado bajo la [Licencia Creative Commons Atribución-NoComercial 4.0 Internacional](https://creativecommons.org/licenses/by-nc/4.0).
### Eres libre de:
- **Compartir** — Copiar y redistribuir el material en cualquier medio o formato
- **Adaptar** — Remezclar, transformar y construir a partir del material
### Bajo los siguientes términos:
- **Atribución** — Debes dar crédito apropiado, proporcionar un enlace a la licencia e indicar si se realizaron cambios
- **NoComercial** — No puedes usar el material para fines comerciales
## Agradecimientos
Este proyecto está inspirado en el juego de navegador original [OGame](https://ogame.org). Todas las mecánicas de juego y elementos de diseño han sido reimplementados con fines educativos y de entretenimiento.
## Aviso Legal
Este proyecto no está afiliado, respaldado ni conectado con Gameforge AG o el juego oficial OGame. Este es un proyecto independiente de fans creado únicamente con fines educativos y de entretenimiento personal.
---
<div align="center">
Hecho con ❤️ por <a href="https://github.com/setube">setube</a>
<br>
© 2025 - Todos los derechos reservados (excepto los otorgados por la licencia CC BY-NC 4.0)
</div>

125
README-JA.md Normal file
View File

@@ -0,0 +1,125 @@
<div align="center">
<img src="public/logo.svg" alt="OGame Vue TS Logo" width="128" height="128">
# OGame Vue TS
Vue 3とTypeScriptで構築されたモダンな宇宙戦略ゲーム。
[![GitHub Release](https://img.shields.io/github/v/release/setube/ogame-vue-ts?style=flat&logo=github&label=Release)](https://github.com/setube/ogame-vue-ts/releases/latest)
[![License: CC BY-NC 4.0](https://img.shields.io/badge/License-CC%20BY--NC%204.0-lightgrey.svg)](https://creativecommons.org/licenses/by-nc/4.0)
[![Tap Tap](https://img.shields.io/badge/TapTap-OGame%20Vue%20Ts-18d6e0)](https://www.taptap.cn/app/801190)
[简体中文](README.md) | [繁體中文](README-zh-TW.md) | [English](README-EN.md) | [Deutsch](README-DE.md) | [Русский](README-RU.md) | [Español](README-ES.md) | [한국어](README-KO.md) | 日本語
</div>
## プロジェクトについて
OGame Vue TSは、クラシックなOGameにインスパイアされたシングルプレイヤー向けブラウザベースの宇宙戦略ゲームです。銀河に帝国を築き、テクロジーを研究し、宇宙船を建造し、壮大な宇宙戦闘に参加しましょう。このプロジェクトはモダンなWeb技術で構築されており、ブラウザ内で完全に動作し、すべてのデータはローカルに保存されます。
## 主な機能
- **建物管理** - 惑星と月で様々な建物を建設・アップグレード
- **技術研究** - 先進技術をアンロックして帝国を強化
- **艦隊管理** - 宇宙船を建造し、ミッションを派遣し、戦術的な宇宙戦闘に参加
- **防衛システム** - 防衛施設を配置してコロニーを守る
- **士官システム** - 士官を雇用して戦略的優位性を獲得
- **戦闘シミュレーター** - 資源を投入する前に戦闘シナリオをテスト
- **銀河ビュー** - 宇宙を探索し、他の惑星と交流
- **ローカルデータ永続化** - すべてのゲームデータは暗号化されブラウザにローカル保存
- **ダーク/ライトテーマ** - お好みのビジュアルテーマを選択
- **キュー管理** - 複数の建設・研究キューを管理
- **月の生成** - デブリフィールドからの確率ベースの月生成メカニズム
## 技術スタック
- **フロントエンドフレームワーク:** [Vue 3](https://vuejs.org) + Composition API (`<script setup>` 構文)
- **開発言語:** [TypeScript](https://www.typescriptlang.org) (厳密な型チェック有効)
- **ビルドツール:** [Vite](https://vitejs.dev) (カスタムRolldown-Vite 7.2.5)、[Golang](https://golang.org) (クロスプラットフォームWebサーバー)、[Electron](https://www.electronjs.org) (クロスプラットフォームビジュアルインターフェース)
- **状態管理:** [Pinia](https://pinia.vuejs.org) + 永続化プラグイン
- **ルーティング:** [Vue Router 4](https://router.vuejs.org)
- **UIコンポーネント:** [shadcn-vue](https://www.shadcn-vue.com) (New Yorkスタイル)
- **スタイリング:** [Tailwind CSS v4](https://tailwindcss.com) + CSS変数
- **アイコン:** [Lucide Vue Next](https://lucide.dev)
- **アニメーション:** [tw-animate-css](https://www.npmjs.com/package/tw-animate-css)
- **国際化:** カスタムi18n実装
## クイックスタート
### 必要条件
- [Node.js](https://nodejs.org) (バージョン18以上推奨)
- [pnpm](https://pnpm.io) (バージョン10.13.1以上)
- [Go](https://golang.org) (バージョン1.21以上) (オプション)
### インストール
```bash
# リポジトリをクローン
git clone https://github.com/setube/ogame-vue-ts.git
# プロジェクトディレクトリに移動
cd ogame-vue-ts
# 依存関係をインストール
pnpm install
```
### 開発
```bash
# 開発サーバーを起動 (ポート25121)
pnpm dev
```
ブラウザで `http://localhost:25121` にアクセス
### 本番ビルド
```bash
# アプリケーションをビルド
pnpm build
# 本番ビルドをプレビュー
pnpm preview
```
## データセキュリティ
すべてのゲームデータは、ブラウザのローカルストレージに保存される前にAESで自動的に暗号化されます。ゲームの進行状況は安全でプライベートです。
## カスタマイズ
アプリケーションは`src/style.css`で定義されたTailwind CSS変数による完全なテーマカスタマイズをサポートしています。ライトモードとダークモードを簡単に切り替えることができます。
## 貢献
貢献は大歓迎ですお気軽にissueやpull requestを提出してください。
## ライセンス
この作品は[クリエイティブ・コモンズ 表示-非営利 4.0 国際ライセンス](https://creativecommons.org/licenses/by-nc/4.0)の下でライセンスされています。
### あなたは自由に:
- **共有** — どのようなメディアやフォーマットでも資料をコピー・再配布できます
- **翻案** — 資料をリミックス、変形、加工できます
### 以下の条件に従う必要があります:
- **表示** — 適切なクレジットを表示し、ライセンスへのリンクを提供し、変更があったかどうかを示す必要があります
- **非営利** — 資料を営利目的で使用することはできません
## 謝辞
このプロジェクトはオリジナルの[OGame](https://ogame.org)ブラウザゲームにインスパイアされています。すべてのゲームメカニクスとデザイン要素は、教育およびエンターテイメント目的で再実装されています。
## 免責事項
このプロジェクトはGameforge AGや公式OGameゲームとは一切関係がなく、承認や接続もありません。これは教育と個人的なエンターテイメントのみを目的として作成された独立したファンプロジェクトです。
---
<div align="center">
❤️を込めて作成 by <a href="https://github.com/setube">setube</a>
<br>
© 2025 - All rights reserved (CC BY-NC 4.0ライセンスで付与された権利を除く)
</div>

125
README-KO.md Normal file
View File

@@ -0,0 +1,125 @@
<div align="center">
<img src="public/logo.svg" alt="OGame Vue TS Logo" width="128" height="128">
# OGame Vue TS
Vue 3와 TypeScript로 제작된 클래식 OGame을 기반으로 한 현대적인 우주 전략 게임입니다.
[![GitHub Release](https://img.shields.io/github/v/release/setube/ogame-vue-ts?style=flat&logo=github&label=Release)](https://github.com/setube/ogame-vue-ts/releases/latest)
[![License: CC BY-NC 4.0](https://img.shields.io/badge/License-CC%20BY--NC%204.0-lightgrey.svg)](https://creativecommons.org/licenses/by-nc/4.0)
[![Tap Tap](https://img.shields.io/badge/TapTap-OGame%20Vue%20Ts-18d6e0)](https://www.taptap.cn/app/801190)
[简体中文](README.md) | [繁體中文](README-zh-TW.md) | [English](README-EN.md) | [Deutsch](README-DE.md) | [Русский](README-RU.md) | [Español](README-ES.md) | 한국어 | [日本語](README-JA.md)
</div>
## 프로젝트 소개
OGame Vue TS는 클래식 OGame에서 영감을 받은 싱글플레이어 브라우저 기반 우주 전략 게임입니다. 은하계에서 제국을 건설하고, 기술을 연구하고, 우주선을 제작하고, 장대한 우주 전투에 참여하세요. 이 프로젝트는 현대 웹 기술로 제작되었으며, 로컬 데이터 저장과 함께 브라우저에서 완전히 실행됩니다.
## 주요 기능
- **건물 관리** - 행성과 달에서 다양한 건물을 건설하고 업그레이드
- **기술 연구** - 제국을 강화하기 위한 첨단 기술 해금
- **함대 관리** - 우주선 건조, 미션 파견, 전술적 우주 전투 참여
- **방어 시스템** - 식민지 보호를 위한 방어 시설 배치
- **장교 시스템** - 전략적 이점을 위한 장교 고용
- **전투 시뮬레이터** - 자원 투입 전 전투 시나리오 테스트
- **은하 뷰** - 우주 탐험 및 다른 행성과의 상호작용
- **로컬 데이터 저장** - 모든 게임 데이터는 암호화되어 브라우저에 로컬 저장
- **다크/라이트 모드** - 선호하는 비주얼 테마 선택
- **대기열 관리** - 여러 건설 및 연구 대기열 관리
- **달 생성** - 잔해 필드에서 확률 기반 달 생성
## 기술 스택
- **프론트엔드 프레임워크:** [Vue 3](https://vuejs.org) + Composition API (`<script setup>` 문법)
- **프로그래밍 언어:** [TypeScript](https://www.typescriptlang.org) (엄격한 타입 검사 활성화)
- **빌드 도구:** [Vite](https://vitejs.dev) (Custom Rolldown-Vite 7.2.5), [Golang](https://golang.org) (크로스 플랫폼 웹 서버 구축), [Electron](https://www.electronjs.org) (크로스 플랫폼 데스크톱 애플리케이션 구축)
- **상태 관리:** [Pinia](https://pinia.vuejs.org) + 지속성 플러그인
- **라우팅:** [Vue Router 4](https://router.vuejs.org)
- **UI 컴포넌트:** [shadcn-vue](https://www.shadcn-vue.com) (New York 스타일)
- **스타일링:** [Tailwind CSS v4](https://tailwindcss.com) + CSS 변수
- **아이콘:** [Lucide Vue Next](https://lucide.dev)
- **애니메이션:** [tw-animate-css](https://www.npmjs.com/package/tw-animate-css)
- **국제화:** 커스텀 i18n 구현
## 빠른 시작
### 요구 사항
- [Node.js](https://nodejs.org) (버전 18 이상 권장)
- [pnpm](https://pnpm.io) (버전 10.13.1 이상)
- [Go](https://golang.org) (버전 1.21 이상) (선택 사항)
### 설치
```bash
# 저장소 클론
git clone https://github.com/setube/ogame-vue-ts.git
# 프로젝트 디렉토리로 이동
cd ogame-vue-ts
# 의존성 설치
pnpm install
```
### 개발
```bash
# 개발 서버 시작 (포트 25121에서 실행)
pnpm dev
```
브라우저를 열고 `http://localhost:25121`로 이동하세요
### 프로덕션 빌드
```bash
# 애플리케이션 빌드
pnpm build
# 프로덕션 빌드 미리보기
pnpm preview
```
## 데이터 보안
모든 게임 데이터는 브라우저의 로컬 스토리지에 저장되기 전에 AES 암호화로 자동 암호화됩니다. 게임 진행 상황은 안전하고 비공개로 유지됩니다.
## 커스터마이징
애플리케이션은 `src/style.css`에 정의된 Tailwind CSS 변수를 통해 완전한 테마 커스터마이징을 지원합니다. 라이트 모드와 다크 모드 간에 쉽게 전환할 수 있습니다.
## 기여
기여를 환영합니다! 이슈나 풀 리퀘스트를 자유롭게 제출해 주세요.
## 라이선스
이 작품은 [크리에이티브 커먼즈 저작자표시-비영리 4.0 국제 라이선스](https://creativecommons.org/licenses/by-nc/4.0)에 따라 라이선스가 부여됩니다.
### 자유롭게:
- **공유** — 어떤 매체나 포맷으로든 자료를 복사하고 재배포할 수 있습니다
- **변경** — 자료를 리믹스, 변형하고 자료를 기반으로 2차 저작물을 만들 수 있습니다
### 다음 조건을 따라야 합니다:
- **저작자표시** — 적절한 출처를 표시하고, 라이선스 링크를 제공하며, 변경이 있었는지 표시해야 합니다
- **비영리** — 이 자료를 상업적 목적으로 사용할 수 없습니다
## 감사의 말
이 프로젝트는 원작 [OGame](https://ogame.org) 브라우저 게임에서 영감을 받았습니다. 모든 게임 메커니즘과 디자인 요소는 교육 및 오락 목적으로 재구현되었습니다.
## 면책 조항
이 프로젝트는 Gameforge AG 또는 공식 OGame 게임과 제휴, 보증 또는 연결되어 있지 않습니다. 이것은 교육 목적과 개인적인 즐거움을 위해 만들어진 독립적인 팬 프로젝트입니다.
---
<div align="center">
❤️를 담아 제작, 작성자: <a href="https://github.com/setube">setube</a>
<br>
© 2025 - 모든 권리 보유 (CC BY-NC 4.0 라이선스에 의해 부여된 권리 제외)
</div>

125
README-RU.md Normal file
View File

@@ -0,0 +1,125 @@
<div align="center">
<img src="public/logo.svg" alt="OGame Vue TS Logo" width="128" height="128">
# OGame Vue TS
Современная космическая стратегическая игра, вдохновлённая классической OGame, созданная на Vue 3 и TypeScript.
[![GitHub Release](https://img.shields.io/github/v/release/setube/ogame-vue-ts?style=flat&logo=github&label=Release)](https://github.com/setube/ogame-vue-ts/releases/latest)
[![License: CC BY-NC 4.0](https://img.shields.io/badge/License-CC%20BY--NC%204.0-lightgrey.svg)](https://creativecommons.org/licenses/by-nc/4.0)
[![Tap Tap](https://img.shields.io/badge/TapTap-OGame%20Vue%20Ts-18d6e0)](https://www.taptap.cn/app/801190)
[简体中文](README.md) | [繁體中文](README-zh-TW.md) | [English](README-EN.md) | [Deutsch](README-DE.md) | Русский | [Español](README-ES.md) | [한국어](README-KO.md) | [日本語](README-JA.md)
</div>
## О проекте
OGame Vue TS — это однопользовательская браузерная космическая стратегическая игра, вдохновлённая классической OGame. Постройте свою империю в галактике, исследуйте технологии, создавайте космические корабли и участвуйте в эпических космических сражениях. Этот проект создан с использованием современных веб-технологий и полностью работает в браузере с локальным хранением данных.
## Основные возможности
- **Управление зданиями** - Стройте и улучшайте различные здания на планетах и лунах
- **Исследование технологий** - Открывайте передовые технологии для усиления вашей империи
- **Управление флотом** - Стройте корабли, отправляйте миссии, участвуйте в тактических космических боях
- **Системы обороны** - Размещайте оборонительные сооружения для защиты ваших колоний
- **Система офицеров** - Нанимайте офицеров для получения стратегических преимуществ
- **Боевой симулятор** - Тестируйте боевые сценарии перед вложением ресурсов
- **Вид галактики** - Исследуйте вселенную и взаимодействуйте с другими планетами
- **Локальное хранение данных** - Все игровые данные зашифрованы и хранятся локально в браузере
- **Тёмный/светлый режим** - Выберите предпочитаемую визуальную тему
- **Управление очередями** - Управляйте несколькими очередями строительства и исследований
- **Генерация луны** - Вероятностное создание луны из поля обломков
## Технологический стек
- **Frontend-фреймворк:** [Vue 3](https://vuejs.org) + Composition API (синтаксис `<script setup>`)
- **Язык программирования:** [TypeScript](https://www.typescriptlang.org) (со строгой проверкой типов)
- **Инструмент сборки:** [Vite](https://vitejs.dev) (Custom Rolldown-Vite 7.2.5), [Golang](https://golang.org) (для кроссплатформенного веб-сервера), [Electron](https://www.electronjs.org) (для кроссплатформенного десктоп-приложения)
- **Управление состоянием:** [Pinia](https://pinia.vuejs.org) + плагин персистентности
- **Маршрутизация:** [Vue Router 4](https://router.vuejs.org)
- **UI-компоненты:** [shadcn-vue](https://www.shadcn-vue.com) (стиль New York)
- **Стилизация:** [Tailwind CSS v4](https://tailwindcss.com) + CSS-переменные
- **Иконки:** [Lucide Vue Next](https://lucide.dev)
- **Анимации:** [tw-animate-css](https://www.npmjs.com/package/tw-animate-css)
- **Интернационализация:** Собственная реализация i18n
## Быстрый старт
### Требования
- [Node.js](https://nodejs.org) (рекомендуется версия 18 или выше)
- [pnpm](https://pnpm.io) (версия 10.13.1 или выше)
- [Go](https://golang.org) (версия 1.21 или выше) (опционально)
### Установка
```bash
# Клонировать репозиторий
git clone https://github.com/setube/ogame-vue-ts.git
# Перейти в директорию проекта
cd ogame-vue-ts
# Установить зависимости
pnpm install
```
### Разработка
```bash
# Запустить сервер разработки (работает на порту 25121)
pnpm dev
```
Откройте браузер и перейдите по адресу `http://localhost:25121`
### Сборка для продакшена
```bash
# Собрать приложение
pnpm build
# Предпросмотр продакшен-сборки
pnpm preview
```
## Безопасность данных
Все игровые данные автоматически шифруются с помощью AES перед сохранением в локальном хранилище браузера. Ваш игровой прогресс защищён и приватен.
## Кастомизация
Приложение поддерживает полную настройку темы через CSS-переменные Tailwind, определённые в `src/style.css`. Вы можете легко переключаться между светлым и тёмным режимами.
## Участие в разработке
Приветствуем вклад в проект! Пожалуйста, не стесняйтесь создавать issues или pull requests.
## Лицензия
Эта работа лицензирована под [Creative Commons Attribution-NonCommercial 4.0 International License](https://creativecommons.org/licenses/by-nc/4.0).
### Вы можете:
- **Делиться** — копировать и распространять материал в любом формате или на любом носителе
- **Адаптировать** — ремиксовать, преобразовывать и создавать на основе материала
### При соблюдении следующих условий:
- **Атрибуция** — Вы должны указать соответствующую атрибуцию, предоставить ссылку на лицензию и указать, были ли внесены изменения
- **Некоммерческое использование** — Вы не можете использовать материал в коммерческих целях
## Благодарности
Этот проект вдохновлён оригинальной браузерной игрой [OGame](https://ogame.org). Все игровые механики и элементы дизайна были переосмыслены в образовательных и развлекательных целях.
## Отказ от ответственности
Этот проект не связан с Gameforge AG или официальной игрой OGame, не одобрен и не поддерживается ими. Это независимый фан-проект, созданный в образовательных целях и для личного развлечения.
---
<div align="center">
Сделано с ❤️ автором <a href="https://github.com/setube">setube</a>
<br>
© 2025 - Все права защищены (кроме прав, предоставленных лицензией CC BY-NC 4.0)
</div>

125
README-zh-TW.md Normal file
View File

@@ -0,0 +1,125 @@
<div align="center">
<img src="public/logo.svg" alt="OGame Vue TS Logo" width="128" height="128">
# OGame Vue TS
一個基於 Vue 3 和 TypeScript 構建的現代化 OGame 太空策略遊戲。
[![GitHub Release](https://img.shields.io/github/v/release/setube/ogame-vue-ts?style=flat&logo=github&label=Release)](https://github.com/setube/ogame-vue-ts/releases/latest)
[![License: CC BY-NC 4.0](https://img.shields.io/badge/License-CC%20BY--NC%204.0-lightgrey.svg)](https://creativecommons.org/licenses/by-nc/4.0)
[![Tap Tap](https://img.shields.io/badge/TapTap-OGame%20Vue%20Ts-18d6e0)](https://www.taptap.cn/app/801190)
[简体中文](README.md) | 繁體中文 | [English](README-EN.md) | [Deutsch](README-DE.md) | [Русский](README-RU.md) | [Español](README-ES.md) | [한국어](README-KO.md) | [日本語](README-JA.md)
</div>
## 關於專案
OGame Vue TS 是一款受經典 OGame 遊戲啟發的單機版、基於瀏覽器的太空策略遊戲。在銀河系中建立你的帝國,研究科技,建造艦船,參與史詩般的太空戰鬥。本專案採用現代 Web 技術構建,完全在瀏覽器中運行,提供流暢且響應迅速的遊戲體驗,所有數據都儲存在本地。
## 核心特性
- **建築管理** - 在行星和月球上建造和升級各種建築
- **科技研究** - 解鎖先進科技來增強你的帝國
- **艦隊管理** - 建造艦船、派遣任務、參與戰術太空戰鬥
- **防禦系統** - 部署防禦設施來保護你的殖民地
- **軍官系統** - 招募軍官以獲得戰略優勢
- **戰鬥模擬器** - 在投入資源前測試戰鬥場景
- **銀河視圖** - 探索宇宙並與其他星球互動
- **本地數據持久化** - 所有遊戲數據都經過加密並儲存在瀏覽器本地
- **深色/淺色主題** - 選擇你喜歡的視覺主題
- **隊列管理** - 管理多個建造和研究隊列
- **月球生成** - 基於概率的月球從殘骸場生成機制
## 技術棧
- **前端框架:** [Vue 3](https://vuejs.org) + Composition API (`<script setup>` 語法)
- **開發語言:** [TypeScript](https://www.typescriptlang.org) (啟用嚴格類型檢查)
- **構建工具:** [Vite](https://vitejs.dev) (自定義 Rolldown-Vite 7.2.5)、[Golang](https://golang.org)(構建跨平台的Web服務端)、[Electron](https://www.electronjs.org)(構建跨平台可視化介面)
- **狀態管理:** [Pinia](https://pinia.vuejs.org) + 持久化插件
- **路由管理:** [Vue Router 4](https://router.vuejs.org)
- **UI 組件:** [shadcn-vue](https://www.shadcn-vue.com) (New York 風格)
- **樣式方案:** [Tailwind CSS v4](https://tailwindcss.com) + CSS 變數
- **圖標庫:** [Lucide Vue Next](https://lucide.dev)
- **動畫效果:** [tw-animate-css](https://www.npmjs.com/package/tw-animate-css)
- **國際化:** 自定義 i18n 實現
## 快速開始
### 環境要求
- [Node.js](https://nodejs.org) (推薦 18 或更高版本)
- [pnpm](https://pnpm.io) (版本 10.13.1 或更高)
- [Go](https://golang.org) (版本 1.21 或更高版本)(可選)
### 安裝
```bash
# 克隆倉庫
git clone https://github.com/setube/ogame-vue-ts.git
# 進入專案目錄
cd ogame-vue-ts
# 安裝依賴
pnpm install
```
### 開發
```bash
# 啟動開發服務器 (運行在端口 25121)
pnpm dev
```
在瀏覽器中訪問 `http://localhost:25121`
### 生產構建
```bash
# 構建應用
pnpm build
# 預覽生產構建
pnpm preview
```
## 數據安全
所有遊戲數據在儲存到瀏覽器的本地存儲之前都會使用 AES 加密自動加密。您的遊戲進度是安全且私密的。
## 自定義
應用支援通過 `src/style.css` 中定義的 Tailwind CSS 變數進行完整的主題自定義。您可以輕鬆地在淺色和深色模式之間切換。
## 貢獻
歡迎貢獻!請隨時提交 issue 或 pull request。
## 許可證
本作品採用 [創用CC 姓名標示-非商業性 4.0 國際 授權條款](https://creativecommons.org/licenses/by-nc/4.0) 授權。
### 您可以自由地:
- **分享** — 以任何媒介或格式重製及散布本素材
- **修改** — 重混、轉換本素材、及依本素材建立新素材
### 惟需遵照下列條件:
- **姓名標示** — 您必須給予適當表彰、提供指向本授權條款的連結,以及指出是否已對本素材進行變更
- **非商業性** — 您不得將本素材用於商業目的
## 致謝
本專案受原版 [OGame](https://ogame.org) 瀏覽器遊戲啟發。所有遊戲機制和設計元素都是為了教育和娛樂目的而重新實現的。
## 免責聲明
本專案與 Gameforge AG 或官方 OGame 遊戲沒有任何關聯、認可或聯繫。這是一個獨立的粉絲專案,創建目的僅用於教育和個人娛樂。
---
<div align="center">
用 ❤️ 製作,作者:<a href="https://github.com/setube">setube</a>
<br>
© 2025 - 保留所有權利(除 CC BY-NC 4.0 許可證授予的權利外)
</div>

136
README.md
View File

@@ -5,12 +5,11 @@
一个基于 Vue 3 和 TypeScript 构建的现代化 OGame 太空策略游戏。
[![License: CC BY-NC 4.0](https://img.shields.io/badge/License-CC%20BY--NC%204.0-lightgrey.svg)](https://creativecommons.org/licenses/by-nc/4.0/)
[![Vue 3](https://img.shields.io/badge/Vue-3.5-brightgreen.svg)](https://vuejs.org/)
[![TypeScript](https://img.shields.io/badge/TypeScript-5.9-blue.svg)](https://www.typescriptlang.org/)
[![Vite](https://img.shields.io/badge/Vite-7.2-646CFF.svg)](https://vitejs.dev/)
[![GitHub Release](https://img.shields.io/github/v/release/setube/ogame-vue-ts?style=flat&logo=github&label=Release)](https://github.com/setube/ogame-vue-ts/releases/latest)
[![License: CC BY-NC 4.0](https://img.shields.io/badge/License-CC%20BY--NC%204.0-lightgrey.svg)](https://creativecommons.org/licenses/by-nc/4.0)
[![Tap Tap](https://img.shields.io/badge/TapTap-OGame%20Vue%20Ts-18d6e0)](https://www.taptap.cn/app/801190)
[English](README-EN.md) | 简体中文
简体中文 | [繁體中文](README-zh-TW.md) | [English](README-EN.md) | [Deutsch](README-DE.md) | [Русский](README-RU.md) | [Español](README-ES.md) | [한국어](README-KO.md) | [日本語](README-JA.md)
</div>
@@ -20,7 +19,6 @@ OGame Vue TS 是一款受经典 OGame 游戏启发的单机版、基于浏览器
## 核心特性
- **多语言支持** - 支持 6 种语言:英语、简体中文、繁体中文、德语、俄语和韩语
- **建筑管理** - 在行星和月球上建造和升级各种建筑
- **科技研究** - 解锁先进科技来增强你的帝国
- **舰队管理** - 建造舰船、派遣任务、参与战术太空战斗
@@ -35,14 +33,14 @@ OGame Vue TS 是一款受经典 OGame 游戏启发的单机版、基于浏览器
## 技术栈
- **前端框架:** [Vue 3](https://vuejs.org/) + Composition API (`<script setup>` 语法)
- **开发语言:** [TypeScript](https://www.typescriptlang.org/) (启用严格类型检查)
- **构建工具:** [Vite](https://vitejs.dev/) (自定义 Rolldown-Vite 7.2.5)
- **状态管理:** [Pinia](https://pinia.vuejs.org/) + 持久化插件
- **路由管理:** [Vue Router 4](https://router.vuejs.org/)
- **UI 组件:** [shadcn-vue](https://www.shadcn-vue.com/) (New York 风格)
- **样式方案:** [Tailwind CSS v4](https://tailwindcss.com/) + CSS 变量
- **图标库:** [Lucide Vue Next](https://lucide.dev/)
- **前端框架:** [Vue 3](https://vuejs.org) + Composition API (`<script setup>` 语法)
- **开发语言:** [TypeScript](https://www.typescriptlang.org) (启用严格类型检查)
- **构建工具:** [Vite](https://vitejs.dev) (自定义 Rolldown-Vite 7.2.5)、[Golang](https://golang.org)(构建跨平台的Web服务端)、[Electron](https://www.electronjs.org)(构建跨平台可视化界面)
- **状态管理:** [Pinia](https://pinia.vuejs.org) + 持久化插件
- **路由管理:** [Vue Router 4](https://router.vuejs.org)
- **UI 组件:** [shadcn-vue](https://www.shadcn-vue.com) (New York 风格)
- **样式方案:** [Tailwind CSS v4](https://tailwindcss.com) + CSS 变量
- **图标库:** [Lucide Vue Next](https://lucide.dev)
- **动画效果:** [tw-animate-css](https://www.npmjs.com/package/tw-animate-css)
- **国际化:** 自定义 i18n 实现
@@ -50,8 +48,9 @@ OGame Vue TS 是一款受经典 OGame 游戏启发的单机版、基于浏览器
### 环境要求
- [Node.js](https://nodejs.org/) (推荐 18 或更高版本)
- [pnpm](https://pnpm.io/) (版本 10.13.1 或更高)
- [Node.js](https://nodejs.org) (推荐 18 或更高版本)
- [pnpm](https://pnpm.io) (版本 10.13.1 或更高)
- [Go](https://golang.org) (版本 1.21 或更高版本)(可选)
### 安装
@@ -85,98 +84,6 @@ pnpm build
pnpm preview
```
## 项目结构
```
ogame-vue-ts/
├── public/ # 静态资源
│ └── logo.svg # 应用图标
├── src/
│ ├── assets/ # 动态资源
│ ├── components/ # Vue 组件
│ │ └── ui/ # shadcn-vue UI 组件
│ ├── composables/ # Vue 组合式函数
│ ├── config/ # 游戏配置
│ ├── lib/ # 工具库
│ ├── locales/ # 国际化翻译文件
│ ├── logic/ # 游戏逻辑模块
│ │ ├── buildingLogic.ts # 建筑逻辑
│ │ ├── buildingValidation.ts # 建筑验证
│ │ ├── fleetLogic.ts # 舰队逻辑
│ │ ├── moonLogic.ts # 月球逻辑
│ │ ├── moonValidation.ts # 月球验证
│ │ ├── researchLogic.ts # 研究逻辑
│ │ ├── researchValidation.ts # 研究验证
│ │ ├── shipLogic.ts # 舰船逻辑
│ │ └── shipValidation.ts # 舰船验证
│ ├── router/ # Vue Router 路由配置
│ ├── stores/ # Pinia 状态存储
│ ├── types/ # TypeScript 类型定义
│ ├── utils/ # 工具函数
│ ├── views/ # 页面组件
│ │ ├── OverviewView.vue # 概览页面
│ │ ├── BuildingsView.vue # 建筑页面
│ │ ├── ResearchView.vue # 研究页面
│ │ ├── ShipyardView.vue # 船坞页面
│ │ ├── DefenseView.vue # 防御页面
│ │ ├── FleetView.vue # 舰队页面
│ │ ├── GalaxyView.vue # 银河页面
│ │ ├── OfficersView.vue # 军官页面
│ │ ├── BattleSimulatorView.vue # 战斗模拟器
│ │ ├── MessagesView.vue # 消息页面
│ │ └── SettingsView.vue # 设置页面
│ ├── App.vue # 根组件
│ ├── main.ts # 应用入口
│ └── style.css # 全局样式
├── .github/
│ └── ISSUE_TEMPLATE/ # GitHub issue 模板
├── LICENSE # CC BY-NC 4.0 许可证
├── package.json # 项目依赖
├── tsconfig.json # TypeScript 配置
└── vite.config.ts # Vite 配置
```
## 支持的语言
- 🇺🇸 English (英语)
- 🇨🇳 简体中文
- 🇹🇼 繁體中文
- 🇩🇪 Deutsch (德语)
- 🇷🇺 Русский (俄语)
- 🇰🇷 한국어 (韩语)
## 游戏特性
### 资源管理
- **金属** - 主要建筑材料
- **晶体** - 高级科技组件
- **重氢** - 燃料和研究资源
- **暗物质** - 高级资源
- **能量** - 为设施供电
### 建筑类型
- **资源建筑** - 金属矿、晶体矿、重氢合成器、太阳能发电厂
- **设施建筑** - 机器人工厂、船坞、研究实验室、仓储设施
- **特殊建筑** - 纳米机器人工厂、行星改造器等
### 科技系统
- **能量技术** - 提高能量效率
- **激光技术** - 增强武器系统
- **离子技术** - 高级推进和武器
- **超空间技术** - 实现更快的旅行
- **等离子技术** - 终极武器系统
- 还有更多...
### 舰船类别
- **民用舰船** - 小型/大型货船、殖民船、回收船
- **战斗舰船** - 轻型/重型战斗机、巡洋舰、战列舰、轰炸机
- **特殊舰船** - 死星、战列巡洋舰、毁灭者
### 防御系统
- 火箭发射器、轻型/重型激光炮、高斯炮
- 离子炮、等离子炮塔
- 小型/大型防护罩
## 数据安全
所有游戏数据在存储到浏览器的本地存储之前都会使用 AES 加密自动加密。您的游戏进度是安全且私密的。
@@ -189,16 +96,9 @@ ogame-vue-ts/
欢迎贡献!请随时提交 issue 或 pull request。
### Issue 模板
我们提供以下中英文 issue 模板:
- BUG反馈 / Bug Report
- 功能请求 / Feature Request
- 文档改进 / Documentation Improvement
- 反馈建议 / Feedback & Suggestion
## 许可证
本作品采用 [知识共享署名-非商业性使用 4.0 国际许可协议](https://creativecommons.org/licenses/by-nc/4.0/) 进行许可。
本作品采用 [知识共享署名-非商业性使用 4.0 国际许可协议](https://creativecommons.org/licenses/by-nc/4.0) 进行许可。
### 您可以自由地:
- **共享** — 在任何媒介以任何形式复制、发行本作品
@@ -210,7 +110,7 @@ ogame-vue-ts/
## 致谢
本项目受原版 [OGame](https://ogame.org/) 浏览器游戏启发。所有游戏机制和设计元素都是为了教育和娱乐目的而重新实现的。
本项目受原版 [OGame](https://ogame.org) 浏览器游戏启发。所有游戏机制和设计元素都是为了教育和娱乐目的而重新实现的。
## 免责声明
@@ -219,7 +119,7 @@ ogame-vue-ts/
---
<div align="center">
用 ❤️ 制作,作者:谦君
用 ❤️ 制作,作者:<a href="https://github.com/setube">setube</a>
<br>
© 2025 - 保留所有权利(除 CC BY-NC 4.0 许可证授予的权利外)
</div>

101
android/.gitignore vendored Normal file
View File

@@ -0,0 +1,101 @@
# Using Android gitignore template: https://github.com/github/gitignore/blob/HEAD/Android.gitignore
# Built application files
*.apk
*.aar
*.ap_
*.aab
# Files for the ART/Dalvik VM
*.dex
# Java class files
*.class
# Generated files
bin/
gen/
out/
# Uncomment the following line in case you need and you don't have the release build type files in your app
# release/
# Gradle files
.gradle/
build/
# Local configuration file (sdk path, etc)
local.properties
# Proguard folder generated by Eclipse
proguard/
# Log Files
*.log
# Android Studio Navigation editor temp files
.navigation/
# Android Studio captures folder
captures/
# IntelliJ
*.iml
.idea/workspace.xml
.idea/tasks.xml
.idea/gradle.xml
.idea/assetWizardSettings.xml
.idea/dictionaries
.idea/libraries
# Android Studio 3 in .gitignore file.
.idea/caches
.idea/modules.xml
# Comment next line if keeping position of elements in Navigation Editor is relevant for you
.idea/navEditor.xml
# Keystore files
# Uncomment the following lines if you do not want to check your keystore files in.
#*.jks
#*.keystore
# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild
.cxx/
# Google Services (e.g. APIs or Firebase)
# google-services.json
# Freeline
freeline.py
freeline/
freeline_project_description.json
# fastlane
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output
fastlane/readme.md
# Version control
vcs.xml
# lint
lint/intermediates/
lint/generated/
lint/outputs/
lint/tmp/
# lint/reports/
# Android Profiling
*.hprof
# Cordova plugins for Capacitor
capacitor-cordova-android-plugins
# Copied web assets
app/src/main/assets/public
# Generated Config files
app/src/main/assets/capacitor.config.json
app/src/main/assets/capacitor.plugins.json
app/src/main/res/xml/config.xml

2
android/app/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
/build/*
!/build/.npmkeep

92
android/app/build.gradle Normal file
View File

@@ -0,0 +1,92 @@
apply plugin: 'com.android.application'
android {
namespace = "games.wenzi.ogame"
compileSdk = rootProject.ext.compileSdkVersion
defaultConfig {
applicationId "games.wenzi.ogame"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 15
versionName "1.5.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
aaptOptions {
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
// Default: https://android.googlesource.com/platform/frameworks/base/+/282e181b58cf72b6ca770dc7ca5f91f135444502/tools/aapt/AaptAssets.cpp#61
ignoreAssetsPattern = '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~'
}
}
// 按 ABI 拆分 APK (arm64-v8a, armeabi-v7a, x86_64)
splits {
abi {
enable true
reset()
include "arm64-v8a", "armeabi-v7a", "x86_64"
universalApk false
}
}
signingConfigs {
release {
storeFile file('release.keystore')
storePassword 'ogame123'
keyAlias 'ogame'
keyPassword 'ogame123'
}
}
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
}
// 为每个 ABI 设置不同的 versionCode
applicationVariants.configureEach { variant ->
variant.outputs.configureEach { output ->
def abiVersionCode = [
"armeabi-v7a": 1,
"arm64-v8a": 2,
"x86_64": 3
]
def abi = output.getFilter(com.android.build.OutputFile.ABI)
if (abi != null) {
output.versionCodeOverride = abiVersionCode[abi] * 1000 + defaultConfig.versionCode
output.outputFileName = "OGame-Vue-Ts-${abi}.APK"
}
}
}
}
repositories {
flatDir{
dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs'
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
implementation "androidx.coordinatorlayout:coordinatorlayout:$androidxCoordinatorLayoutVersion"
implementation "androidx.core:core-splashscreen:$coreSplashScreenVersion"
implementation project(':capacitor-android')
testImplementation "junit:junit:$junitVersion"
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
implementation project(':capacitor-cordova-android-plugins')
}
apply from: 'capacitor.build.gradle'
try {
def servicesJSON = file('google-services.json')
if (servicesJSON.text) {
apply plugin: 'com.google.gms.google-services'
}
} catch(Exception e) {
logger.info("google-services.json not found, google-services plugin not applied. Push Notifications won't work")
}

View File

@@ -0,0 +1,19 @@
// DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN
android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_21
targetCompatibility JavaVersion.VERSION_21
}
}
apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle"
dependencies {
}
if (hasProperty('postBuildExtras')) {
postBuildExtras()
}

21
android/app/proguard-rules.pro vendored Normal file
View File

@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

Binary file not shown.

View File

@@ -0,0 +1,26 @@
package com.getcapacitor.myapp;
import static org.junit.Assert.*;
import android.content.Context;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import androidx.test.platform.app.InstrumentationRegistry;
import org.junit.Test;
import org.junit.runner.RunWith;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("com.getcapacitor.app", appContext.getPackageName());
}
}

View File

@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:usesCleartextTraffic="true"
android:networkSecurityConfig="@xml/network_security_config"
android:theme="@style/AppTheme">
<activity
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode|navigation|density"
android:name=".MainActivity"
android:label="@string/title_activity_main"
android:theme="@style/AppTheme.NoActionBarLaunch"
android:launchMode="singleTask"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths"></meta-data>
</provider>
</application>
<!-- Permissions -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
</manifest>

View File

@@ -0,0 +1,18 @@
package games.wenzi.ogame;
import android.os.Bundle;
import android.view.Window;
import androidx.core.content.ContextCompat;
import com.getcapacitor.BridgeActivity;
public class MainActivity extends BridgeActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// 设置状态栏颜色,防止 Capacitor 强制透明
Window window = getWindow();
window.setStatusBarColor(ContextCompat.getColor(this, R.color.status_bar_color));
window.setNavigationBarColor(ContextCompat.getColor(this, R.color.status_bar_color));
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@@ -0,0 +1,34 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportHeight="108"
android:viewportWidth="108">
<path
android:fillType="evenOdd"
android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z"
android:strokeColor="#00000000"
android:strokeWidth="1">
<aapt:attr name="android:fillColor">
<gradient
android:endX="78.5885"
android:endY="90.9159"
android:startX="48.7653"
android:startY="61.0927"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z"
android:strokeColor="#00000000"
android:strokeWidth="1" />
</vector>

View File

@@ -0,0 +1,170 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportHeight="108"
android:viewportWidth="108">
<path
android:fillColor="#26A69A"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#00000000"
android:pathData="M9,0L9,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,0L19,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M29,0L29,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M39,0L39,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M49,0L49,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M59,0L59,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M69,0L69,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M79,0L79,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M89,0L89,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M99,0L99,108"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,9L108,9"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,19L108,19"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,29L108,29"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,39L108,39"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,49L108,49"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,59L108,59"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,69L108,69"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,79L108,79"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,89L108,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M0,99L108,99"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,29L89,29"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,39L89,39"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,49L89,49"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,59L89,59"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,69L89,69"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M19,79L89,79"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M29,19L29,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M39,19L39,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M49,19L49,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M59,19L59,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M69,19L69,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
<path
android:fillColor="#00000000"
android:pathData="M79,19L79,89"
android:strokeColor="#33FFFFFF"
android:strokeWidth="0.8" />
</vector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<WebView
android:layout_width="match_parent"
android:layout_height="match_parent" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="status_bar_color">#1a1a2e</color>
</resources>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#FFFFFF</color>
</resources>

View File

@@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<resources>
<string name="app_name">OGame Vue Ts</string>
<string name="title_activity_main">OGame Vue Ts</string>
<string name="package_name">games.wenzi.ogame</string>
<string name="custom_url_scheme">games.wenzi.ogame</string>
</resources>

View File

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">#1a1a2e</item>
<item name="colorPrimaryDark">#0f0f1a</item>
<item name="colorAccent">#6366f1</item>
</style>
<style name="AppTheme.NoActionBar" parent="Theme.AppCompat.DayNight.NoActionBar">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:background">@null</item>
<item name="android:statusBarColor">#1a1a2e</item>
<item name="android:navigationBarColor">#1a1a2e</item>
</style>
<style name="AppTheme.NoActionBarLaunch" parent="Theme.SplashScreen">
<item name="android:background">@drawable/splash</item>
</style>
</resources>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<paths xmlns:android="http://schemas.android.com/apk/res/android">
<external-path name="my_images" path="." />
<cache-path name="my_cache_images" path="." />
</paths>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config cleartextTrafficPermitted="true">
<trust-anchors>
<certificates src="system" />
</trust-anchors>
</base-config>
</network-security-config>

View File

@@ -0,0 +1,18 @@
package com.getcapacitor.myapp;
import static org.junit.Assert.*;
import org.junit.Test;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() throws Exception {
assertEquals(4, 2 + 2);
}
}

29
android/build.gradle Normal file
View File

@@ -0,0 +1,29 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.13.0'
classpath 'com.google.gms:google-services:4.4.4'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
apply from: "variables.gradle"
allprojects {
repositories {
google()
mavenCentral()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}

View File

@@ -0,0 +1,3 @@
// DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN
include ':capacitor-android'
project(':capacitor-android').projectDir = new File('../node_modules/.pnpm/@capacitor+android@8.0.0_@capacitor+core@8.0.0/node_modules/@capacitor/android/capacitor')

22
android/gradle.properties Normal file
View File

@@ -0,0 +1,22 @@
# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx1536m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true

Binary file not shown.

View File

@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

251
android/gradlew vendored Normal file
View File

@@ -0,0 +1,251 @@
#!/bin/sh
#
# Copyright © 2015-2021 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#
##############################################################################
#
# Gradle start up script for POSIX generated by Gradle.
#
# Important for running:
#
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
# noncompliant, but you have some other compliant shell such as ksh or
# bash, then to run this script, type that shell name before the whole
# command line, like:
#
# ksh Gradle
#
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
# * functions;
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
#
# Important for patching:
#
# (2) This script targets any POSIX shell, so it avoids extensions provided
# by Bash, Ksh, etc; in particular arrays are avoided.
#
# The "traditional" practice of packing multiple parameters into a
# space-separated string is a well documented source of bugs and security
# problems, so this is (mostly) avoided, by progressively accumulating
# options in "$@", and eventually passing that to Java.
#
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
# see the in-line comments for details.
#
# There are tweaks for specific operating systems such as AIX, CygWin,
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
#
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
app_path=$0
# Need this for daisy-chained symlinks.
while
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
[ -h "$app_path" ]
do
ls=$( ls -ld "$app_path" )
link=${ls#*' -> '}
case $link in #(
/*) app_path=$link ;; #(
*) app_path=$APP_HOME$link ;;
esac
done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
warn () {
echo "$*"
} >&2
die () {
echo
echo "$*"
echo
exit 1
} >&2
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "$( uname )" in #(
CYGWIN* ) cygwin=true ;; #(
Darwin* ) darwin=true ;; #(
MSYS* | MINGW* ) msys=true ;; #(
NONSTOP* ) nonstop=true ;;
esac
CLASSPATH="\\\"\\\""
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD=$JAVA_HOME/jre/sh/java
else
JAVACMD=$JAVA_HOME/bin/java
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD=java
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi
# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
fi
# Collect all arguments for the java command, stacking in reverse order:
# * args from the command line
# * the main class name
# * -classpath
# * -D...appname settings
# * --module-path (only if needed)
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
# For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
JAVACMD=$( cygpath --unix "$JAVACMD" )
# Now convert the arguments - kludge to limit ourselves to /bin/sh
for arg do
if
case $arg in #(
-*) false ;; # don't mess with options #(
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
[ -e "$t" ] ;; #(
*) false ;;
esac
then
arg=$( cygpath --path --ignore --mixed "$arg" )
fi
# Roll the args list around exactly as many times as the number of
# args, so each arg winds up back in the position where it started, but
# possibly modified.
#
# NB: a `for` loop captures its iteration list before it begins, so
# changing the positional parameters here affects neither the number of
# iterations, nor the values presented in `arg`.
shift # remove old arg
set -- "$@" "$arg" # push replacement arg
done
fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
"$@"
# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi
# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
#
# In Bash we could simply go:
#
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
# set -- "${ARGS[@]}" "$@"
#
# but POSIX shell has neither arrays nor command substitution, so instead we
# post-process each arg (as a line of input to sed) to backslash-escape any
# character that might be a shell metacharacter, then use eval to reverse
# that process (while maintaining the separation between arguments), and wrap
# the whole thing up as a single "set" statement.
#
# This will of course break if any of these variables contains a newline or
# an unmatched quote.
#
eval "set -- $(
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
xargs -n1 |
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
tr '\n' ' '
)" '"$@"'
exec "$JAVACMD" "$@"

94
android/gradlew.bat vendored Normal file
View File

@@ -0,0 +1,94 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
:execute
@rem Setup the command line
set CLASSPATH=
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
:end
@rem End local scope for the variables with windows NT shell
if %ERRORLEVEL% equ 0 goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega

5
android/settings.gradle Normal file
View File

@@ -0,0 +1,5 @@
include ':app'
include ':capacitor-cordova-android-plugins'
project(':capacitor-cordova-android-plugins').projectDir = new File('./capacitor-cordova-android-plugins/')
apply from: 'capacitor.settings.gradle'

16
android/variables.gradle Normal file
View File

@@ -0,0 +1,16 @@
ext {
minSdkVersion = 24
compileSdkVersion = 36
targetSdkVersion = 36
androidxActivityVersion = '1.11.0'
androidxAppCompatVersion = '1.7.1'
androidxCoordinatorLayoutVersion = '1.3.0'
androidxCoreVersion = '1.17.0'
androidxFragmentVersion = '1.8.9'
coreSplashScreenVersion = '1.2.0'
androidxWebkitVersion = '1.14.0'
junitVersion = '4.13.2'
androidxJunitVersion = '1.3.0'
androidxEspressoCoreVersion = '3.7.0'
cordovaAndroidVersion = '14.0.1'
}

18
capacitor.config.ts Normal file
View File

@@ -0,0 +1,18 @@
import type { CapacitorConfig } from '@capacitor/cli'
const config: CapacitorConfig = {
appId: 'games.wenzi.ogame',
appName: 'OGame Vue Ts',
webDir: 'docs',
server: {
androidScheme: 'https'
},
android: {
buildOptions: {
keystorePath: undefined,
keystoreAlias: undefined
}
}
}
export default config

View File

@@ -1 +0,0 @@
import{Dt as e,G as t,J as n,K as r,St as i,U as a,X as o,Y as s,Z as c,jt as l,pt as u,q as d,st as f}from"./vendor-ui-DBxeWLyT.js";import{Bt as p,Rt as m}from"./index-Cch-Ig40.js";var h={key:0,class:`fixed inset-0 z-50 flex items-center justify-center`},g={class:`relative bg-card border rounded-lg shadow-lg p-6 max-w-md w-full mx-4 z-10`},_={class:`text-lg font-semibold mb-2`},v={class:`text-sm text-muted-foreground mb-6 whitespace-pre-line`},y={class:`flex justify-end gap-2`},b=c({__name:`AlertDialog`,setup(c,{expose:b}){let{t:x}=p(),S=i(!1),C=i(null),w=e=>{C.value=e,S.value=!0},T=()=>{C.value?.onConfirm&&C.value.onConfirm(),S.value=!1},E=()=>{S.value=!1};return b({show:w}),(i,c)=>(f(),r(a,{to:`body`},[S.value?(f(),n(`div`,h,[t(`div`,{class:`fixed inset-0 bg-black/50`,onClick:E}),t(`div`,g,[t(`h2`,_,l(C.value?.title),1),t(`p`,v,l(C.value?.message),1),t(`div`,y,[C.value?.onConfirm?(f(),r(e(m),{key:0,onClick:E,variant:`outline`},{default:u(()=>[s(l(e(x)(`common.cancel`)),1)]),_:1})):d(``,!0),o(e(m),{onClick:T,variant:`default`},{default:u(()=>[s(l(e(x)(`common.confirm`)),1)]),_:1})])])])):d(``,!0)]))}});export{b as t};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1 +0,0 @@
import{Dt as e,J as t,Ot as n,Z as r,st as i,ut as a}from"./vendor-ui-DBxeWLyT.js";import{zt as o}from"./index-Cch-Ig40.js";var s=r({__name:`CardDescription`,props:{class:{}},setup(r){let s=r;return(r,c)=>(i(),t(`p`,{"data-slot":`card-description`,class:n(e(o)(`text-muted-foreground text-sm`,s.class))},[a(r.$slots,`default`)],2))}});export{s as t};

View File

@@ -1,2 +0,0 @@
import{Dt as e,G as t,J as n,St as r,W as i,X as a,Y as o,Z as s,jt as c,pt as l,q as u,st as d}from"./vendor-ui-DBxeWLyT.js";import{n as f}from"./UnlockRequirement-BdFx1RC0.js";import{Bt as p,Rt as m,Vt as h,ct as g,rt as _,w as v}from"./index-Cch-Ig40.js";import{t as y}from"./useGameConfig-D2EZdt1x.js";import{t as b}from"./AlertDialog-_72FqRCT.js";var x={key:0,class:`absolute inset-0 z-10 bg-background/70 backdrop-blur-[2px] rounded-lg flex items-center justify-center`},S={class:`text-center p-4 space-y-2`},C={class:`flex justify-center`},w={class:`rounded-full bg-muted p-2`},T={class:`text-xs font-medium text-muted-foreground`},E=s({__name:`CardUnlockOverlay`,props:{requirements:{}},setup(s){let E=s,D=h(),{t:O}=p(),{BUILDINGS:k,TECHNOLOGIES:A}=y(),j=r(null),M=i(()=>!E.requirements||!D.currentPlanet?!0:v(D.currentPlanet,D.player.technologies,E.requirements)),N=()=>{if(!E.requirements||!D.currentPlanet)return``;let e=[];for(let[t,n]of Object.entries(E.requirements))if(Object.values(_).includes(t)){let r=t,i=D.currentPlanet.buildings[r]||0,a=k.value[r]?.name||r,o=i>=n?``:``;e.push(`${o} ${a}: Lv ${n} (${O(`common.current`)}: Lv ${i})`)}else if(Object.values(g).includes(t)){let r=t,i=D.player.technologies[r]||0,a=A.value[r]?.name||r,o=i>=n?``:``;e.push(`${o} ${a}: Lv ${n} (${O(`common.current`)}: Lv ${i})`)}return e.join(`
`)},P=()=>{j.value?.show({title:O(`common.requirementsNotMet`),message:N()})};return(r,i)=>M.value?u(``,!0):(d(),n(`div`,x,[t(`div`,S,[t(`div`,C,[t(`div`,w,[a(e(f),{size:20,class:`text-muted-foreground`})])]),t(`p`,T,c(e(O)(`common.locked`)),1),a(e(m),{variant:`outline`,size:`sm`,onClick:P,class:`text-xs`},{default:l(()=>[o(c(e(O)(`common.viewRequirements`)),1)]),_:1})]),a(b,{ref_key:`requirementsDialog`,ref:j},null,512)]))}});export{E as t};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1 +0,0 @@
import{Dt as e,G as t,H as n,J as r,K as i,Ot as a,W as o,X as s,Y as c,Z as l,jt as u,lt as d,pt as f,q as p,st as m}from"./vendor-ui-DBxeWLyT.js";import"./vendor-vue-Bqq1sBNf.js";import{t as h}from"./CardDescription-CRV0m8La.js";import{Bt as g,D as ee,E as te,F as _,It as v,M as y,Pt as b,Rt as x,U as S,V as C,Vt as w,_t as T,dt as E,ft as D,gt as O,ht as k,j as A,lt as j,mt as M,pt as N,ut as P,vt as F}from"./index-Cch-Ig40.js";import{t as I}from"./useGameConfig-D2EZdt1x.js";var L={key:0,class:`container mx-auto p-4 sm:p-6 space-y-4 sm:space-y-6`},R={class:`text-center`},z={class:`text-2xl sm:text-3xl font-bold mb-1 sm:mb-2 flex items-center justify-center gap-2`},B={class:`text-xs sm:text-sm text-muted-foreground`},V={key:0,class:`mt-2`},H={key:1,class:`mt-2`},U={class:`flex items-center gap-2`},W={class:`grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-3 sm:gap-4`},G={class:`text-xs sm:text-sm text-muted-foreground`},K={class:`text-lg sm:text-xl font-bold`},q=l({__name:`OverviewView`,setup(l){let q=w(),{t:J}=g(),{SHIPS:Y}=I(),X=o(()=>q.currentPlanet),Z=o(()=>X.value?ee(X.value,q.player.officers):null),Q=o(()=>X.value?te(X.value,q.player.officers):null),ne=o(()=>{if(!X.value)return 0;let e=_(q.player.officers,Date.now());return y(X.value,{energyProductionBonus:e.energyProductionBonus})}),re=o(()=>X.value?A(X.value):0),ie=[{key:`metal`},{key:`crystal`},{key:`deuterium`},{key:`darkMatter`},{key:`energy`}],$=o(()=>!X.value||X.value.isMoon?null:ae(X.value.id)),ae=e=>q.player.planets.find(t=>t.isMoon&&t.parentPlanetId===e)||null,oe=()=>{$.value&&(q.currentPlanetId=$.value.id)},se=()=>{X.value?.parentPlanetId&&(q.currentPlanetId=X.value.parentPlanetId)};return(o,l)=>X.value?(m(),r(`div`,L,[t(`div`,R,[t(`h1`,z,[c(u(X.value.name)+` `,1),X.value.isMoon?(m(),i(e(v),{key:0,variant:`secondary`},{default:f(()=>[c(u(e(J)(`planet.moon`)),1)]),_:1})):p(``,!0)]),t(`p`,B,u(e(J)(`planet.position`))+`: [`+u(X.value.position.galaxy)+`:`+u(X.value.position.system)+`:`+u(X.value.position.position)+`] `,1),!X.value.isMoon&&$.value?(m(),r(`div`,V,[s(e(x),{onClick:oe,variant:`outline`,size:`sm`},{default:f(()=>[l[0]||=t(`span`,{class:`mr-2`},`🌙`,-1),c(` `+u(e(J)(`planet.switchToMoon`)),1)]),_:1})])):p(``,!0),X.value.isMoon?(m(),r(`div`,H,[s(e(x),{onClick:se,variant:`outline`,size:`sm`},{default:f(()=>[c(u(e(J)(`planet.backToPlanet`)),1)]),_:1})])):p(``,!0)]),s(e(D),null,{default:f(()=>[s(e(P),null,{default:f(()=>[s(e(j),null,{default:f(()=>[c(u(e(J)(`overview.resourceOverview`)),1)]),_:1})]),_:1}),s(e(E),null,{default:f(()=>[s(e(F),null,{default:f(()=>[s(e(N),null,{default:f(()=>[s(e(k),null,{default:f(()=>[s(e(M),null,{default:f(()=>[c(u(e(J)(`common.resourceType`)),1)]),_:1}),s(e(M),{class:`text-right`},{default:f(()=>[c(u(e(J)(`resources.current`)),1)]),_:1}),s(e(M),{class:`text-right`},{default:f(()=>[c(u(e(J)(`resources.max`)),1)]),_:1}),s(e(M),{class:`text-right`},{default:f(()=>[c(u(e(J)(`resources.production`))+u(e(J)(`resources.perHour`)),1)]),_:1})]),_:1})]),_:1}),s(e(T),null,{default:f(()=>[(m(),r(n,null,d(ie,i=>s(e(k),{key:i.key},{default:f(()=>[s(e(O),{class:`font-medium`},{default:f(()=>[t(`div`,U,[s(b,{type:i.key,size:`sm`},null,8,[`type`]),c(` `+u(e(J)(`resources.${i.key}`)),1)])]),_:2},1024),i.key===`energy`?(m(),r(n,{key:0},[s(e(O),{class:a([`text-right`,X.value.resources[i.key]>=0?`text-green-600 dark:text-green-400`:`text-red-600 dark:text-red-400`])},{default:f(()=>[c(u(e(C)(X.value.resources[i.key])),1)]),_:2},1032,[`class`]),s(e(O),{class:`text-right text-muted-foreground`},{default:f(()=>[...l[1]||=[c(`-`,-1)]]),_:1}),s(e(O),{class:`text-right text-muted-foreground`},{default:f(()=>[c(u(e(C)(ne.value))+` / `+u(e(C)(re.value)),1)]),_:1})],64)):(m(),r(n,{key:1},[s(e(O),{class:a([`text-right`,e(S)(X.value.resources[i.key],Q.value?.[i.key]||1/0)])},{default:f(()=>[c(u(e(C)(X.value.resources[i.key])),1)]),_:2},1032,[`class`]),s(e(O),{class:`text-right text-muted-foreground`},{default:f(()=>[c(u(e(C)(Q.value?.[i.key]||0)),1)]),_:2},1024),s(e(O),{class:`text-right text-muted-foreground`},{default:f(()=>[c(u(e(C)(Z.value?.[i.key]||0)),1)]),_:2},1024)],64))]),_:2},1024)),64))]),_:1})]),_:1})]),_:1})]),_:1}),s(e(D),null,{default:f(()=>[s(e(P),null,{default:f(()=>[s(e(j),null,{default:f(()=>[c(u(e(J)(`overview.fleetInfo`)),1)]),_:1}),s(e(h),null,{default:f(()=>[c(u(e(J)(`overview.currentShips`)),1)]),_:1})]),_:1}),s(e(E),null,{default:f(()=>[t(`div`,W,[(m(!0),r(n,null,d(X.value.fleet,(n,i)=>(m(),r(`div`,{key:i},[t(`p`,G,u(e(Y)[i].name),1),t(`p`,K,u(n),1)]))),128))])]),_:1})]),_:1})])):p(``,!0)}});export{q as default};

View File

@@ -1 +0,0 @@
import{Dt as e,G as t,H as n,J as r,K as ee,Ot as i,St as te,W as a,X as o,Y as s,Z as c,jt as l,lt as u,pt as d,q as ne,st as f}from"./vendor-ui-DBxeWLyT.js";import"./vendor-vue-Bqq1sBNf.js";import{t as re}from"./UnlockRequirement-BdFx1RC0.js";import{t as ie}from"./CardDescription-CRV0m8La.js";import{Bt as ae,It as p,Pt as m,Rt as h,V as g,Vt as oe,W as _,Z as v,ct as y,dt as b,ft as x,lt as S,rt as C,ut as w,v as T,w as E,y as D,yt as O}from"./index-Cch-Ig40.js";import{t as k}from"./useGameConfig-D2EZdt1x.js";import{t as A}from"./AlertDialog-_72FqRCT.js";import{t as j}from"./CardUnlockOverlay-SeY-L1Ut.js";var M={key:0,class:`container mx-auto p-4 sm:p-6`},N={class:`text-2xl sm:text-3xl font-bold mb-4 sm:mb-6`},P={class:`grid grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4`},F={class:`flex justify-between items-start gap-2`},se={class:`min-w-0 flex-1`},I={class:`space-y-2.5 sm:space-y-3`},L={class:`text-xs sm:text-sm space-y-1.5 sm:space-y-2`},R={class:`text-muted-foreground mb-1 sm:mb-2`},z={class:`space-y-1 sm:space-y-1.5`},B={class:`flex items-center gap-1.5 sm:gap-2`},V={class:`text-xs`},H={class:`flex items-center gap-1.5 sm:gap-2`},U={class:`text-xs`},W={class:`flex items-center gap-1.5 sm:gap-2`},G={class:`text-xs`},K=c({__name:`ResearchView`,setup(c){let K=oe(),ce=O(),{t:q}=ae(),{TECHNOLOGIES:J}=k(),Y=a(()=>K.currentPlanet),X=a(()=>K.player),Z=te(null),le=e=>{if(!K.currentPlanet||!D(K.currentPlanet,e,K.player.technologies,K.player.researchQueue).valid)return!1;let t=K.player.technologies[e]||0,{queueItem:n}=T(K.currentPlanet,e,t,K.player.officers);return K.player.researchQueue.push(n),!0},ue=e=>{le(e)||Z.value?.show({title:q(`researchView.researchFailed`),message:q(`researchView.researchFailedMessage`)})},Q=e=>X.value.technologies[e]||0,de=e=>{if(!Y.value||X.value.researchQueue.length>0)return!1;let t=J.value[e],n=$(e,Q(e)+1);return E(Y.value,K.player.technologies,t.requirements)&&Y.value.resources.metal>=n.metal&&Y.value.resources.crystal>=n.crystal&&Y.value.resources.deuterium>=n.deuterium},$=(e,t)=>v(e,t);return(te,a)=>Y.value?(f(),r(`div`,M,[o(re,{"required-building":e(C).ResearchLab,"required-level":1},null,8,[`required-building`]),t(`h1`,N,l(e(q)(`researchView.title`)),1),t(`div`,P,[(f(!0),r(n,null,u(Object.values(e(y)),n=>(f(),ee(e(x),{key:n,class:`relative`},{default:d(()=>[o(j,{requirements:e(J)[n].requirements},null,8,[`requirements`]),o(e(w),null,{default:d(()=>[t(`div`,F,[t(`div`,se,[o(e(S),{class:`text-base sm:text-lg cursor-pointer hover:text-primary transition-colors`,onClick:t=>e(ce).openTechnology(n,Q(n))},{default:d(()=>[s(l(e(J)[n].name),1)]),_:2},1032,[`onClick`]),o(e(ie),{class:`text-xs sm:text-sm`},{default:d(()=>[s(l(e(J)[n].description),1)]),_:2},1024)]),o(e(p),{variant:`secondary`,class:`text-xs whitespace-nowrap flex-shrink-0`},{default:d(()=>[s(`Lv `+l(Q(n)),1)]),_:2},1024)])]),_:2},1024),o(e(b),null,{default:d(()=>[t(`div`,I,[t(`div`,L,[t(`p`,R,l(e(q)(`researchView.researchCost`))+`:`,1),t(`div`,z,[t(`div`,B,[o(m,{type:`metal`,size:`sm`}),t(`span`,V,l(e(q)(`resources.metal`))+`:`,1),t(`span`,{class:i([`font-medium text-xs sm:text-sm`,e(_)(Y.value.resources.metal,$(n,Q(n)+1).metal)])},l(e(g)($(n,Q(n)+1).metal)),3)]),t(`div`,H,[o(m,{type:`crystal`,size:`sm`}),t(`span`,U,l(e(q)(`resources.crystal`))+`:`,1),t(`span`,{class:i([`font-medium text-xs sm:text-sm`,e(_)(Y.value.resources.crystal,$(n,Q(n)+1).crystal)])},l(e(g)($(n,Q(n)+1).crystal)),3)]),t(`div`,W,[o(m,{type:`deuterium`,size:`sm`}),t(`span`,G,l(e(q)(`resources.deuterium`))+`:`,1),t(`span`,{class:i([`font-medium text-xs sm:text-sm`,e(_)(Y.value.resources.deuterium,$(n,Q(n)+1).deuterium)])},l(e(g)($(n,Q(n)+1).deuterium)),3)])])]),o(e(h),{onClick:e=>ue(n),disabled:!de(n),class:`w-full`},{default:d(()=>[s(l(e(q)(`researchView.research`)),1)]),_:1},8,[`onClick`,`disabled`])])]),_:2},1024)]),_:2},1024))),128))]),o(A,{ref_key:`alertDialog`,ref:Z},null,512)])):ne(``,!0)}});export{K as default};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1 +0,0 @@
import{Dt as e,G as t,J as n,W as r,X as i,Y as a,Z as o,jt as s,pt as c,q as l,st as u}from"./vendor-ui-DBxeWLyT.js";import{s as d}from"./vendor-vue-Bqq1sBNf.js";import{t as f}from"./CardDescription-CRV0m8La.js";import{At as p,Bt as m,It as h,Rt as g,Vt as _,dt as v,ft as y,jt as b,lt as x,ut as S}from"./index-Cch-Ig40.js";import{t as C}from"./useGameConfig-D2EZdt1x.js";var w=b(`lock`,[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]),T={key:0,class:`fixed inset-0 z-50 bg-background/80 backdrop-blur-sm flex items-center justify-center p-4`},E={class:`flex justify-center mb-4`},D={class:`rounded-full bg-muted p-4`},O={class:`p-4 bg-muted rounded-lg space-y-2`},k={class:`text-sm font-medium text-center`},A={class:`flex items-center justify-center gap-2`},j={class:`text-base sm:text-lg font-bold`},M={key:0,class:`text-xs text-center text-muted-foreground`},N={class:`flex gap-2`},P=o({__name:`UnlockRequirement`,props:{requiredBuilding:{},requiredLevel:{}},setup(o){let b=o,P=d(),F=_(),{t:I}=m(),{BUILDINGS:L}=C(),R=r(()=>L.value[b.requiredBuilding]?.name||b.requiredBuilding),z=r(()=>F.currentPlanet&&F.currentPlanet.buildings[b.requiredBuilding]||0),B=r(()=>z.value>=b.requiredLevel),V=()=>{P.push(`/buildings`)};return(r,d)=>B.value?l(``,!0):(u(),n(`div`,T,[i(e(y),{class:`max-w-md w-full`},{default:c(()=>[i(e(S),{class:`text-center`},{default:c(()=>[t(`div`,E,[t(`div`,D,[i(e(w),{size:48,class:`text-muted-foreground`})])]),i(e(x),{class:`text-xl sm:text-2xl`},{default:c(()=>[a(s(e(I)(`common.featureLocked`)),1)]),_:1}),i(e(f),{class:`text-sm sm:text-base`},{default:c(()=>[a(s(e(I)(`common.unlockRequired`)),1)]),_:1})]),_:1}),i(e(v),{class:`space-y-4`},{default:c(()=>[t(`div`,O,[t(`p`,k,s(e(I)(`common.requiredBuilding`))+`:`,1),t(`div`,A,[t(`span`,j,s(R.value),1),i(e(h),{variant:`default`},{default:c(()=>[a(`Lv `+s(o.requiredLevel),1)]),_:1})]),z.value===void 0?l(``,!0):(u(),n(`p`,M,s(e(I)(`common.currentLevel`))+`: Lv `+s(z.value),1))]),t(`div`,N,[i(e(g),{onClick:V,class:`flex-1`},{default:c(()=>[i(e(p),{size:16,class:`mr-2`}),a(` `+s(e(I)(`common.goToBuildings`)),1)]),_:1})])]),_:1})]),_:1})]))}});export{w as n,P as t};

View File

@@ -1 +0,0 @@
import{jt as e}from"./index-Cch-Ig40.js";var t=e(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]);export{t};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -1 +0,0 @@
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),s=e=>{let n={};for(var r in e)t(n,r,{get:e[r],enumerable:!0});return n},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),u=(e=>typeof require<`u`?require:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof require<`u`?require:e)[t]}):e)(function(e){if(typeof require<`u`)return require.apply(this,arguments);throw Error('Calling `require` for "'+e+"\" in an environment that doesn't expose the `require` function.")});export{l as i,s as n,u as r,o as t};

View File

@@ -1 +0,0 @@
import{F as e,N as t,P as n,T as r,a as i,c as a,d as o,f as s,l as c,n as l,o as u,p as d,r as f,s as p,t as m,u as h}from"./index-Cch-Ig40.js";const g=(e,n,r,i)=>{let a=u(n,r);return h(n,e.buildings,i)?t(e.resources,a)?{valid:!0}:{valid:!1,reason:`errors.insufficientResources`}:{valid:!1,reason:`errors.requirementsNotMet`}},_=(t,r,a,o)=>{let c=u(r,a),l=i(r,a,e(o,Date.now()).buildingSpeedBonus);return n(t.resources,c),s(r,a,l)},v=(e,n,r,i)=>{let a=l(n,r);return p(n,e.buildings,i)?t(e.resources,a)?c(n,e.defense,r)?{valid:!0}:{valid:!1,reason:`errors.shieldDomeLimit`}:{valid:!1,reason:`errors.insufficientResources`}:{valid:!1,reason:`errors.requirementsNotMet`}},y=(t,r,i,a)=>{let s=l(r,i),c=m(r,i,e(a,Date.now()).buildingSpeedBonus);return n(t.resources,s),o(r,i,c)},b=(t,n,i,o,s=0)=>{let c=e(o,Date.now());if(s>=r(c.additionalFleetSlots))return{valid:!1,reason:`errors.fleetMissionsFull`};if(!a(t.fleet,n))return{valid:!1,reason:`errors.insufficientFleet`};let l=f(n,c.fuelConsumptionReduction,i);return t.resources.deuterium<l?{valid:!1,reason:`errors.insufficientFuel`,fuelNeeded:l}:{valid:!0,fuelNeeded:l}},x=(e,t,r,i,a)=>{d(e.fleet,t),e.resources.deuterium-=r,i&&n(e.resources,a)};export{b as a,v as i,x as n,g as o,_ as r,y as t};

View File

@@ -1 +0,0 @@
import{W as e}from"./vendor-ui-DBxeWLyT.js";import{$ as t,Bt as n,Q as r,ct as i,et as a,it as o,nt as s,ot as c,rt as l,st as u,tt as d}from"./index-Cch-Ig40.js";const f=()=>{let{t:f}=n(),p={[l.MetalMine]:`metalMine`,[l.CrystalMine]:`crystalMine`,[l.DeuteriumSynthesizer]:`deuteriumSynthesizer`,[l.SolarPlant]:`solarPlant`,[l.RoboticsFactory]:`roboticsFactory`,[l.NaniteFactory]:`naniteFactory`,[l.Shipyard]:`shipyard`,[l.ResearchLab]:`researchLab`,[l.MetalStorage]:`metalStorage`,[l.CrystalStorage]:`crystalStorage`,[l.DeuteriumTank]:`deuteriumTank`,[l.DarkMatterCollector]:`darkMatterCollector`,[l.LunarBase]:`lunarBase`,[l.SensorPhalanx]:`sensorPhalanx`,[l.JumpGate]:`jumpGate`},m={[u.LightFighter]:`lightFighter`,[u.HeavyFighter]:`heavyFighter`,[u.Cruiser]:`cruiser`,[u.Battleship]:`battleship`,[u.SmallCargo]:`smallCargo`,[u.LargeCargo]:`largeCargo`,[u.ColonyShip]:`colonyShip`,[u.Recycler]:`recycler`,[u.EspionageProbe]:`espionageProbe`,[u.DarkMatterHarvester]:`darkMatterHarvester`},h={[o.RocketLauncher]:`rocketLauncher`,[o.LightLaser]:`lightLaser`,[o.HeavyLaser]:`heavyLaser`,[o.GaussCannon]:`gaussCannon`,[o.IonCannon]:`ionCannon`,[o.PlasmaTurret]:`plasmaTurret`,[o.SmallShieldDome]:`smallShieldDome`,[o.LargeShieldDome]:`largeShieldDome`},g={[i.EnergyTechnology]:`energyTechnology`,[i.LaserTechnology]:`laserTechnology`,[i.IonTechnology]:`ionTechnology`,[i.HyperspaceTechnology]:`hyperspaceTechnology`,[i.PlasmaTechnology]:`plasmaTechnology`,[i.ComputerTechnology]:`computerTechnology`,[i.CombustionDrive]:`combustionDrive`,[i.ImpulseDrive]:`impulseDrive`,[i.HyperspaceDrive]:`hyperspaceDrive`,[i.DarkMatterTechnology]:`darkMatterTechnology`},_={[c.Commander]:`commander`,[c.Admiral]:`admiral`,[c.Engineer]:`engineer`,[c.Geologist]:`geologist`,[c.Technocrat]:`technocrat`,[c.DarkMatterSpecialist]:`darkMatterSpecialist`};return{BUILDINGS:e(()=>{let e={};for(let[t,n]of Object.entries(r)){let r=t,i=p[r];e[r]={...n,name:f(`buildings.${i}`),description:f(`buildingDescriptions.${i}`)}}return e}),SHIPS:e(()=>{let e={};for(let[t,n]of Object.entries(d)){let r=t,i=m[r];e[r]={...n,name:f(`ships.${i}`),description:f(`shipDescriptions.${i}`)}}return e}),DEFENSES:e(()=>{let e={};for(let[n,r]of Object.entries(t)){let t=n,i=h[t];e[t]={...r,name:f(`defenses.${i}`),description:f(`defenseDescriptions.${i}`)}}return e}),TECHNOLOGIES:e(()=>{let e={};for(let[t,n]of Object.entries(s)){let r=t,i=g[r];e[r]={...n,name:f(`technologies.${i}`),description:f(`technologyDescriptions.${i}`)}}return e}),OFFICERS:e(()=>{let e={};for(let[t,n]of Object.entries(a)){let r=t,i=_[r];e[r]={...n,name:f(`officers.${i}`),description:f(`officerDescriptions.${i}`)}}return e})}};export{f as t};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,24 +0,0 @@
<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover" />
<link rel="icon" type="image/svg+xml" href="./logo.svg" />
<title>OGame-Vue-Ts</title>
<script type="module" crossorigin src="./assets/index-Cch-Ig40.js"></script>
<link rel="modulepreload" crossorigin href="./assets/rolldown-runtime-CIDIeb-o.js">
<link rel="modulepreload" crossorigin href="./assets/vendor-ui-DBxeWLyT.js">
<link rel="modulepreload" crossorigin href="./assets/vendor-vue-Bqq1sBNf.js">
<link rel="stylesheet" crossorigin href="./assets/index-B25uYV3W.css">
</head>
<body>
<div id="app"></div>
<!-- 统计勿删 -->
<script charset="UTF-8" id="LA_COLLECT" src="//sdk.51.la/js-sdk-pro.min.js"></script>
<script>LA.init({ id: "L298GYqn6JhAO0VU", ck: "L298GYqn6JhAO0VU", autoTrack: true, hashMode: true })</script>
</body>
</html>

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 12 KiB

Some files were not shown because too many files have changed in this diff Show More