Implemented majority of dashboard
This commit is contained in:
@@ -1,6 +1,12 @@
|
||||
import icons from '../../../icons/index.js';
|
||||
import icons from "../../../icons/index.js";
|
||||
import powermenu from "../../power/helpers/actions.js";
|
||||
|
||||
const Profile = () => {
|
||||
const handleClick = (action) => {
|
||||
App.closeWindow("dashboardmenu");
|
||||
return powermenu.action(action);
|
||||
}
|
||||
|
||||
return Widget.Box({
|
||||
class_name: "profiles-container",
|
||||
hpack: "fill",
|
||||
@@ -14,13 +20,13 @@ const Profile = () => {
|
||||
Widget.Icon({
|
||||
hpack: "center",
|
||||
class_name: "profile-picture",
|
||||
icon: `${App.configDir}/assets/21210205.png`
|
||||
icon: `${App.configDir}/assets/21210205.png`,
|
||||
}),
|
||||
Widget.Label({
|
||||
hpack: "center",
|
||||
class_name: "profile-name",
|
||||
label: "Jaskir Linux"
|
||||
})
|
||||
label: "Jaskir Linux",
|
||||
}),
|
||||
],
|
||||
}),
|
||||
Widget.Box({
|
||||
@@ -30,27 +36,31 @@ const Profile = () => {
|
||||
children: [
|
||||
Widget.Button({
|
||||
class_name: "dashboard-button shutdown",
|
||||
on_clicked: () => handleClick("shutdown"),
|
||||
tooltip_text: "Shut Down",
|
||||
vexpand: true,
|
||||
child: Widget.Icon(icons.powermenu.shutdown)
|
||||
child: Widget.Icon(icons.powermenu.shutdown),
|
||||
}),
|
||||
Widget.Button({
|
||||
class_name: "dashboard-button restart",
|
||||
on_clicked: () => handleClick("reboot"),
|
||||
tooltip_text: "Restart",
|
||||
vexpand: true,
|
||||
child: Widget.Icon(icons.powermenu.reboot)
|
||||
child: Widget.Icon(icons.powermenu.reboot),
|
||||
}),
|
||||
Widget.Button({
|
||||
class_name: "dashboard-button lock",
|
||||
on_clicked: () => handleClick("logout"),
|
||||
tooltip_text: "Log Out",
|
||||
vexpand: true,
|
||||
child: Widget.Icon(icons.powermenu.logout)
|
||||
child: Widget.Icon(icons.powermenu.logout),
|
||||
}),
|
||||
Widget.Button({
|
||||
class_name: "dashboard-button sleep",
|
||||
on_clicked: () => handleClick("sleep"),
|
||||
tooltip_text: "Sleep",
|
||||
vexpand: true,
|
||||
child: Widget.Icon(icons.powermenu.sleep)
|
||||
child: Widget.Icon(icons.powermenu.sleep),
|
||||
}),
|
||||
],
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user