Skip to content

Commit 60a4a3c

Browse files
committed
fix: 修复 dashboard.js 模板字符串语法错误 + Linux 构建环境
- formatDate 函数改用字符串拼接避免嵌套模板字符串转义问题 - Linux 改回 ubuntu-latest 解决 libwebkit2gtk-4.1-dev 依赖冲突
1 parent 5c63899 commit 60a4a3c

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
rust_target: x86_64-apple-darwin
3737
# Linux x86_64
3838
- name: Linux (x64)
39-
os: ubuntu-22.04
39+
os: ubuntu-latest
4040
args: ""
4141
rust_target: ""
4242
# Windows x86_64
@@ -75,7 +75,7 @@ jobs:
7575

7676
# Linux 专用: 安装 Tauri v2 系统依赖
7777
- name: 安装 Linux 系统依赖
78-
if: matrix.platform.os == 'ubuntu-22.04'
78+
if: runner.os == 'Linux'
7979
run: |
8080
sudo apt-get update
8181
sudo apt-get install -y \

src/pages/dashboard.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,11 @@ function renderOverview(page, services, clawapp, tunnel, mcpConfig, backups, con
136136
const formatDate = (timestamp) => {
137137
if (!timestamp) return '——'
138138
const d = new Date(timestamp * 1000)
139-
return \`\${d.getMonth()+1}-\${d.getDate()} \${d.getHours().toString().padStart(2, '0')}:\${d.getMinutes().toString().padStart(2, '0')}\`
139+
const mon = d.getMonth() + 1
140+
const day = d.getDate()
141+
const hr = d.getHours().toString().padStart(2, '0')
142+
const min = d.getMinutes().toString().padStart(2, '0')
143+
return mon + '-' + day + ' ' + hr + ':' + min
140144
}
141145

142146
const latestBackup = backups.length > 0 ? backups.sort((a,b) => b.created_at - a.created_at)[0] : null

0 commit comments

Comments
 (0)