add desktop images

pull/2/head
axtlos 3 years ago
parent df1a609681
commit af96eb7783

10
.gitignore vendored

@ -25,6 +25,16 @@ gui/
# is commented out by default. # is commented out by default.
#.vscode/ #.vscode/
# macos
.DS_Store
.fseventsd/
.Spotlight-V100/
.Trashes/
ehthumbs.db
Icon
macos/
ios/
# Flutter/Dart/Pub related # Flutter/Dart/Pub related
**/doc/api/ **/doc/api/
**/ios/Flutter/.last_build_id **/ios/Flutter/.last_build_id

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

@ -1 +1,2 @@
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
#include "Generated.xcconfig" #include "Generated.xcconfig"

@ -1 +1,2 @@
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "Generated.xcconfig" #include "Generated.xcconfig"

@ -10,7 +10,7 @@ List<Desktop> desktops = const [
"budgie-desktop", "budgie-desktop",
"gnome", "gnome",
], ],
imageurl: 'assets/jade_logo.png', imageurl: 'assets/crystal-logo-minimal.png',
), ),
Desktop( Desktop(
name: "Gnome", name: "Gnome",
@ -21,7 +21,7 @@ List<Desktop> desktops = const [
"gnome-extra", "gnome-extra",
"chrome-gnome-shell", "chrome-gnome-shell",
], ],
//imageurl: '', imageurl: 'assets/desktops/gnome.png',
), ),
Desktop( Desktop(
name: "Kde", name: "Kde",
@ -32,6 +32,7 @@ List<Desktop> desktops = const [
"kde-applications", "kde-applications",
"sddm", "sddm",
], ],
imageurl: 'assets/desktops/kde.png',
), ),
Desktop( Desktop(
name: "Budgie", name: "Budgie",
@ -41,7 +42,7 @@ List<Desktop> desktops = const [
"xorg", "xorg",
"gnome", "gnome",
], ],
//imageurl: "", imageurl: "assets/desktops/budgie.png",
), ),
Desktop( Desktop(
name: "Mate", name: "Mate",
@ -55,7 +56,7 @@ List<Desktop> desktops = const [
"mate-extra", "mate-extra",
"mate-desktop", "mate-desktop",
], ],
//imageurl: "", imageurl: "assets/desktops/mate.png",
), ),
Desktop( Desktop(
name: "Enlightenment", name: "Enlightenment",
@ -64,7 +65,7 @@ List<Desktop> desktops = const [
"enlightenment", "enlightenment",
"terminology", "terminology",
], ],
//imageurl: "", imageurl: "assets/desktops/enlightenment.png",
), ),
Desktop( Desktop(
name: "Xfce", name: "Xfce",
@ -73,12 +74,11 @@ List<Desktop> desktops = const [
"xfce4", "xfce4",
"xfce4-goodies", "xfce4-goodies",
], ],
//imageurl: "", imageurl: "assets/desktops/xfce.png",
), ),
Desktop( Desktop(
name: "None/DIY", name: "None/DIY",
displayManager: "", displayManager: "",
packages: [], packages: [],
//imageurl: "",
), ),
]; ];

@ -85,29 +85,52 @@ Widget desktopView(currDesktop, setDesktop, next) {
), ),
const SizedBox(width: 100), const SizedBox(width: 100),
Column( Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
Column( Container(
children: [ padding: const EdgeInsets.all(10),
const Text( decoration: BoxDecoration(
'Currently chosen Desktop: ', borderRadius: BorderRadius.circular(10),
style: TextStyle( border: Border.all(color: Colors.black),
fontSize: 20, color: const Color.fromARGB(255, 30, 30, 30),
fontWeight: FontWeight.bold, boxShadow: const [
color: Color.fromARGB(255, 169, 0, 255), BoxShadow(
color: Colors.black,
blurRadius: 2,
offset: Offset(-2, 3),
), ),
), ],
Text( ),
currDesktop.name, child: Column(
style: const TextStyle( mainAxisAlignment: MainAxisAlignment.spaceEvenly,
fontSize: 20, children: [
fontWeight: FontWeight.bold, Column(
color: Color.fromARGB(255, 169, 0, 255), children: [
const SizedBox(height: 10),
const Text(
'Currently chosen 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: 20),
Image(image: AssetImage(currDesktop.imageurl)),
const SizedBox(height: 10),
],
), ),
), ],
const SizedBox(height: 20), ),
Image(image: AssetImage(currDesktop.imageurl)),
],
), ),
], ],
), ),

