21 lines
510 B
TypeScript
21 lines
510 B
TypeScript
import App from 'resource:///com/github/Aylur/ags/app.js';
|
|
|
|
import CursorBox from '../../misc/cursorbox.ts';
|
|
import Clock from './clock';
|
|
|
|
|
|
export default () => CursorBox({
|
|
class_name: 'toggle-off',
|
|
|
|
on_primary_click_release: () => App.toggleWindow('calendar'),
|
|
|
|
setup: (self) => {
|
|
self.hook(App, (_, windowName, visible) => {
|
|
if (windowName === 'calendar') {
|
|
self.toggleClassName('toggle-on', visible);
|
|
}
|
|
});
|
|
},
|
|
|
|
child: Clock(),
|
|
});
|