commit 705ee8c3dbd35100469097259d8b5e902686ab0c Author: 谦君 <73606411+setube@users.noreply.github.com> Date: Thu Dec 11 14:49:25 2025 +0800 feat: 初始化项目结构与核心功能 引入项目基础目录结构,包含多语言支持、主要页面与组件、核心游戏逻辑、UI 组件库、加密与本地持久化、自动化 Docker 构建流程、GitHub issue 模板(中英文)、README(中英文)、LICENSE 及开发配置文件。实现 OGame 单机版主要功能模块,为后续开发和扩展奠定基础。 diff --git a/.github/ISSUE_TEMPLATE/BUG反馈.md b/.github/ISSUE_TEMPLATE/BUG反馈.md new file mode 100644 index 0000000..217e6f5 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/BUG反馈.md @@ -0,0 +1,31 @@ +--- +name: BUG反馈 +about: 报告项目中发现的缺陷或问题 +title: '[BUG] 简要描述问题' +labels: 'bug' +assignees: '' +--- + +**问题描述** +清晰准确地描述遇到的问题 + +**重现步骤** + +1. 第一步操作 +2. 第二步操作 +3. 出现问题的操作 + +**期望行为** +描述您认为正确的行为应该是怎样的 + +**实际行为** +描述实际发生的错误行为 + +**环境信息** + +- 操作系统: +- 浏览器(如适用): +- 项目版本: + +**截图或日志(可选)** +如果有错误截图或日志,请提供 diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md new file mode 100644 index 0000000..bc8916a --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -0,0 +1,31 @@ +--- +name: Bug Report +about: Report defects or issues found in the project +title: '[BUG] Brief description of the issue' +labels: 'bug' +assignees: '' +--- + +**Issue Description** +Clearly and accurately describe the problem you encountered + +**Steps to Reproduce** + +1. First operation step +2. Second operation step +3. Operation where the issue occurs + +**Expected Behavior** +Describe what you think the correct behavior should be + +**Actual Behavior** +Describe the actual erroneous behavior that occurred + +**Environment Information** + +- Operating System: +- Browser (if applicable): +- Project Version: + +**Screenshots or Logs (optional)** +If you have error screenshots or logs, please provide them diff --git a/.github/ISSUE_TEMPLATE/documentation-improvement.md b/.github/ISSUE_TEMPLATE/documentation-improvement.md new file mode 100644 index 0000000..68913de --- /dev/null +++ b/.github/ISSUE_TEMPLATE/documentation-improvement.md @@ -0,0 +1,19 @@ +--- +name: Documentation Improvement +about: Report documentation issues or suggest improvements +title: '[Docs] Brief description of the issue' +labels: 'documentation' +assignees: '' +--- + +**Documentation Location** +Point out the documentation path or URL that needs improvement + +**Current Issue** +Describe the current problem or unclear areas in the documentation + +**Improvement Suggestions** +Provide specific improvement suggestions + +**Additional Information (optional)** +Any other information that helps improve the documentation diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md new file mode 100644 index 0000000..2b12919 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature-request.md @@ -0,0 +1,19 @@ +--- +name: Feature Request +about: Request to add new features or improve existing ones +title: '[Feature] Brief description of the feature' +labels: 'enhancement' +assignees: '' +--- + +**Feature Description** +Clearly describe the feature you would like to see added + +**Feature Background** +Explain why this feature is needed and what problem it solves + +**Suggested Implementation (optional)** +If you have specific implementation ideas, you can describe them here + +**Additional Information** +Any other information that helps understand this feature diff --git a/.github/ISSUE_TEMPLATE/feedback-suggestion.md b/.github/ISSUE_TEMPLATE/feedback-suggestion.md new file mode 100644 index 0000000..6d6fa7f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feedback-suggestion.md @@ -0,0 +1,19 @@ +--- +name: Feedback & Suggestion +about: Propose feature suggestions or improvements for this project +title: '[Suggestion] Brief description of your suggestion' +labels: 'enhancement' +assignees: '' +--- + +**What is your suggestion?** +Please clearly describe the feature or improvement you would like to see + +**Why is this feature/improvement needed?** +Explain what problem this suggestion solves or what value it brings + +**Your expected implementation (optional)** +If you have specific implementation ideas, you can describe them here + +**Additional information (optional)** +Any other information that helps understand this suggestion diff --git a/.github/ISSUE_TEMPLATE/功能请求.md b/.github/ISSUE_TEMPLATE/功能请求.md new file mode 100644 index 0000000..ea39f99 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/功能请求.md @@ -0,0 +1,19 @@ +--- +name: 功能请求 +about: 请求添加新功能或改进现有功能 +title: '[功能] 简要描述功能' +labels: 'enhancement' +assignees: '' +--- + +**功能描述** +清晰描述您希望添加的功能 + +**功能背景** +说明为什么需要这个功能,它能解决什么问题 + +**建议实现方案(可选)** +如果有具体的实现想法,可以在这里描述 + +**附加信息** +任何其他有助于理解这个功能的信息 diff --git a/.github/ISSUE_TEMPLATE/反馈建议.md b/.github/ISSUE_TEMPLATE/反馈建议.md new file mode 100644 index 0000000..493ee03 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/反馈建议.md @@ -0,0 +1,19 @@ +--- +name: 反馈建议 +about: 为这个项目提出功能建议或改进意见 +title: '[建议] 简要描述您的建议' +labels: 'enhancement' +assignees: '' +--- + +**您的建议是什么?** +请清晰描述您希望添加的功能或改进点 + +**为什么需要这个功能/改进?** +说明这个建议会解决什么问题或带来什么价值 + +**您期望的实现方式(可选)** +如果有具体的实现想法,可以在这里描述 + +**附加信息(可选)** +任何其他有助于理解这个建议的信息 diff --git a/.github/ISSUE_TEMPLATE/文档改进.md b/.github/ISSUE_TEMPLATE/文档改进.md new file mode 100644 index 0000000..b89f864 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/文档改进.md @@ -0,0 +1,19 @@ +--- +name: 文档改进 +about: 报告文档问题或建议改进 +title: '[文档] 简要描述问题' +labels: 'documentation' +assignees: '' +--- + +**文档位置** +指出需要改进的文档路径或 URL + +**当前问题** +描述当前文档存在的问题或不清晰的地方 + +**改进建议** +提出具体的改进建议 + +**附加信息(可选)** +任何其他有助于改进文档的信息 diff --git a/.github/workflows/ogame-vue-ts.yml b/.github/workflows/ogame-vue-ts.yml new file mode 100644 index 0000000..60b5022 --- /dev/null +++ b/.github/workflows/ogame-vue-ts.yml @@ -0,0 +1,105 @@ +name: 自动化创建Docker镜像 + +on: + push: + branches: + - main + +jobs: + build-amd64: + runs-on: ubuntu-latest + 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: 构建并推送 amd64 Docker镜像 + uses: docker/build-push-action@v3 + with: + context: . + platforms: linux/amd64 + push: true + tags: | + ghcr.io/${{ github.repository_owner }}/blist:amd64 + ${{ secrets.DOCKERHUB_USERNAME }}/blist: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 }}/blist:arm64 + ${{ secrets.DOCKERHUB_USERNAME }}/blist: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 }}/blist:latest \ + ghcr.io/${{ github.repository_owner }}/blist:amd64 \ + ghcr.io/${{ github.repository_owner }}/blist:arm64 + docker manifest push ghcr.io/${{ github.repository_owner }}/blist:latest + + # Docker Hub + docker manifest create ${{ secrets.DOCKERHUB_USERNAME }}/blist:latest \ + ${{ secrets.DOCKERHUB_USERNAME }}/blist:amd64 \ + ${{ secrets.DOCKERHUB_USERNAME }}/blist:arm64 + docker manifest push ${{ secrets.DOCKERHUB_USERNAME }}/blist:latest \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..73f996e --- /dev/null +++ b/.gitignore @@ -0,0 +1,26 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* +CLAUDE.md + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.claude/* +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..a7cea0b --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,3 @@ +{ + "recommendations": ["Vue.volar"] +} diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..6ec9e2a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +FROM node:latest + +RUN mkdir -p /workspace + +WORKDIR /workspace + +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 + +CMD ["npx", "vite", "preview", "--host", "0.0.0.0", "--port", "25121"] \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..bf4a0a1 --- /dev/null +++ b/LICENSE @@ -0,0 +1,32 @@ +Creative Commons Attribution-NonCommercial 4.0 International Public License + +This work is licensed under the Creative Commons Attribution-NonCommercial 4.0 +International Public License. To view a copy of this license, visit +https://creativecommons.org/licenses/by-nc/4.0/legalcode. + +You are free to: +Share — copy and redistribute the material in any medium or format +Adapt — remix, transform, and build upon the material + +Under the following terms: +Attribution — You must give appropriate credit, provide a link to the license, +and indicate if changes were made. You may do so in any reasonable manner, +but not in any way that suggests the licensor endorses you or your use. + +NonCommercial — You may not use the material for commercial purposes. + +No additional restrictions — You may not apply legal terms or technological +measures that legally restrict others from doing anything the license permits. + +Notice: +This work is the original creation of Jun Qian (谦君). Source code available at: +https://github.com/setube/ogame-vue-ts +This license does not constitute a waiver of any copyright or related rights. + +When you share adaptations of this work, you must: +- Provide prominent attribution to the original author +- Retain this license document +- Clearly indicate modifications made and dates +- Distribute under the same CC BY-NC 4.0 license + +© 2025 Jun Qian - All rights reserved (except those granted by this license) \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..a55c80d --- /dev/null +++ b/README.md @@ -0,0 +1,241 @@ +