|
|
@ -37,6 +37,18 @@ Future<void> checkIsEfi(
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Future<void> checkConnected(
|
|
|
|
|
|
|
|
setState,
|
|
|
|
|
|
|
|
) async {
|
|
|
|
|
|
|
|
final String scriptOutput =
|
|
|
|
|
|
|
|
await Process.run("/opt/jade_gui/scripts/checkNetwork.sh", [])
|
|
|
|
|
|
|
|
.then((ProcessResult result) {
|
|
|
|
|
|
|
|
return result.stdout;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
bool connected = scriptOutput.contains("disconnected") ? false : true;
|
|
|
|
|
|
|
|
setState(connected);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Future<void> writeToLog(String message) async {
|
|
|
|
Future<void> writeToLog(String message) async {
|
|
|
|
await File('${env["HOME"]}/jade_log.txt')
|
|
|
|
await File('${env["HOME"]}/jade_log.txt')
|
|
|
|
.readAsString()
|
|
|
|
.readAsString()
|
|
|
@ -85,6 +97,7 @@ class _JadeguiState extends State<Jadegui> {
|
|
|
|
bool isEfi = false;
|
|
|
|
bool isEfi = false;
|
|
|
|
bool ipv6 = false;
|
|
|
|
bool ipv6 = false;
|
|
|
|
bool enableTimeshift = true;
|
|
|
|
bool enableTimeshift = true;
|
|
|
|
|
|
|
|
bool connected = false;
|
|
|
|
bool running = false;
|
|
|
|
bool running = false;
|
|
|
|
bool runningInfo = false;
|
|
|
|
bool runningInfo = false;
|
|
|
|
bool runningPart = false;
|
|
|
|
bool runningPart = false;
|
|
|
@ -108,6 +121,13 @@ class _JadeguiState extends State<Jadegui> {
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
setWindowSize();
|
|
|
|
setWindowSize();
|
|
|
|
|
|
|
|
checkConnected(
|
|
|
|
|
|
|
|
(value) {
|
|
|
|
|
|
|
|
setState(() {
|
|
|
|
|
|
|
|
connected = value;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
);
|
|
|
|
return Scaffold(
|
|
|
|
return Scaffold(
|
|
|
|
backgroundColor: const Color.fromARGB(255, 23, 23, 23),
|
|
|
|
backgroundColor: const Color.fromARGB(255, 23, 23, 23),
|
|
|
|
body: Row(
|
|
|
|
body: Row(
|
|
|
@ -305,11 +325,14 @@ class _JadeguiState extends State<Jadegui> {
|
|
|
|
child: SizedBox(
|
|
|
|
child: SizedBox(
|
|
|
|
width: logicWidth,
|
|
|
|
width: logicWidth,
|
|
|
|
height: logicHeight,
|
|
|
|
height: logicHeight,
|
|
|
|
child: welcome(() {
|
|
|
|
child: welcome(
|
|
|
|
setState(() {
|
|
|
|
() {
|
|
|
|
_selectedIndex = _selectedIndex + 1;
|
|
|
|
setState(() {
|
|
|
|
});
|
|
|
|
_selectedIndex = _selectedIndex + 1;
|
|
|
|
}),
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
connected,
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|