Started Rust Development (#10)

Reviewed-on: brotoskyj/CHAMP#10
Co-authored-by: brotoskyj <jbrotosky@gmail.com>
Co-committed-by: brotoskyj <jbrotosky@gmail.com>
This commit was merged in pull request #10.
This commit is contained in:
brotoskyj
2025-01-28 15:36:14 -05:00
committed by brotoskyj
parent d65ac84d29
commit 353a1ec628
13 changed files with 7296 additions and 0 deletions
+118
View File
@@ -0,0 +1,118 @@
import { AboutSlint, VerticalBox, TabWidget, Button, LineEdit } from "std-widgets.slint";
export global OtherToolCallbacks {
pure callback killCherwell();
pure callback ipapi();
in-out property <string> ipaddressbar;
in property <string> isp;
in property <string> country;
in property <string> state;
in property <string> city;
}
export component OtherTools inherits Window {
TabWidget {
Tab {
title: @tr("General");
Button {
text: "Kill all local Cherwell Processes";
clicked => {
OtherToolCallbacks.killCherwell();
}
}
}
Tab {
title: @tr("Helpdesk");
}
Tab {
title: @tr("PC Technician");
}
Tab {
title: @tr("IRT");
TabWidget {
Tab {
title: @tr("IP Geolocation API");
HorizontalLayout {
alignment: center;
spacing: 5px;
padding: 15px;
height: 200px;
VerticalLayout {
spacing: 5px;
padding: 15px;
Text {
height: 30px;
text: "IP Address / URL:";
}
LineEdit {
height: 35px;
edited(text) => {
OtherToolCallbacks.ipaddressbar = self.text;
}
}
Button {
height: 35px;
text: "Search";
primary: true;
clicked => {
OtherToolCallbacks.ipapi();
}
}
}
HorizontalLayout {
spacing: 5px;
width: 400px;
VerticalLayout {
y: 10px;
Text {
text: "ISP:";
}
Text {
text: "Country:";
}
Text {
text: "State:";
}
Text {
text: "City:";
}
}
VerticalLayout {
spacing: 5px;
LineEdit {
read-only: true;
text: OtherToolCallbacks.isp;
}
LineEdit {
read-only: true;
text: OtherToolCallbacks.country;
}
LineEdit {
read-only: true;
text: OtherToolCallbacks.state;
}
LineEdit {
read-only: true;
text: OtherToolCallbacks.city;
}
}
}
}
}
}
}
}
}