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

18 lines
333 B
JavaScript
Raw Normal View History

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