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-18 17:33:03 +01:00
|
|
|
import {
|
2023-10-26 01:39:36 +01:00
|
|
|
NotificationList, ClearButton
|
2023-10-18 17:33:03 +01:00
|
|
|
} from './widgets.js';
|
|
|
|
import Widget from 'resource:///com/github/Aylur/ags/widget.js';
|
|
|
|
import App from 'resource:///com/github/Aylur/ags/app.js';
|
|
|
|
|
|
|
|
const Header = () => Widget.Box({
|
|
|
|
className: 'header',
|
|
|
|
children: [
|
|
|
|
Widget.Box({ hexpand: true }),
|
|
|
|
ClearButton(),
|
|
|
|
],
|
|
|
|
});
|
|
|
|
|
|
|
|
export const NotificationCenter = () => Widget.Window({
|
|
|
|
name: 'notification-center',
|
|
|
|
anchor: [ 'right', 'top', 'bottom'],
|
|
|
|
popup: true,
|
2023-10-26 01:39:36 +01:00
|
|
|
visible: false,
|
2023-10-18 17:33:03 +01:00
|
|
|
focusable: true,
|
|
|
|
child: Widget.Box({
|
|
|
|
children: [
|
|
|
|
Widget.EventBox({
|
|
|
|
hexpand: true,
|
|
|
|
connections: [['button-press-event', () =>
|
|
|
|
App.closeWindow('notification-center')]]
|
|
|
|
}),
|
|
|
|
Widget.Box({
|
|
|
|
vertical: true,
|
|
|
|
children: [
|
|
|
|
Header(),
|
|
|
|
NotificationList(),
|
|
|
|
],
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
}),
|
|
|
|
});
|
|
|
|
|
2023-10-26 01:39:36 +01:00
|
|
|
|