mirror of
https://github.com/Theaninova/TheaninovOS.git
synced 2025-12-12 11:36:20 +00:00
16 lines
568 B
JavaScript
16 lines
568 B
JavaScript
import Widget from "resource:///com/github/Aylur/ags/widget.js";
|
|
import Notifications from "resource:///com/github/Aylur/ags/service/notifications.js";
|
|
import icons from "../../icons.js";
|
|
import { SimpleToggleButton } from "../ToggleButton.js";
|
|
|
|
export default () =>
|
|
SimpleToggleButton({
|
|
icon: Widget.Icon({
|
|
icon: Notifications.bind("dnd").transform(
|
|
(dnd) => icons.notifications[dnd ? "silent" : "noisy"],
|
|
),
|
|
}),
|
|
toggle: () => (Notifications.dnd = !Notifications.dnd),
|
|
connection: [Notifications, () => Notifications.dnd],
|
|
});
|