From cb80aff261fabd55aac45703f3bdf20aa2c0498d Mon Sep 17 00:00:00 2001 From: hubian <908234780@qq.com> Date: Fri, 17 Apr 2026 18:00:57 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20Web=E6=9C=8D=E5=8A=A1=E5=A4=9A=E5=88=97?= =?UTF-8?q?=E5=8D=A1=E7=89=87=E5=B8=83=E5=B1=80=EF=BC=8C=E4=B8=80=E8=A1=8C?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=A4=9A=E4=B8=AA=E6=9C=8D=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.py | 60 ++++++++++++++++++++++++++++++++++------------------------ 1 file changed, 35 insertions(+), 25 deletions(-) diff --git a/app.py b/app.py index 8a0b05b..2e97507 100644 --- a/app.py +++ b/app.py @@ -434,7 +434,7 @@ HTML_TEMPLATE = ''' ${typeInfo.name} (${projs.length}) -
+
`; projs.forEach(p => { @@ -544,32 +544,42 @@ HTML_TEMPLATE = ''' } return ` -
-
-
-
-
-

${p.name}

- ${p.type.toUpperCase()} - ${p.version ? `${p.version}` : ''} -
-

${p.description || ''}

- ${portsHtml} -
- ${linksHtml} -
-
-
- ${statusInfo.text} - ${p.status?.health !== null && p.status?.health !== undefined ? ` -
- - ${p.status.health ? '健康' : '异常'} -
- ` : ''} +
+
+
+
+

${p.name}

+ ${statusInfo.text}
- ${actionsHtml} + ${p.ports && p.ports.length > 0 ? ` +
+ ${p.ports.map(port => { + const portStatus = p.status?.ports?.[port]; + const isRunning = portStatus?.running; + return `${port}`; + }).join('')} + ${p.admin_url ? `后台` : ''} +
+ ` : ''} + ${p.type === 'web' ? ` +
+ ${(p.status?.status === 'running' || p.status?.status === 'partial') ? ` + + + ` : ` + + `} + +
+ ` : ''} + ${p.type === 'cron' ? ` +
+ + ${p.status?.cron_configured ? '已配置' : '未配置'} + ${p.cron ? ` · ${p.cron}` : ''} +
+ ` : ''}
`; }