chore: 添加开源社区基础设施和项目文档

- 添加 README、LICENSE (MIT)、CONTRIBUTING、CHANGELOG
- 添加 GitHub Issue/PR 模板和 FUNDING 配置
- 添加 CI/CD 工作流(ci.yml + release.yml)
- 添加项目文档页面 (docs/index.html)
- 添加 logo 和社群二维码图片资源
- 添加开发和构建脚本 (dev.sh + build.sh)
- 更新 package-lock.json 依赖
This commit is contained in:
晴天
2026-02-28 03:23:39 +08:00
parent add7f1e083
commit 75e94a7560
17 changed files with 1092 additions and 0 deletions

1
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1 @@
github: qingchencloud

93
.github/ISSUE_TEMPLATE/bug_report.yml vendored Normal file
View File

@@ -0,0 +1,93 @@
name: Bug 报告
description: 提交一个 Bug 报告,帮助我们改进 ClawPanel
title: "[Bug] "
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
感谢你提交 Bug 报告!请尽量详细地填写以下信息,以便我们快速定位和修复问题。
- type: textarea
id: description
attributes:
label: 问题描述
description: 清晰简洁地描述你遇到的问题。
placeholder: 请描述你遇到了什么问题...
validations:
required: true
- type: textarea
id: reproduce
attributes:
label: 复现步骤
description: 按顺序列出复现该问题的操作步骤。
placeholder: |
1. 打开应用
2. 进入 '...' 页面
3. 点击 '...' 按钮
4. 出现错误
validations:
required: true
- type: textarea
id: expected
attributes:
label: 期望行为
description: 描述你期望应该发生什么。
placeholder: 我期望...
validations:
required: true
- type: dropdown
id: os
attributes:
label: 操作系统
description: 你使用的操作系统是什么?
options:
- macOS (Apple Silicon)
- macOS (Intel)
- Windows 11
- Windows 10
- Ubuntu / Debian
- Fedora / RHEL
- Arch Linux
- 其他 Linux 发行版
validations:
required: true
- type: input
id: os-version
attributes:
label: 系统版本
description: 操作系统的具体版本号。
placeholder: "例如: macOS 15.3, Windows 11 24H2, Ubuntu 24.04"
validations:
required: true
- type: input
id: app-version
attributes:
label: ClawPanel 版本
description: 你使用的 ClawPanel 版本号(可在「关于」页面查看)。
placeholder: "例如: v0.1.0"
validations:
required: true
- type: textarea
id: screenshots
attributes:
label: 截图或日志
description: 如果有的话,请附上截图或相关错误日志,有助于更快地定位问题。
placeholder: 拖拽图片到此处上传,或粘贴错误日志...
validations:
required: false
- type: textarea
id: additional
attributes:
label: 补充信息
description: 其他你认为可能有帮助的信息。
placeholder: 任何额外的上下文信息...
validations:
required: false

View File

@@ -0,0 +1,60 @@
name: 功能请求
description: 提出一个新功能或改进建议
title: "[功能] "
labels: ["enhancement"]
body:
- type: markdown
attributes:
value: |
感谢你提出功能建议!请详细描述你的想法,帮助我们让 ClawPanel 变得更好。
- type: textarea
id: description
attributes:
label: 功能描述
description: 清晰简洁地描述你希望添加的功能。
placeholder: 我希望 ClawPanel 能够...
validations:
required: true
- type: textarea
id: use-case
attributes:
label: 使用场景
description: 描述这个功能会在什么场景下使用,解决什么问题。
placeholder: |
当我在使用 ClawPanel 时,经常需要...
目前的做法是...
如果有这个功能,我就可以...
validations:
required: true
- type: textarea
id: solution
attributes:
label: 可能的实现方案
description: 如果你有实现思路,请在这里描述。
placeholder: |
我认为可以通过以下方式实现:
1. ...
2. ...
validations:
required: false
- type: textarea
id: alternatives
attributes:
label: 替代方案
description: 你是否考虑过其他替代方案?
placeholder: 我也考虑过...
validations:
required: false
- type: textarea
id: additional
attributes:
label: 补充信息
description: 其他相关信息,如参考链接、截图、类似产品的实现等。
placeholder: 参考资料或额外说明...
validations:
required: false