@ -17,9 +17,10 @@ Future<void> getDiskInfo(
Future<void> getDisk(setState, runningDisk, setRunningDisk) async { Future<void> getDisk(setState, runningDisk, setRunningDisk) async {
if (!runningDisk) { if (!runningDisk) {
final String disks = final String disks = await Process.run(
await Process.run("/opt/jade_gui/scripts/getDisks.sh", []) "/opt/jade_gui/scripts/getDisks.sh", [],
.then((ProcessResult result) { runInShell: true)
.then((ProcessResult result) {
return result.stdout; return result.stdout;
}); });
setState(disks); setState(disks);
@ -175,8 +176,7 @@ Widget autoPartitioning(
), ),
), ),
const SizedBox(height: 5), const SizedBox(height: 5),
const Image( const Image(image: AssetImage('assets/disk.png')),
image: AssetImage('assets/jade_logo.png')),
const SizedBox(height: 10), const SizedBox(height: 10),
Container( Container(
padding: const EdgeInsets.all(2), padding: const EdgeInsets.all(2),

@ -24,9 +24,10 @@ Future<void> checkIsEfi(
setRunningEfi, setRunningEfi,
) async { ) async {
if (!runningEfi) { if (!runningEfi) {
final String scriptOutput = final String scriptOutput = await Process.run(
await Process.run("/opt/jade_gui/scripts/checkEfi.sh", []) "/opt/jade_gui/scripts/checkEfi.sh", [],
.then((ProcessResult result) { runInShell: true)
.then((ProcessResult result) {
return result.stdout; return result.stdout;
}); });
bool isEfi = scriptOutput == "UEFI\n" ? true : false; bool isEfi = scriptOutput == "UEFI\n" ? true : false;
@ -40,9 +41,10 @@ Future<void> checkIsEfi(
Future<void> getPartition(setState, runningPart, setRunningPart) async { Future<void> getPartition(setState, runningPart, setRunningPart) async {
if (!runningPart) { if (!runningPart) {
final String partitions = final String partitions = await Process.run(
await Process.run("/opt/jade_gui/scripts/getPartitions.sh", []) "/opt/jade_gui/scripts/getPartitions.sh", [],
.then((ProcessResult result) { runInShell: true)
.then((ProcessResult result) {
return result.stdout; return result.stdout;
}); });
var parts = <Partition>[]; var parts = <Partition>[];
@ -59,9 +61,11 @@ Future<void> getPartition(setState, runningPart, setRunningPart) async {
Future<void> checkConnected( Future<void> checkConnected(
setState, setState,
) async { ) async {
final String scriptOutput = final String scriptOutput = await Process.run(
await Process.run("/opt/jade_gui/scripts/checkNetwork.sh", []) "/opt/jade_gui/scripts/checkNetwork.sh",
.then((ProcessResult result) { [],
runInShell: true,
).then((ProcessResult result) {
return result.stdout; return result.stdout;
}); });
bool connected = scriptOutput.contains("disconnected") ? false : true; bool connected = scriptOutput.contains("disconnected") ? false : true;

@ -70,6 +70,7 @@ flutter:
# - images/a_dot_burr.jpeg # - images/a_dot_burr.jpeg
# - images/a_dot_ham.jpeg # - images/a_dot_ham.jpeg
- assets/ - assets/
- assets/desktops/
# An image asset can refer to one or more resolution-specific "variants", see # An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/assets-and-images/#resolution-aware. # https://flutter.dev/assets-and-images/#resolution-aware.

@ -0,0 +1,30 @@
// This is a basic Flutter widget test.
//
// To perform an interaction with a widget in your test, use the WidgetTester
// utility that Flutter provides. For example, you can send tap and scroll
// gestures. You can also use WidgetTester to find child widgets in the widget
// tree, read text, and verify that the values of widget properties are correct.
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:jade_gui/main.dart';
void main() {
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
// Build our app and trigger a frame.
await tester.pumpWidget(const Jadegui());
// Verify that our counter starts at 0.
expect(find.text('0'), findsOneWidget);
expect(find.text('1'), findsNothing);
// Tap the '+' icon and trigger a frame.
await tester.tap(find.byIcon(Icons.add));
await tester.pump();
// Verify that our counter has incremented.
expect(find.text('0'), findsNothing);
expect(find.text('1'), findsOneWidget);
});
}
Loading…
Cancel
Save