Skip to content

Commit 50ff60b

Browse files
committed
feat: HaloLight Angular 21 完整实现
- Angular 21 全栈框架 - 9 个可配置仪表盘组件 - 11 个皮肤预设主题 - 多账号认证与切换 - WebSocket 实时通知 - 多标签导航系统 - 命令面板 (⌘K) - 权限管理系统 - 页面状态缓存
0 parents  commit 50ff60b

102 files changed

Lines changed: 18488 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Editor configuration, see https://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.ts]
12+
quote_type = single
13+
ij_typescript_use_double_quotes = false
14+
15+
[*.md]
16+
max_line_length = off
17+
trim_trailing_whitespace = false

.env.example

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# =============================================================================
2+
# Halolight Angular 环境变量配置
3+
# =============================================================================
4+
# 复制此文件为 .env 并填写实际值
5+
6+
# API 基础 URL
7+
NG_APP_API_URL=/api
8+
9+
# 是否启用 Mock 数据(true/false)
10+
NG_APP_USE_MOCK=true
11+
12+
# 演示账号(仅开发/演示环境)
13+
NG_APP_DEMO_EMAIL=admin@example.com
14+
NG_APP_DEMO_PASSWORD=123456
15+
NG_APP_SHOW_DEMO_HINT=true
16+
17+
# 应用配置
18+
NG_APP_TITLE=Admin Pro
19+
NG_APP_BRAND_NAME=Halolight

.github/workflows/ci.yml

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main, develop]
6+
pull_request:
7+
branches: [main]
8+
9+
env:
10+
NODE_VERSION: '22'
11+
12+
jobs:
13+
lint:
14+
name: Lint
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Setup pnpm
21+
uses: pnpm/action-setup@v4
22+
23+
- name: Setup Node.js
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: ${{ env.NODE_VERSION }}
27+
cache: 'pnpm'
28+
29+
- name: Install dependencies
30+
run: pnpm install --frozen-lockfile
31+
32+
- name: Run ESLint
33+
run: pnpm run lint
34+
35+
type-check:
36+
name: Type Check
37+
runs-on: ubuntu-latest
38+
steps:
39+
- name: Checkout
40+
uses: actions/checkout@v4
41+
42+
- name: Setup pnpm
43+
uses: pnpm/action-setup@v4
44+
45+
- name: Setup Node.js
46+
uses: actions/setup-node@v4
47+
with:
48+
node-version: ${{ env.NODE_VERSION }}
49+
cache: 'pnpm'
50+
51+
- name: Install dependencies
52+
run: pnpm install --frozen-lockfile
53+
54+
- name: Type check
55+
run: pnpm exec tsc --noEmit
56+
57+
test:
58+
name: Test
59+
runs-on: ubuntu-latest
60+
steps:
61+
- name: Checkout
62+
uses: actions/checkout@v4
63+
64+
- name: Setup pnpm
65+
uses: pnpm/action-setup@v4
66+
67+
- name: Setup Node.js
68+
uses: actions/setup-node@v4
69+
with:
70+
node-version: ${{ env.NODE_VERSION }}
71+
cache: 'pnpm'
72+
73+
- name: Install dependencies
74+
run: pnpm install --frozen-lockfile
75+
76+
- name: Run tests
77+
run: pnpm test:coverage
78+
79+
- name: Upload coverage
80+
uses: codecov/codecov-action@v4
81+
with:
82+
token: ${{ secrets.CODECOV_TOKEN }}
83+
fail_ci_if_error: false
84+
85+
build:
86+
name: Build
87+
runs-on: ubuntu-latest
88+
needs: [lint, type-check, test]
89+
steps:
90+
- name: Checkout
91+
uses: actions/checkout@v4
92+
93+
- name: Setup pnpm
94+
uses: pnpm/action-setup@v4
95+
96+
- name: Setup Node.js
97+
uses: actions/setup-node@v4
98+
with:
99+
node-version: ${{ env.NODE_VERSION }}
100+
cache: 'pnpm'
101+
102+
- name: Install dependencies
103+
run: pnpm install --frozen-lockfile
104+
105+
- name: Build
106+
run: pnpm run build
107+
108+
- name: Upload build artifacts
109+
uses: actions/upload-artifact@v4
110+
with:
111+
name: dist
112+
path: dist/
113+
retention-days: 7
114+
115+
# Security audit
116+
security:
117+
name: Security Audit
118+
runs-on: ubuntu-latest
119+
steps:
120+
- name: Checkout
121+
uses: actions/checkout@v4
122+
123+
- name: Setup pnpm
124+
uses: pnpm/action-setup@v4
125+
126+
- name: Setup Node.js
127+
uses: actions/setup-node@v4
128+
with:
129+
node-version: ${{ env.NODE_VERSION }}
130+
cache: 'pnpm'
131+
132+
- name: Install dependencies
133+
run: pnpm install --frozen-lockfile
134+
135+
- name: Run security audit
136+
run: pnpm audit --audit-level=high
137+
continue-on-error: true