34
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,34 @@
## 变更描述
<!-- 请简要描述本次 PR 的变更内容和目的 -->
## 变更类型
- [ ] 新功能 (feat)
- [ ] Bug 修复 (fix)
- [ ] 代码重构 (refactor)
- [ ] 样式调整 (style)
- [ ] 性能优化 (perf)
- [ ] 文档更新 (docs)
- [ ] 构建/CI 配置 (ci/build)
- [ ] 其他 (chore)
## 测试清单
- [ ] 本地运行 `npm run build` 前端构建通过
- [ ] 本地运行 `cargo check` Rust 编译通过
- [ ] 在 macOS 上测试通过
- [ ] 在 Windows 上测试通过
- [ ] 在 Linux 上测试通过
- [ ] 新功能已添加对应测试
- [ ] 所有现有测试通过
## 相关 Issue
<!-- 关联的 Issue 编号,例如: closes #123 -->
## 截图 (如涉及 UI 变更)
<!-- 如果有 UI 变更,请附上前后对比截图 -->

81
.github/workflows/ci.yml vendored Normal file
View File

@@ -0,0 +1,81 @@
# ClawPanel 持续集成工作流
# 在推送到 main 分支或提交 PR 到 main 分支时自动运行
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
# 同一分支的新提交会取消正在运行的旧工作流
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
check:
name: 检查 (${{ matrix.platform.name }})
runs-on: ${{ matrix.platform.os }}
strategy:
fail-fast: false
matrix:
platform:
# macOS Apple Silicon
- name: macOS (ARM64)
os: macos-latest
# Linux x86_64
- name: Linux (x64)
os: ubuntu-latest
# Windows x86_64
- name: Windows (x64)
os: windows-latest
steps:
# 签出代码
- name: 签出代码
uses: actions/checkout@v4
# 安装 Node.js 22
- name: 安装 Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
# 安装前端依赖
- name: 安装前端依赖
run: npm ci
# 安装 Rust 工具链 (stable)
- name: 安装 Rust 工具链
uses: dtolnay/rust-toolchain@stable
# Rust 编译缓存
- name: Rust 编译缓存
uses: swatinem/rust-cache@v2
with:
workspaces: src-tauri -> target
# Linux 专用: 安装 Tauri v2 系统依赖
- name: 安装 Linux 系统依赖
if: matrix.platform.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y \
libwebkit2gtk-4.1-dev \
libappindicator3-dev \
librsvg2-dev \
patchelf \
libssl-dev \
libgtk-3-dev \
libayatana-appindicator3-dev
# Rust 编译检查
- name: Rust 编译检查
working-directory: src-tauri
run: cargo check
# 前端构建验证
- name: 前端构建验证
run: npm run build

87
.github/workflows/release.yml vendored Normal file
View File

@@ -0,0 +1,87 @@
# ClawPanel 发布构建工作流
# 推送 v* 标签时自动构建跨平台产物并创建 GitHub Release
name: Release
on:
push:
tags:
- "v*"
jobs:
release:
name: 构建 (${{ matrix.platform.name }})
runs-on: ${{ matrix.platform.os }}
permissions:
contents: write
strategy:
fail-fast: false
matrix:
platform:
# macOS Apple Silicon (ARM64)
- name: macOS (ARM64)
os: macos-latest
args: --target aarch64-apple-darwin
# Linux x86_64
- name: Linux (x64)
os: ubuntu-latest
args: ""
# Windows x86_64
- name: Windows (x64)
os: windows-latest
args: ""
steps:
# 签出代码
- name: 签出代码
uses: actions/checkout@v4
# 安装 Node.js 22
- name: 安装 Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
# 安装前端依赖
- name: 安装前端依赖
run: npm ci
# 安装 Rust 工具链 (stable)
- name: 安装 Rust 工具链
uses: dtolnay/rust-toolchain@stable
with:
# macOS ARM64 需要指定 target
targets: ${{ matrix.platform.os == 'macos-latest' && 'aarch64-apple-darwin' || '' }}
# Rust 编译缓存
- name: Rust 编译缓存
uses: swatinem/rust-cache@v2
with:
workspaces: src-tauri -> target
# Linux 专用: 安装 Tauri v2 系统依赖
- name: 安装 Linux 系统依赖
if: matrix.platform.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y \
libwebkit2gtk-4.1-dev \
libappindicator3-dev \
librsvg2-dev \
patchelf \
libssl-dev \
libgtk-3-dev \
libayatana-appindicator3-dev
# 使用 tauri-action 构建并发布
- name: 构建 Tauri 应用
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tagName: ${{ github.ref_name }}
releaseName: "ClawPanel ${{ github.ref_name }}"
releaseBody: "详细变更记录请查看提交历史。"
releaseDraft: true
prerelease: false
args: ${{ matrix.platform.args }}