Convert all remaining files to typescript.

This commit is contained in:
Jas Singh
2024-07-26 23:11:33 -07:00
parent ca5dcc629b
commit b511d76e11
84 changed files with 2075 additions and 1987 deletions

View File

@@ -1,133 +0,0 @@
import GLib from "gi://GLib";
import options from "options";
const { left, right } = options.menus.dashboard.directories;
const Directories = () => {
return Widget.Box({
class_name: "dashboard-card directories-container",
vpack: "fill",
hpack: "fill",
expand: true,
children: [
Widget.Box({
vertical: true,
expand: true,
class_name: "section right",
children: [
Widget.Button({
hpack: "start",
expand: true,
class_name: "directory-link left top",
on_primary_click: left.directory1.command
.bind("value")
.as((cmd) => {
return () => {
App.closeWindow("dashboardmenu");
Utils.execAsync(cmd);
};
}),
child: Widget.Label({
hpack: "start",
label: left.directory1.label.bind("value"),
}),
}),
Widget.Button({
expand: true,
hpack: "start",
class_name: "directory-link left middle",
on_primary_click: left.directory2.command
.bind("value")
.as((cmd) => {
return () => {
App.closeWindow("dashboardmenu");
Utils.execAsync(cmd);
};
}),
child: Widget.Label({
hpack: "start",
label: left.directory2.label.bind("value"),
}),
}),
Widget.Button({
expand: true,
hpack: "start",
class_name: "directory-link left bottom",
on_primary_click: left.directory3.command
.bind("value")
.as((cmd) => {
return () => {
App.closeWindow("dashboardmenu");
Utils.execAsync(cmd);
};
}),
child: Widget.Label({
hpack: "start",
label: left.directory3.label.bind("value"),
}),
}),
],
}),
Widget.Box({
vertical: true,
expand: true,
class_name: "section left",
children: [
Widget.Button({
hpack: "start",
expand: true,
class_name: "directory-link right top",
on_primary_click: right.directory1.command
.bind("value")
.as((cmd) => {
return () => {
App.closeWindow("dashboardmenu");
Utils.execAsync(cmd);
};
}),
child: Widget.Label({
hpack: "start",
label: right.directory1.label.bind("value"),
}),
}),
Widget.Button({
expand: true,
hpack: "start",
class_name: "directory-link right middle",
on_primary_click: right.directory2.command
.bind("value")
.as((cmd) => {
return () => {
App.closeWindow("dashboardmenu");
Utils.execAsync(cmd);
};
}),
child: Widget.Label({
hpack: "start",
label: right.directory2.label.bind("value"),
}),
}),
Widget.Button({
expand: true,
hpack: "start",
class_name: "directory-link right bottom",
on_primary_click: right.directory3.command
.bind("value")
.as((cmd) => {
return () => {
App.closeWindow("dashboardmenu");
Utils.execAsync(cmd);
};
}),
child: Widget.Label({
hpack: "start",
label: right.directory3.label.bind("value"),
}),
}),
],
}),
],
});
};
export { Directories };

View File

@@ -0,0 +1,132 @@
import options from "options";
const { left, right } = options.menus.dashboard.directories;
const Directories = () => {
return Widget.Box({
class_name: "dashboard-card directories-container",
vpack: "fill",
hpack: "fill",
expand: true,
children: [
Widget.Box({
vertical: true,
expand: true,
class_name: "section right",
children: [
Widget.Button({
hpack: "start",
expand: true,
class_name: "directory-link left top",
on_primary_click: left.directory1.command
.bind("value")
.as((cmd) => {
return () => {
App.closeWindow("dashboardmenu");
Utils.execAsync(cmd);
};
}),
child: Widget.Label({
hpack: "start",
label: left.directory1.label.bind("value"),
}),
}),
Widget.Button({
expand: true,
hpack: "start",
class_name: "directory-link left middle",
on_primary_click: left.directory2.command
.bind("value")
.as((cmd) => {
return () => {
App.closeWindow("dashboardmenu");
Utils.execAsync(cmd);
};
}),
child: Widget.Label({
hpack: "start",
label: left.directory2.label.bind("value"),
}),
}),
Widget.Button({
expand: true,
hpack: "start",
class_name: "directory-link left bottom",
on_primary_click: left.directory3.command
.bind("value")
.as((cmd) => {
return () => {
App.closeWindow("dashboardmenu");
Utils.execAsync(cmd);
};
}),
child: Widget.Label({
hpack: "start",
label: left.directory3.label.bind("value"),
}),
}),
],
}),
Widget.Box({
vertical: true,
expand: true,
class_name: "section left",
children: [
Widget.Button({
hpack: "start",
expand: true,
class_name: "directory-link right top",
on_primary_click: right.directory1.command
.bind("value")
.as((cmd) => {
return () => {
App.closeWindow("dashboardmenu");
Utils.execAsync(cmd);
};
}),
child: Widget.Label({
hpack: "start",
label: right.directory1.label.bind("value"),
}),
}),
Widget.Button({
expand: true,
hpack: "start",
class_name: "directory-link right middle",
on_primary_click: right.directory2.command
.bind("value")
.as((cmd) => {
return () => {
App.closeWindow("dashboardmenu");
Utils.execAsync(cmd);
};
}),
child: Widget.Label({
hpack: "start",
label: right.directory2.label.bind("value"),
}),
}),
Widget.Button({
expand: true,
hpack: "start",
class_name: "directory-link right bottom",
on_primary_click: right.directory3.command
.bind("value")
.as((cmd) => {
return () => {
App.closeWindow("dashboardmenu");
Utils.execAsync(cmd);
};
}),
child: Widget.Label({
hpack: "start",
label: right.directory3.label.bind("value"),
}),
}),
],
}),
],
});
};
export { Directories };