1. Finished GUI
2. Implemented Geolocation API
This commit is contained in:
@@ -0,0 +1,117 @@
|
||||
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:";
|
||||
}
|
||||
|
||||
LineEdit {
|
||||
height: 35px;
|
||||
edited(text) => {
|
||||
OtherToolCallbacks.ipaddressbar = self.text;
|
||||
}
|
||||
}
|
||||
|
||||
Button {
|
||||
height: 35px;
|
||||
text: "Search";
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user