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

15 lines
296 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({
2024-02-01 17:48:30 -05:00
className: "date"
}).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-02-01 17:48:30 -05:00
export { Time };