2024-01-13 23:38:31 -05:00
|
|
|
import CursorBox from '../../misc/cursorbox.ts';
|
2024-01-17 19:18:41 -05:00
|
|
|
import Clock from './clock';
|
2023-09-11 21:10:00 -04:00
|
|
|
|
2023-10-02 12:06:35 -04:00
|
|
|
|
2023-12-18 23:20:32 -05:00
|
|
|
export default () => CursorBox({
|
|
|
|
class_name: 'toggle-off',
|
2023-11-21 01:29:46 -05:00
|
|
|
|
2024-04-07 14:29:12 -04:00
|
|
|
on_primary_click_release: () => App.toggleWindow('win-calendar'),
|
2023-11-21 01:29:46 -05:00
|
|
|
|
2023-12-17 00:01:58 -05:00
|
|
|
setup: (self) => {
|
|
|
|
self.hook(App, (_, windowName, visible) => {
|
2024-04-07 14:29:12 -04:00
|
|
|
if (windowName === 'win-calendar') {
|
2023-10-20 23:11:21 -04:00
|
|
|
self.toggleClassName('toggle-on', visible);
|
2023-11-21 01:29:46 -05:00
|
|
|
}
|
2023-12-17 00:01:58 -05:00
|
|
|
});
|
|
|
|
},
|
2023-11-21 01:29:46 -05:00
|
|
|
|
2024-01-17 19:18:41 -05:00
|
|
|
child: Clock(),
|
2023-09-05 19:22:54 -04:00
|
|
|
});
|