This commit is contained in:
sankalp committed 2024-05-18 15:14:03 +05:45
1 parent 872683b11b
commit e1988a3962
119 files changed
+5679 -1811

No files matched your search

@@ -0,0 +1,54 @@
import powermenu from "../../services/powermenu.js";
import PopupWindow from "../PopupWindow.js";
const WINDOW_NAME = "verification__window";
const Container = () =>
Widget.Box({
class_names: ["verification__container", "window-content"],
vertical: true,
children: [
Widget.Box({
class_name: "text-box",
vertical: true,
children: [
Widget.Label({
class_name: "title",
label: powermenu.bind("title"),
}),
Widget.Label({
class_name: "desc",
label: "Are you sure?",
}),
],
}),
Widget.Box({
class_name: "buttons",
vexpand: true,
vpack: "end",
homogeneous: true,
spacing: 6,
children: [
Widget.Button({
child: Widget.Label("No"),
on_clicked: () => App.toggleWindow(WINDOW_NAME),
setup: (self) =>
self.hook(App, (_, name, visible) => {
if (name === WINDOW_NAME && visible) self.grab_focus();
}),
}),
Widget.Button({
child: Widget.Label("Yes"),
on_clicked: () => Utils.exec(powermenu.cmd),
}),
],
}),
],
});
export default () =>
PopupWindow({
name: WINDOW_NAME,
exclusivity: "ignore",
child: Container(),
});