mirror of
https://github.com/tuxdotrs/tpanel.git
synced 2025-10-10 12:51:54 +05:30
22 lines
455 B
TypeScript
22 lines
455 B
TypeScript
import { bind, Variable } from "astal";
|
|
|
|
export const Tailscale = () => {
|
|
const tailscale = Variable("").poll(5000, [
|
|
"bash",
|
|
"-c",
|
|
"tailscale ping homelab",
|
|
]);
|
|
|
|
return (
|
|
<box cssClasses={["pill"]} spacing={5}>
|
|
<image iconName="fa-home-symbolic" />
|
|
<label
|
|
label={bind(tailscale).as((val) => {
|
|
const data = val.split(" ");
|
|
return data[data.length - 1];
|
|
})}
|
|
/>
|
|
</box>
|
|
);
|
|
};
|