Skip to content

Commit 914abe6

Browse files
committed
refactor(webs): 前端重构
UI重构
1 parent c725b1d commit 914abe6

File tree

402 files changed

+30263
-246
lines changed

Some content is hidden

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

402 files changed

+30263
-246
lines changed

.github/workflows/docker-image.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -21,36 +21,36 @@ jobs:
2121
- name: Set up Node.js
2222
uses: actions/setup-node@v4
2323
with:
24-
node-version: '20'
24+
node-version: '22'
25+
# cache: 'yarn' # Disabled to prevent using system Yarn v1 which conflicts with Corepack Yarn v4
2526

26-
- name: Install pnpm
27-
uses: pnpm/action-setup@v3
28-
with:
29-
version: 8
30-
run_install: false
27+
- name: Enable Corepack
28+
run: corepack enable
3129

32-
- name: Get pnpm store directory
33-
shell: bash
30+
- name: Get yarn cache directory path
31+
id: yarn-cache-dir-path
3432
run: |
35-
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
33+
cd webs
34+
echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
3635
37-
- name: Setup pnpm cache
38-
uses: actions/cache@v3
36+
- name: Cache dependencies
37+
uses: actions/cache@v4
38+
id: yarn-cache
3939
with:
40-
path: ${{ env.STORE_PATH }}
41-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
40+
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
41+
key: ${{ runner.os }}-yarn-${{ hashFiles('webs/yarn.lock') }}
4242
restore-keys: |
43-
${{ runner.os }}-pnpm-store-
43+
${{ runner.os }}-yarn-
4444
4545
- name: Install frontend dependencies
4646
run: |
4747
cd webs
48-
pnpm install
48+
yarn install --immutable
4949
5050
- name: Build frontend
5151
run: |
5252
cd webs
53-
pnpm run build
53+
yarn run build
5454
5555
- name: Upload frontend artifacts
5656
uses: actions/upload-artifact@v4

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ sublink.exe
1111
static
1212
sublinkPro.exe
1313

14+
/old-webs/

Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# 1. 构建前端
2-
FROM node:20-alpine AS frontend-builder
2+
FROM node:22-alpine AS frontend-builder
33
WORKDIR /frontend
44
COPY webs ./webs
55

6-
# 安装 pnpm
7-
RUN npm install -g pnpm
6+
# Enable Corepack for Yarn
7+
RUN corepack enable
88

9-
# 使用 pnpm 安装依赖并构建
10-
RUN cd webs && pnpm install && pnpm run build
9+
# 使用 Yarn 安装依赖并构建
10+
RUN cd webs && yarn install && yarn run build
1111

1212

1313
# 2. 构建后端

README.md

Lines changed: 14 additions & 16 deletions

api/subscheduler.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,14 @@ func SubSchedulerGet(c *gin.Context) {
116116
utils.FailWithMsg(c, "获取订阅任务列表失败: "+err.Error())
117117
return
118118
}
119+
120+
for i := range subSs {
121+
nodes, err := models.ListBySourceID(subSs[i].ID)
122+
if err == nil {
123+
subSs[i].NodeCount = len(nodes)
124+
}
125+
}
126+
119127
utils.OkDetailed(c, "获取成功", subSs)
120128
}
121129

docs/images/1.jpg

137 KB

docs/images/10.jpg

65.2 KB

docs/images/2.jpg

297 KB

docs/images/3.jpg

344 KB

docs/images/4.jpg

198 KB

0 commit comments

Comments
 (0)