add desktop images

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

10
.gitignore vendored

@ -25,6 +25,16 @@ gui/
# is commented out by default.
#.vscode/
# macos
.DS_Store
.fseventsd/
.Spotlight-V100/
.Trashes/
ehthumbs.db
Icon
macos/
ios/
# Flutter/Dart/Pub related
**/doc/api/
**/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"

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

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

@ -85,29 +85,52 @@ Widget desktopView(currDesktop, setDesktop, next) {
),
const SizedBox(width: 100),
Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Column(
children: [
const Text(
'Currently chosen Desktop: ',
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
color: Color.fromARGB(255, 169, 0, 255),
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),
),
),
Text(
currDesktop.name,
style: const TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
color: Color.fromARGB(255, 169, 0, 255),
],
),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Column(
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 {
if (!runningDisk) {
final String disks =
await Process.run("/opt/jade_gui/scripts/getDisks.sh", [])
.then((ProcessResult result) {
final String disks = await Process.run(
"/opt/jade_gui/scripts/getDisks.sh", [],
runInShell: true)
.then((ProcessResult result) {
return result.stdout;
});
setState(disks);
@ -175,8 +176,7 @@ Widget autoPartitioning(
),
),
const SizedBox(height: 5),
const Image(
image: AssetImage('assets/jade_logo.png')),
const Image(image: AssetImage('assets/disk.png')),
const SizedBox(height: 10),
Container(
padding: const EdgeInsets.all(2),

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

@ -70,6 +70,7 @@ flutter:
# - images/a_dot_burr.jpeg
# - images/a_dot_ham.jpeg
- assets/
- assets/desktops/
# An image asset can refer to one or more resolution-specific "variants", see
# 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