This repository has been archived on 2024-04-14. You can view files and clone it, but cannot push or open issues or pull requests.
2023-10-15 00:16:19 +01:00
|
|
|
import { Box, Icon, Label } from 'resource:///com/github/Aylur/ags/widget.js';
|
|
|
|
import { execAsync } from 'resource:///com/github/Aylur/ags/utils.js';
|
|
|
|
|
|
|
|
export default () => Box({
|
2023-10-12 20:52:06 +01:00
|
|
|
className: 'date',
|
|
|
|
children: [
|
2023-10-15 00:16:19 +01:00
|
|
|
Icon({
|
|
|
|
icon: 'x-office-calendar-symbolic',
|
2023-10-12 20:52:06 +01:00
|
|
|
}),
|
|
|
|
|
2023-10-15 00:16:19 +01:00
|
|
|
Label({
|
2023-10-12 20:52:06 +01:00
|
|
|
connections: [
|
2023-10-15 00:16:19 +01:00
|
|
|
[1000, label => execAsync(['date', '+%a %d, %B %H:%M'])
|
|
|
|
.then(date => label.label = ' ' + date).catch(console.error)
|
|
|
|
],
|
2023-10-12 20:52:06 +01:00
|
|
|
],
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
});
|