Added basic Calendar menu (WIP)
This commit is contained in:
@@ -9,6 +9,9 @@ const Clock = () => {
|
||||
label: date.bind(),
|
||||
}),
|
||||
isVisible: true,
|
||||
props: {
|
||||
on_primary_click: () => App.toggleWindow("calendarmenu"),
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ export const Notifications = () => {
|
||||
hexpand: true,
|
||||
class_name: "bar-notifications",
|
||||
child: Widget.Label({
|
||||
hpack: "start",
|
||||
hpack: "center",
|
||||
hexpand: true,
|
||||
class_name: "bar-notifications-label",
|
||||
setup: (self) => {
|
||||
|
||||
@@ -8,7 +8,6 @@ export const Padding = (name) =>
|
||||
child: Widget.Box(),
|
||||
setup: (w) => w.on("button-press-event", () => App.toggleWindow(name)),
|
||||
});
|
||||
|
||||
const moveBoxToCursor = (self, minWidth, minHeight, fixed) => {
|
||||
globalMousePos.connect("changed", ({ value }) => {
|
||||
let monWidth = hyprland.monitors[hyprland.active.monitor.id].width;
|
||||
@@ -73,6 +72,7 @@ export default ({
|
||||
moveBoxToCursor(self, minWidth, minHeight, fixed);
|
||||
},
|
||||
child: Widget.Box({
|
||||
class_name: "dropdown-menu-container",
|
||||
css: "padding: 1px; margin: -1px;",
|
||||
child: Widget.Revealer({
|
||||
revealChild: false,
|
||||
|
||||
34
modules/menus/calendar/index.js
Normal file
34
modules/menus/calendar/index.js
Normal file
@@ -0,0 +1,34 @@
|
||||
import PopupWindow from "../PopupWindow.js";
|
||||
import icons from "../../icons/index.js";
|
||||
|
||||
export default () => {
|
||||
return PopupWindow({
|
||||
name: "calendarmenu",
|
||||
visible: false,
|
||||
transition: "crossfade",
|
||||
layout: "top-right",
|
||||
child: Widget.Box({
|
||||
class_name: "calendar-menu-content",
|
||||
css: "padding: 1px; margin: -1px;",
|
||||
vexpand: false,
|
||||
children: [
|
||||
Widget.Box({
|
||||
class_name: "calendar-content-container",
|
||||
children: [
|
||||
Widget.Box({
|
||||
class_name: "calendar-content-items",
|
||||
children: [
|
||||
Widget.Calendar({
|
||||
class_name: "calendar-menu-calendar",
|
||||
showDayNames: true,
|
||||
showDetails: true,
|
||||
showHeading: true,
|
||||
}),
|
||||
],
|
||||
}),
|
||||
],
|
||||
}),
|
||||
],
|
||||
}),
|
||||
});
|
||||
};
|
||||
@@ -5,5 +5,6 @@ import NetworkMenu from "./network/index.js";
|
||||
import BluetoothMenu from "./bluetooth/index.js";
|
||||
import MediaMenu from "./media/index.js";
|
||||
import NotificationsMenu from "./notifications/index.js";
|
||||
import CalendarMenu from "./calendar/index.js";
|
||||
|
||||
export default [PowerMenu(), Verification(), AudioMenu(), NetworkMenu(), BluetoothMenu(), MediaMenu(), NotificationsMenu()];
|
||||
export default [PowerMenu(), Verification(), AudioMenu(), NetworkMenu(), BluetoothMenu(), MediaMenu(), NotificationsMenu(), CalendarMenu()];
|
||||
|
||||
@@ -398,6 +398,18 @@ export default () => {
|
||||
});
|
||||
}
|
||||
|
||||
if (sortedNetworks.length <= 0) {
|
||||
return self.children = [
|
||||
Widget.Label({
|
||||
class_name: "not-found-label dim",
|
||||
expand: true,
|
||||
hpack: "center",
|
||||
vpack: "center",
|
||||
label: "No Wifi Networks Found"
|
||||
})
|
||||
]
|
||||
}
|
||||
|
||||
return (self.children = sortedNetworks.map((accPoint) => {
|
||||
return Widget.Box({
|
||||
vertical: true,
|
||||
|
||||
@@ -63,6 +63,7 @@ export default () => {
|
||||
}),
|
||||
Widget.Button({
|
||||
class_name: "clear-notifications-button",
|
||||
tooltip_text: "Clear Notifications",
|
||||
on_primary_click: () => notifs.clear(),
|
||||
child: Widget.Label({
|
||||
class_name: "clear-notifications-label",
|
||||
|
||||
Reference in New Issue
Block a user