add summary screen, the ui is mostly done nowgit add --all (finally)

pull/2/head
axtlos 3 years ago
parent 745db5f3d2
commit 3f76ff7906

@ -30,4 +30,5 @@ package() {
mkdir -p ${pkgdir}/opt/jade_gui/scripts/ mkdir -p ${pkgdir}/opt/jade_gui/scripts/
mv ${srcdir}/scripts/* ${pkgdir}/opt/jade_gui/scripts/. mv ${srcdir}/scripts/* ${pkgdir}/opt/jade_gui/scripts/.
chmod +x ${pkgdir}/opt/jade_gui/scripts/*
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

@ -21,39 +21,43 @@ Future<void> getPartitions(setState) async {
} }
Widget partitionTemplate(partition, setPartition, setPartitionInfo) { Widget partitionTemplate(partition, setPartition, setPartitionInfo) {
return Column( if (partition != "") {
mainAxisAlignment: MainAxisAlignment.spaceEvenly, return Column(
crossAxisAlignment: CrossAxisAlignment.stretch, mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [ crossAxisAlignment: CrossAxisAlignment.stretch,
Container( children: [
padding: const EdgeInsets.all(2), Container(
decoration: BoxDecoration( padding: const EdgeInsets.all(2),
borderRadius: BorderRadius.circular(5), decoration: BoxDecoration(
border: Border.all(color: Colors.black45), borderRadius: BorderRadius.circular(5),
color: const Color.fromARGB(255, 30, 30, 30), border: Border.all(color: Colors.black45),
), color: const Color.fromARGB(255, 30, 30, 30),
child: ElevatedButton(
onPressed: () {
setPartition(partition);
getPartitionInfo(partition, setPartitionInfo);
},
style: TextButton.styleFrom(
primary: Colors.white,
backgroundColor: const Color.fromARGB(0, 169, 0, 255),
shadowColor: const Color.fromARGB(0, 169, 0, 255),
padding: const EdgeInsets.all(10),
), ),
child: Text( child: ElevatedButton(
partition, onPressed: () {
style: const TextStyle( setPartition(partition);
fontWeight: FontWeight.bold, getPartitionInfo(partition, setPartitionInfo);
},
style: TextButton.styleFrom(
primary: Colors.white,
backgroundColor: const Color.fromARGB(0, 169, 0, 255),
shadowColor: const Color.fromARGB(0, 169, 0, 255),
padding: const EdgeInsets.all(10),
),
child: Text(
partition,
style: const TextStyle(
fontWeight: FontWeight.bold,
),
), ),
), ),
), ),
), const SizedBox(height: 10),
const SizedBox(height: 10), ],
], );
); } else {
return SizedBox(height: 0);
}
} }
Widget partitioning(partitions, setState, setPartition, next, setPartitionInfo, Widget partitioning(partitions, setState, setPartition, next, setPartitionInfo,

@ -0,0 +1,286 @@
import 'package:flutter/material.dart';
import 'package:jade_gui/classes/keymap.dart';
import 'package:jade_gui/classes/desktop.dart';
import 'package:jade_gui/classes/location.dart';
import 'dart:io';
Widget infoTextTemplate(infoSection, infoText) {
return Text(
'$infoSection: $infoText',
style: const TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
color: Color.fromARGB(255, 169, 0, 255),
),
);
}
Future<void> getDiskType(setState, disk) async {
final String partitions =
await Process.run("/opt/jade_gui/scripts/getDiskType.sh", [disk])
.then((ProcessResult result) {
return result.stdout;
});
setState(partitions);
}
String diskType(String disk, String diskType) {
if (disk.contains("sd") && diskType.contains("0")) {
return 'SSD';
} else if (disk.contains("sd") && diskType.contains("1")) {
return 'HDD';
} else if (disk.contains("nvme") && diskType.contains("0")) {
return 'NVME SSD';
} else if (disk.contains("nvme") && diskType.contains("1")) {
return 'NVME HDD';
} else {
return 'Unknown, report at https://git.tar.black/crystal/jade-gui';
}
}
Widget summary(
String keymap,
String layout,
bool enableSudo,
bool enableRoot,
String username,
String disk,
String diskSize,
Desktop currDesktop,
Location locale,
nextPage,
setDiskType,
String rotational,
) {
getDiskType(setDiskType, disk);
return Column(
children: [
const Text(
'Installation Summary',
style: TextStyle(
fontSize: 50,
fontWeight: FontWeight.bold,
color: Color.fromARGB(255, 169, 0, 255)),
),
Expanded(
child: GridView.count(
crossAxisCount: 3,
padding: const EdgeInsets.all(20),
shrinkWrap: true,
crossAxisSpacing: 10,
mainAxisSpacing: 10,
//mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
//const SizedBox(height: 10),
Container(
padding: const EdgeInsets.all(10),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
border: Border.all(color: Colors.black),
color: const Color.fromARGB(255, 30, 30, 30),
boxShadow: const [
BoxShadow(
color: Colors.black,
blurRadius: 2,
offset: Offset(-2, 3),
),
],
),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
const Text(
"Location:",
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
color: Color.fromARGB(255, 169, 0, 255),
),
),
const SizedBox(height: 10),
infoTextTemplate("Region", locale.region),
const SizedBox(height: 10),
infoTextTemplate("Location", locale.location),
const SizedBox(height: 10),
infoTextTemplate("locale", locale.locale),
],
),
),
//const SizedBox(height: 10),
Container(
padding: const EdgeInsets.all(10),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
border: Border.all(color: Colors.black),
color: const Color.fromARGB(255, 30, 30, 30),
boxShadow: const [
BoxShadow(
color: Colors.black,
blurRadius: 2,
offset: Offset(-2, 3),
),
],
),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
const Text(
"Keyboard:",
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
color: Color.fromARGB(255, 169, 0, 255),
),
),
const SizedBox(height: 10),
infoTextTemplate("Keymap", keymap),
const SizedBox(height: 10),
infoTextTemplate("Layout", layout),
],
),
),
//const SizedBox(height: 0),
Container(
padding: const EdgeInsets.all(10),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
border: Border.all(color: Colors.black),
color: const Color.fromARGB(255, 30, 30, 30),
boxShadow: const [
BoxShadow(
color: Colors.black,
blurRadius: 2,
offset: Offset(-2, 3),
),
],
),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
const Text(
"User:",
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
color: Color.fromARGB(255, 169, 0, 255),
),
),
const SizedBox(height: 10),
infoTextTemplate("Username", username),
const SizedBox(height: 10),
infoTextTemplate("Enable sudo", enableSudo.toString()),
const SizedBox(height: 10),
infoTextTemplate("Enable root", enableRoot.toString()),
],
),
),
Container(
padding: const EdgeInsets.all(10),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
border: Border.all(color: Colors.black),
color: const Color.fromARGB(255, 30, 30, 30),
boxShadow: const [
BoxShadow(
color: Colors.black,
blurRadius: 2,
offset: Offset(-2, 3),
),
],
),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
const Text(
"Desktop:",
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
color: Color.fromARGB(255, 169, 0, 255),
),
),
const SizedBox(height: 10),
Text(
currDesktop.name,
style: const TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
color: Color.fromARGB(255, 169, 0, 255),
),
),
],
),
),
const SizedBox(height: 10),
Container(
padding: const EdgeInsets.all(10),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
border: Border.all(color: Colors.black),
color: const Color.fromARGB(255, 30, 30, 30),
boxShadow: const [
BoxShadow(
color: Colors.black,
blurRadius: 2,
offset: Offset(-2, 3),
),
],
),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
const Text(
"Disk:",
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
color: Color.fromARGB(255, 169, 0, 255),
),
),
const SizedBox(height: 10),
infoTextTemplate("Disk", disk),
const SizedBox(height: 10),
infoTextTemplate("Disk Size", diskSize),
const SizedBox(height: 10),
infoTextTemplate("Disk Type", diskType(disk, rotational)),
],
),
),
],
),
),
const SizedBox(width: 60),
Column(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Column(
children: [
TextButton(
onPressed: () {
nextPage();
},
child: const Text(
'Install',
),
style: TextButton.styleFrom(
primary: Colors.white,
backgroundColor: const Color.fromARGB(255, 169, 0, 255),
minimumSize: const Size(100, 50),
padding: const EdgeInsets.all(10),
),
),
const SizedBox(height: 10),
],
),
const SizedBox(width: 30),
],
),
const SizedBox(height: 7)
],
),
],
);
}

@ -84,6 +84,7 @@ Widget users(
labelText: 'Username', labelText: 'Username',
labelStyle: TextStyle(color: Colors.white), labelStyle: TextStyle(color: Colors.white),
hintText: 'Enter your username', hintText: 'Enter your username',
hintStyle: TextStyle(color: Colors.white),
iconColor: Colors.white, iconColor: Colors.white,
focusColor: Color.fromARGB(100, 169, 0, 255), focusColor: Color.fromARGB(100, 169, 0, 255),
hoverColor: Colors.blue, hoverColor: Colors.blue,
@ -93,8 +94,6 @@ Widget users(
style: const TextStyle(color: Colors.white), style: const TextStyle(color: Colors.white),
onChanged: (String? value) { onChanged: (String? value) {
setUsername(value); setUsername(value);
debugPrint(value);
debugPrint("Username: $username");
}, },
validator: (String? value) { validator: (String? value) {
return (value != "" && return (value != "" &&
@ -112,6 +111,7 @@ Widget users(
labelText: 'Password', labelText: 'Password',
labelStyle: TextStyle(color: Colors.white), labelStyle: TextStyle(color: Colors.white),
hintText: 'Enter your password', hintText: 'Enter your password',
hintStyle: TextStyle(color: Colors.white),
iconColor: Colors.white, iconColor: Colors.white,
focusColor: Color.fromARGB(100, 169, 0, 255), focusColor: Color.fromARGB(100, 169, 0, 255),
hoverColor: Colors.blue, hoverColor: Colors.blue,
@ -123,9 +123,6 @@ Widget users(
), ),
onChanged: (String? value) { onChanged: (String? value) {
setPass(value); setPass(value);
debugPrint(value);
debugPrint("Password: $password");
debugPrint("Confirm: $confirmPassword");
}, },
), ),
const SizedBox(height: 10), const SizedBox(height: 10),
@ -137,6 +134,7 @@ Widget users(
labelText: 'Repeat password', labelText: 'Repeat password',
labelStyle: TextStyle(color: Colors.white), labelStyle: TextStyle(color: Colors.white),
hintText: 'Repeat your password', hintText: 'Repeat your password',
hintStyle: TextStyle(color: Colors.white),
iconColor: Colors.white, iconColor: Colors.white,
focusColor: Color.fromARGB(100, 169, 0, 255), focusColor: Color.fromARGB(100, 169, 0, 255),
hoverColor: Colors.blue, hoverColor: Colors.blue,
@ -148,14 +146,8 @@ Widget users(
), ),
onChanged: (String? value) { onChanged: (String? value) {
setConfirmPass(value); setConfirmPass(value);
debugPrint(password);
debugPrint(confirmPassword);
debugPrint(value);
}, },
validator: (String? value) { validator: (String? value) {
debugPrint(value);
debugPrint("Password: $password");
debugPrint("Confirm: $confirmPassword");
return (value != password) return (value != password)
? 'Password does not match' ? 'Password does not match'
: null; : null;
@ -236,6 +228,7 @@ Widget users(
labelText: 'Password for root user', labelText: 'Password for root user',
labelStyle: TextStyle(color: Colors.white), labelStyle: TextStyle(color: Colors.white),
hintText: 'Password for the root user', hintText: 'Password for the root user',
hintStyle: TextStyle(color: Colors.white),
iconColor: Colors.white, iconColor: Colors.white,
focusColor: Color.fromARGB(100, 169, 0, 255), focusColor: Color.fromARGB(100, 169, 0, 255),
hoverColor: Colors.blue, hoverColor: Colors.blue,
@ -247,9 +240,6 @@ Widget users(
), ),
onChanged: (String? value) { onChanged: (String? value) {
setRootPass(value); setRootPass(value);
debugPrint(value);
debugPrint("Root Password: $rootPass");
debugPrint("Root Confirm: $confirmRootPass");
}, },
), ),
), ),
@ -265,6 +255,7 @@ Widget users(
labelText: 'Repeat root password', labelText: 'Repeat root password',
labelStyle: TextStyle(color: Colors.white), labelStyle: TextStyle(color: Colors.white),
hintText: 'Repeat root password', hintText: 'Repeat root password',
hintStyle: TextStyle(color: Colors.white),
iconColor: Colors.white, iconColor: Colors.white,
focusColor: Color.fromARGB(100, 169, 0, 255), focusColor: Color.fromARGB(100, 169, 0, 255),
hoverColor: Colors.blue, hoverColor: Colors.blue,
@ -276,14 +267,8 @@ Widget users(
), ),
onChanged: (String? value) { onChanged: (String? value) {
setConfirmRootPass(value); setConfirmRootPass(value);
debugPrint(password);
debugPrint(confirmPassword);
debugPrint(value);
}, },
validator: (String? value) { validator: (String? value) {
debugPrint(value);
debugPrint("Root Password: $rootPass");
debugPrint("Root Confirm: $confirmRootPass");
return (value != rootPass) return (value != rootPass)
? 'Password does not match' ? 'Password does not match'
: null; : null;

@ -2,137 +2,125 @@ import 'package:flutter/material.dart';
import 'dart:io'; import 'dart:io';
Widget welcome(next) { Widget welcome(next) {
return Container( return Column(
//decoration: const BoxDecoration( crossAxisAlignment: CrossAxisAlignment.center,
// image: DecorationImage( children: [
// fit: BoxFit.cover, const SizedBox(height: 50),
// image: AssetImage('assets/welcome-bg-alt.png'), const Text(
// ), 'Welcome to Crystal Linux',
//), style: TextStyle(
child: Column( fontSize: 30,
crossAxisAlignment: CrossAxisAlignment.center, fontWeight: FontWeight.bold,
children: [ color: Color.fromARGB(255, 169, 0, 255),
const SizedBox(height: 50),
const Text(
'Welcome to Crystal Linux',
style: TextStyle(
fontSize: 30,
fontWeight: FontWeight.bold,
color: Color.fromARGB(255, 169, 0, 255),
),
), ),
const SizedBox(height: 20), ),
Row( const SizedBox(height: 20),
mainAxisAlignment: MainAxisAlignment.center, Row(
crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ crossAxisAlignment: CrossAxisAlignment.center,
ElevatedButton( children: [
style: TextButton.styleFrom( ElevatedButton(
primary: const Color.fromARGB(0, 23, 23, 23), style: TextButton.styleFrom(
backgroundColor: const Color.fromARGB(0, 23, 23, 23), primary: const Color.fromARGB(0, 23, 23, 23),
elevation: 0, backgroundColor: const Color.fromARGB(0, 23, 23, 23),
padding: EdgeInsets.zero, elevation: 0,
padding: EdgeInsets.zero,
),
onPressed: () {
exit(0);
},
child: Container(
width: 500,
height: 500,
padding: const EdgeInsets.all(10),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
border: Border.all(color: Colors.black),
color: const Color.fromARGB(255, 30, 30, 30),
boxShadow: const [
BoxShadow(
color: Colors.black,
blurRadius: 2,
offset: Offset(-2, 3),
),
],
), ),
onPressed: () { child: Column(
exit(0); mainAxisAlignment: MainAxisAlignment.spaceAround,
}, children: const [
child: Container( SizedBox(height: 20),
width: 500, Text("Try Crystal Linux without installing",
height: 500, style: TextStyle(
padding: const EdgeInsets.all(10), fontSize: 20,
decoration: BoxDecoration( fontWeight: FontWeight.bold,
borderRadius: BorderRadius.circular(10), color: Colors.white)),
border: Border.all(color: Colors.black), SizedBox(height: 5),
color: const Color.fromARGB(255, 30, 30, 30), Image(
boxShadow: const [ image: AssetImage(
BoxShadow( 'assets/crystal-logo-minimal.png',
color: Colors.black,
blurRadius: 2,
offset: Offset(-2, 3),
), ),
], height: 400,
), fit: BoxFit.scaleDown,
child: Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: const [
SizedBox(height: 20),
Text("Try Crystal Linux without installing",
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
color: Colors.white)),
SizedBox(height: 5),
Image(
image: AssetImage(
'assets/crystal-logo-minimal.png',
),
height: 400,
fit: BoxFit.scaleDown,
),
],
), ),
), ],
), ),
), ),
const SizedBox(width: 20), ),
ElevatedButton( const SizedBox(width: 20),
style: TextButton.styleFrom( ElevatedButton(
primary: const Color.fromARGB(0, 23, 23, 23), style: TextButton.styleFrom(
backgroundColor: const Color.fromARGB(0, 23, 23, 23), primary: const Color.fromARGB(0, 23, 23, 23),
elevation: 0, backgroundColor: const Color.fromARGB(0, 23, 23, 23),
padding: EdgeInsets.zero, elevation: 0,
padding: EdgeInsets.zero,
),
onPressed: next,
child: Container(
width: 500,
height: 500,
padding: const EdgeInsets.all(10),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(10),
border: Border.all(color: Colors.black),
color: const Color.fromARGB(255, 30, 30, 30),
boxShadow: const [
BoxShadow(
color: Colors.black,
blurRadius: 2,
offset: Offset(-2, 3),
),
],
), ),
onPressed: next, child: Column(
child: Container( mainAxisAlignment: MainAxisAlignment.spaceAround,
width: 500, children: const [
height: 500, SizedBox(height: 20),
padding: const EdgeInsets.all(10), Text("Start the installation",
decoration: BoxDecoration( style: TextStyle(
borderRadius: BorderRadius.circular(10), fontSize: 20,
border: Border.all(color: Colors.black), fontWeight: FontWeight.bold,
color: const Color.fromARGB(255, 30, 30, 30), color: Colors.white)),
boxShadow: const [ SizedBox(height: 5),
BoxShadow( Image(
color: Colors.black, image: AssetImage(
blurRadius: 2, 'assets/jade_logo.png',
offset: Offset(-2, 3),
), ),
], height: 400,
), fit: BoxFit.scaleDown,
child: Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: const [
SizedBox(height: 20),
Text("Start the installation",
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
color: Colors.white)),
SizedBox(height: 5),
Image(
image: AssetImage(
'assets/jade_logo.png',
),
height: 400,
fit: BoxFit.scaleDown,
),
],
), ),
), ],
), ),
), ),
], ),
), ],
const SizedBox(height: 20), ),
const Text( const SizedBox(height: 20),
"Starting Crystal linux without installing will not change anything on your computer,", const Text(
style: TextStyle(fontSize: 20, color: Colors.white)), "Starting Crystal linux without installing will not change anything on your computer,",
const Text( style: TextStyle(fontSize: 20, color: Colors.white)),
"it's recommended to try that first to see if everything works", const Text(
style: TextStyle(fontSize: 20, color: Colors.white)) "it's recommended to try that first to see if everything works",
], style: TextStyle(fontSize: 20, color: Colors.white))
), ],
); );
} }

@ -5,10 +5,11 @@ import 'package:jade_gui/functions/locale.dart';
import 'package:jade_gui/functions/keyboard.dart'; import 'package:jade_gui/functions/keyboard.dart';
import 'package:jade_gui/functions/users.dart'; import 'package:jade_gui/functions/users.dart';
import 'package:jade_gui/functions/desktop.dart'; import 'package:jade_gui/functions/desktop.dart';
import 'package:jade_gui/functions/partition.dart';
import 'package:jade_gui/functions/summary.dart';
import 'package:jade_gui/classes/keymap.dart'; import 'package:jade_gui/classes/keymap.dart';
import 'package:jade_gui/classes/desktop.dart'; import 'package:jade_gui/classes/desktop.dart';
import 'package:jade_gui/desktops/desktops.dart'; import 'package:jade_gui/desktops/desktops.dart';
import 'package:jade_gui/functions/partition.dart';
void main() => runApp( void main() => runApp(
const MaterialApp( const MaterialApp(
@ -36,15 +37,11 @@ class _JadeguiState extends State<Jadegui> {
String username = ""; String username = "";
String rootPass = ""; String rootPass = "";
String confirmRootPass = ""; String confirmRootPass = "";
String partitions = ""; String disks = "";
String selectedPartition = ""; String selectedDisk = "";
String partitionInfo = ""; String partitionInfo = "";
String _diskType = "";
Desktop currDesktop = desktops[0]; Desktop currDesktop = desktops[0];
void nextslide() {
setState(() {
_selectedIndex = _selectedIndex + 1;
});
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
@ -142,22 +139,6 @@ class _JadeguiState extends State<Jadegui> {
fontWeight: FontWeight.bold), fontWeight: FontWeight.bold),
), ),
), ),
NavigationRailDestination(
icon: Icon(
Icons.miscellaneous_services_outlined,
color: Color.fromARGB(255, 169, 0, 255),
),
selectedIcon: Icon(
Icons.miscellaneous_services,
color: Color.fromARGB(255, 169, 0, 255),
),
label: Text(
'Misc',
style: TextStyle(
color: Color.fromARGB(100, 255, 255, 255),
fontWeight: FontWeight.bold),
),
),
NavigationRailDestination( NavigationRailDestination(
icon: Icon( icon: Icon(
Icons.pie_chart_outline, Icons.pie_chart_outline,
@ -212,7 +193,7 @@ class _JadeguiState extends State<Jadegui> {
// This is the main content. // This is the main content.
Expanded( Expanded(
child: condition(), child: condition(),
) ),
], ],
), ),
); );
@ -220,7 +201,6 @@ class _JadeguiState extends State<Jadegui> {
bool loadnextpage(region) { bool loadnextpage(region) {
bool next = false; bool next = false;
print("here");
if (region != "") { if (region != "") {
setState(() { setState(() {
next = true; next = true;
@ -266,9 +246,6 @@ class _JadeguiState extends State<Jadegui> {
}, nextpage); }, nextpage);
break; break;
case 2: case 2:
print(
"${getSelectedLocPack().region}/${getSelectedLocPack().location}");
print(getSelectedLocPack().locale);
widget = keyboard( widget = keyboard(
() { () {
setState(() { setState(() {
@ -290,7 +267,6 @@ class _JadeguiState extends State<Jadegui> {
); );
break; break;
case 3: case 3:
print("${getChosenLayout()} - ${getChosenVariant()}");
widget = users( widget = users(
(value) { (value) {
setState(() { setState(() {
@ -300,7 +276,6 @@ class _JadeguiState extends State<Jadegui> {
enableSudo, enableSudo,
(String? value) { (String? value) {
setState(() { setState(() {
debugPrint(value);
if (value != null) { if (value != null) {
password = value; password = value;
} }
@ -327,7 +302,6 @@ class _JadeguiState extends State<Jadegui> {
enableRoot, enableRoot,
(String? value) { (String? value) {
setState(() { setState(() {
debugPrint(value);
if (value != null) { if (value != null) {
rootPass = value; rootPass = value;
} }
@ -348,10 +322,6 @@ class _JadeguiState extends State<Jadegui> {
); );
break; break;
case 4: case 4:
print("Username: $username");
print("Password: $password");
print("Confirm Password: $confirmPassword");
print("Enable Root: $enableSudo");
widget = desktopView( widget = desktopView(
currDesktop, currDesktop,
(selectedDesktop) { (selectedDesktop) {
@ -367,23 +337,13 @@ class _JadeguiState extends State<Jadegui> {
); );
break; break;
case 5: case 5:
widget = const Text( widget = partitioning(disks, (value) {
'Showing Misc screen',
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.bold,
color: Color.fromARGB(255, 169, 0, 255),
),
);
break;
case 6:
widget = partitioning(partitions, (value) {
setState(() { setState(() {
partitions = value; disks = value;
}); });
}, (value) { }, (value) {
setState(() { setState(() {
selectedPartition = value; selectedDisk = value;
}); });
}, () { }, () {
setState(() { setState(() {
@ -393,19 +353,33 @@ class _JadeguiState extends State<Jadegui> {
setState(() { setState(() {
partitionInfo = value; partitionInfo = value;
}); });
}, selectedPartition, partitionInfo); }, selectedDisk, partitionInfo);
break; break;
case 7: case 6:
widget = const Text( widget = summary(
'Showing Summary screen', getChosenLayout(),
style: TextStyle( getChosenVariant(),
fontSize: 18, enableSudo,
fontWeight: FontWeight.bold, enableRoot,
color: Color.fromARGB(255, 169, 0, 255), username,
), selectedDisk,
partitionInfo,
currDesktop,
getSelectedLocPack(),
() {
setState(() {
_selectedIndex = _selectedIndex + 1;
});
},
(value) {
setState(() {
_diskType = value;
});
},
_diskType,
); );
break; break;
case 8: case 7:
widget = const Text( widget = const Text(
'Showing Installing screen', 'Showing Installing screen',
style: TextStyle( style: TextStyle(

@ -0,0 +1,2 @@
#!/usr/bin/bash
lsblk -d -o rota $1 | grep -v ROTA
Loading…
Cancel
Save