mirror of
https://github.com/tuxdotrs/tpanel.git
synced 2025-10-10 21:01:54 +05:30
feat: split scss and rename widget folder to widgets
This commit is contained in:
20
widgets/bar/tailscale.tsx
Normal file
20
widgets/bar/tailscale.tsx
Normal file
@@ -0,0 +1,20 @@
|
||||
import { bind, Variable } from "astal";
|
||||
|
||||
export const Tailscale = () => {
|
||||
const tailscale = Variable("").poll(5000, [
|
||||
"bash",
|
||||
"-c",
|
||||
"tailscale ping vega",
|
||||
]);
|
||||
|
||||
return (
|
||||
<box cssClasses={["tailscale"]}>
|
||||
<label
|
||||
label={bind(tailscale).as((val) => {
|
||||
const data = val.split(" ");
|
||||
return data[data.length - 1];
|
||||
})}
|
||||
/>
|
||||
</box>
|
||||
);
|
||||
};
|
Reference in New Issue
Block a user