.gitignore

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files.
2+
3+
# Compiled output
4+
/dist
5+
/tmp
6+
/out-tsc
7+
/bazel-out
8+
9+
# Node
10+
/node_modules
11+
npm-debug.log
12+
yarn-error.log
13+
14+
# IDEs and editors
15+
.idea/
16+
.project
17+
.classpath
18+
.c9/
19+
*.launch
20+
.settings/
21+
*.sublime-workspace
22+
23+
# Visual Studio Code
24+
.vscode/*
25+
!.vscode/settings.json
26+
!.vscode/tasks.json
27+
!.vscode/launch.json
28+
!.vscode/extensions.json
29+
.history/*
30+
31+
# Miscellaneous
32+
/.angular/cache
33+
.sass-cache/
34+
/connect.lock
35+
/coverage
36+
/libpeerconnection.log
37+
testem.log
38+
/typings
39+
__screenshots__/
40+
41+
# System files
42+
.DS_Store
43+
Thumbs.db

.postcssrc.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"plugins": {
3+
"@tailwindcss/postcss": {}
4+
}
5+
}

.vscode/extensions.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846
3+
"recommendations": ["angular.ng-template"]
4+
}

.vscode/launch.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
3+
"version": "0.2.0",
4+
"configurations": [
5+
{
6+
"name": "ng serve",
7+
"type": "chrome",
8+
"request": "launch",
9+
"preLaunchTask": "npm: start",
10+
"url": "http://localhost:4200/"
11+
},
12+
{
13+
"name": "ng test",
14+
"type": "chrome",
15+
"request": "launch",
16+
"preLaunchTask": "npm: test",
17+
"url": "http://localhost:9876/debug.html"
18+
}
19+
]
20+
}

.vscode/tasks.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
// For more information, visit: https://go.microsoft.com/fwlink/?LinkId=733558
3+
"version": "2.0.0",
4+
"tasks": [
5+
{
6+
"type": "npm",
7+
"script": "start",
8+
"isBackground": true,
9+
"problemMatcher": {
10+
"owner": "typescript",
11+
"pattern": "$tsc",
12+
"background": {
13+
"activeOnStart": true,
14+
"beginsPattern": {
15+
"regexp": "(.*?)"
16+
},
17+
"endsPattern": {
18+
"regexp": "bundle generation complete"
19+
}
20+
}
21+
}
22+
},
23+
{
24+
"type": "npm",
25+
"script": "test",
26+
"isBackground": true,
27+
"problemMatcher": {
28+
"owner": "typescript",
29+
"pattern": "$tsc",
30+
"background": {
31+
"activeOnStart": true,
32+
"beginsPattern": {
33+
"regexp": "(.*?)"
34+
},
35+
"endsPattern": {
36+
"regexp": "bundle generation complete"
37+
}
38+
}
39+
}
40+
}
41+
]
42+
}

0 commit comments

Comments
 (0)