feat: colorize status ans latency

This commit is contained in:
divocat
2025-10-06 19:56:11 +03:00
parent 5418187dd3
commit 6117b0ef9b
6 changed files with 186 additions and 22 deletions

View File

@@ -26,8 +26,8 @@ async function fetchServicesInfo() {
console.log('singbox', singbox);
store.set({
services: {
singbox: singbox.running ? '✔ Enabled' : singbox.status,
podkop: podkop.status ? '✔ Enabled' : podkop.status,
singbox: singbox.running,
podkop: podkop.enabled,
},
});
}
@@ -132,9 +132,22 @@ async function renderServiceInfoWidget() {
items: [
{
key: 'Podkop',
value: String(services.podkop),
value: services.podkop ? '✔ Enabled' : '✘ Disabled',
attributes: {
class: services.podkop
? 'pdk_dashboard-page__widgets-section__item__row--success'
: 'pdk_dashboard-page__widgets-section__item__row--error',
},
},
{
key: 'Sing-box',
value: services.singbox ? '✔ Running' : '✘ Stopped',
attributes: {
class: services.singbox
? 'pdk_dashboard-page__widgets-section__item__row--success'
: 'pdk_dashboard-page__widgets-section__item__row--error',
},
},
{ key: 'Sing-box', value: String(services.singbox) },
],
});