mirror of
https://github.com/tuxdotrs/tpanel.git
synced 2025-10-10 12:51:54 +05:30
22 lines
517 B
TypeScript
22 lines
517 B
TypeScript
import { bind } from "astal";
|
|
import AstalNetwork from "gi://AstalNetwork";
|
|
|
|
export const Network = () => {
|
|
const network = AstalNetwork.get_default();
|
|
const wifi = bind(network, "wifi");
|
|
|
|
return (
|
|
<box cssClasses={["pill"]} visible={wifi.as(Boolean)}>
|
|
{wifi.as(
|
|
(wifi) =>
|
|
wifi && (
|
|
<box spacing={10}>
|
|
<image iconName={bind(wifi, "iconName")} />
|
|
<label label={bind(wifi, "ssid")} />
|
|
</box>
|
|
),
|
|
)}
|
|
</box>
|
|
);
|
|
};
|