mirror of
https://github.com/qingchencloud/clawpanel.git
synced 2026-06-25 17:54:10 +08:00
fix: 修复 dashboard.js 模板字符串语法错误 + Linux 构建环境
- formatDate 函数改用字符串拼接避免嵌套模板字符串转义问题 - Linux 改回 ubuntu-latest 解决 libwebkit2gtk-4.1-dev 依赖冲突
This commit is contained in:
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
@@ -36,7 +36,7 @@ jobs:
|
||||
rust_target: x86_64-apple-darwin
|
||||
# Linux x86_64
|
||||
- name: Linux (x64)
|
||||
os: ubuntu-22.04
|
||||
os: ubuntu-latest
|
||||
args: ""
|
||||
rust_target: ""
|
||||
# Windows x86_64
|
||||
@@ -75,7 +75,7 @@ jobs:
|
||||
|
||||
# Linux 专用: 安装 Tauri v2 系统依赖
|
||||
- name: 安装 Linux 系统依赖
|
||||
if: matrix.platform.os == 'ubuntu-22.04'
|
||||
if: runner.os == 'Linux'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y \
|
||||
|
||||
@@ -136,7 +136,11 @@ function renderOverview(page, services, clawapp, tunnel, mcpConfig, backups, con
|
||||
const formatDate = (timestamp) => {
|
||||
if (!timestamp) return '——'
|
||||
const d = new Date(timestamp * 1000)
|
||||
return \`\${d.getMonth()+1}-\${d.getDate()} \${d.getHours().toString().padStart(2, '0')}:\${d.getMinutes().toString().padStart(2, '0')}\`
|
||||
const mon = d.getMonth() + 1
|
||||
const day = d.getDate()
|
||||
const hr = d.getHours().toString().padStart(2, '0')
|
||||
const min = d.getMinutes().toString().padStart(2, '0')
|
||||
return mon + '-' + day + ' ' + hr + ':' + min
|
||||
}
|
||||
|
||||
const latestBackup = backups.length > 0 ? backups.sort((a,b) => b.created_at - a.created_at)[0] : null
|
||||
|
||||
Reference in New Issue
Block a user