continue polish, prepare launch v1.0.0

This commit is contained in:
Ren Amamiya
2023-06-22 14:17:48 +07:00
parent 699a26b3f0
commit a71e2991c2
14 changed files with 64 additions and 121 deletions

View File

@@ -4,22 +4,10 @@ export function NetworkStatusIndicator() {
const isOnline = useNetworkStatus();
return (
<div className="inline-flex items-center gap-1 rounded-md px-1.5 py-1 hover:bg-zinc-900">
<div className="relative flex h-1.5 w-1.5">
<span
className={`absolute inline-flex h-full w-full animate-ping rounded-full opacity-75 ${
isOnline ? "bg-green-400" : "bg-red-400"
}`}
/>
<span
className={`relative inline-flex h-1.5 w-1.5 rounded-full ${
isOnline ? "bg-green-400" : "bg-amber-400"
}`}
/>
</div>
<p className="text-base font-medium text-zinc-500">
{isOnline ? "Online" : "Offline"}
</p>
</div>
<span
className={`absolute right-0 top-0 block h-2 w-2 -translate-y-1/2 translate-x-1/2 transform rounded-full ${
isOnline ? "bg-green-400" : "bg-red-400"
} ring-2 ring-zinc-900`}
/>
);
}