mirror of
https://github.com/qingchencloud/clawpanel.git
synced 2026-05-30 12:50:14 +08:00
fix: 修复 dashboard.js 模板字符串语法错误 + Linux 构建环境
- formatDate 函数改用字符串拼接避免嵌套模板字符串转义问题 - Linux 改回 ubuntu-latest 解决 libwebkit2gtk-4.1-dev 依赖冲突
This commit is contained in:
@@ -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