Fix dot status when exited (#2204)

pull/2205/head
shamoon 1 year ago committed by GitHub
parent 47db8be7bb
commit cbad95bf9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -35,8 +35,10 @@ export default function KubernetesStatus({ service, style }) {
return ( return (
<div className={`w-auto text-center overflow-hidden ${backgroundClass} rounded-b-[3px] k8s-status`} title={statusTitle}> <div className={`w-auto text-center overflow-hidden ${backgroundClass} rounded-b-[3px] k8s-status`} title={statusTitle}>
{style !== 'dot' && <div className={`text-[8px] font-bold ${colorClass} uppercase`}>{statusLabel}</div>} {style !== 'dot' ?
{style === 'dot' && <div className={`rounded-full h-3 w-3 ${colorClass}`}/>} <div className={`text-[8px] font-bold ${colorClass} uppercase`}>{statusLabel}</div> :
<div className={`rounded-full h-3 w-3 ${colorClass}`}/>
}
</div> </div>
); );
} }

@ -45,14 +45,17 @@ export default function Status({ service, style }) {
} }
if (style === 'dot') { if (style === 'dot') {
colorClass = colorClass.replace('text-', 'bg-').replace(/\/\d\d$/, ''); colorClass = colorClass.replace(/text-/g, 'bg-').replace(/\/\d\d/g, '');
backgroundClass = "p-4 hover:bg-theme-500/10 dark:hover:bg-theme-900/20"; backgroundClass = "p-4 hover:bg-theme-500/10 dark:hover:bg-theme-900/20";
statusTitle = statusLabel;
} }
return ( return (
<div className={`w-auto text-center overflow-hidden ${backgroundClass} rounded-b-[3px] docker-status`} title={statusTitle}> <div className={`w-auto text-center overflow-hidden ${backgroundClass} rounded-b-[3px] docker-status`} title={statusTitle}>
{style !== 'dot' && <div className={`text-[8px] font-bold ${colorClass} uppercase`}>{statusLabel}</div>} {style !== 'dot' ?
{style === 'dot' && <div className={`rounded-full h-3 w-3 ${colorClass}`}/>} <div className={`text-[8px] font-bold ${colorClass} uppercase`}>{statusLabel}</div> :
<div className={`rounded-full h-3 w-3 ${colorClass}`}/>
}
</div> </div>
); );
} }

@ -70,8 +70,11 @@ module.exports = {
'lg:grid-cols-6', 'lg:grid-cols-6',
'lg:grid-cols-7', 'lg:grid-cols-7',
'lg:grid-cols-8', 'lg:grid-cols-8',
// for status
'bg-white', 'bg-white',
'bg-black', 'bg-black',
'dark:bg-white', 'dark:bg-white',
'bg-orange-400',
'dark:bg-orange-400',
], ],
} }

Loading…
Cancel
Save