snowflake/home/ags/config/js/widgets/time.js

16 lines
314 B
JavaScript
Raw Normal View History

import { Utils, Widget } from "../../import.js";
2024-01-01 21:29:18 -05:00
const Time = () =>
Widget.Box({
2024-01-01 21:29:18 -05:00
child: Widget.Label({
className: "date",
2024-01-01 21:29:18 -05:00
}).poll(
1000,
(self) =>
Utils.execAsync(["date", "+%a %b %d %H:%M"]).then((time) =>
self.label = time
),
2024-01-01 21:29:18 -05:00
),
});
2024-01-01 21:29:18 -05:00
export { Time };