mirror of
https://github.com/tuxdotrs/tpanel.git
synced 2025-10-10 21:01:54 +05:30
feat: migrate to ags v3
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { bind, Variable } from "astal";
|
||||
import { createPoll } from "ags/time";
|
||||
|
||||
export const Tailscale = () => {
|
||||
const tailscale = Variable("").poll(5000, [
|
||||
const tailscale = createPoll("", 5000, [
|
||||
"bash",
|
||||
"-c",
|
||||
"tailscale ping homelab",
|
||||
@@ -10,8 +10,9 @@ export const Tailscale = () => {
|
||||
return (
|
||||
<box cssClasses={["pill"]} spacing={5}>
|
||||
<image iconName="fa-home-symbolic" />
|
||||
|
||||
<label
|
||||
label={bind(tailscale).as((val) => {
|
||||
label={tailscale((val) => {
|
||||
const data = val.split(" ");
|
||||
return data[data.length - 1];
|
||||
})}
|
||||
|
Reference in New Issue
Block a user