Merge branch 'main' into macos_desktop

This commit is contained in:
Yannick Mauray 2024-06-30 19:16:19 +02:00
commit c2ef833dc3
36 changed files with 496 additions and 131 deletions

35
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@ -0,0 +1,35 @@
---
name: Bug report
about: Create a report to help us improve
title: 'bug: description of the bug you encountered'
labels: ''
assignees: ''
---
**I confirm this bug has not already been reported**
- [ ] I have searched the issues and this bug has not been reported previously
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Desktop (please complete the following information):**
- Quickgui Versdion: [e.g 1.2.9]
- OS: [e.g. Ubuntu]
- Version [e.g. 24.04]
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Additional context**
Add any other context about the problem here.

View File

@ -0,0 +1,23 @@
---
name: Feature request
about: Suggest an idea for this project
title: 'feat: describe the feature you are requesting'
labels: ''
assignees: ''
---
**I confirm this feature has not been previously requested**
- [ ] I have searched the issues and this feature has not previously been requested
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

BIN
.github/apple.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@ -3,5 +3,8 @@ updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every week
interval: "weekly"
interval: "weekly"
- package-ecosystem: "pub"
directory: "/"
schedule:
interval: "daily"

BIN
.github/logo.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 18 KiB

24
.github/pull_request_template.md vendored Normal file
View File

@ -0,0 +1,24 @@
# Description
Please include a summary of the changes and any relevant motivation and context.
<!-- Close any related issues. Delete if not relevant -->
- Closes #
- Fixes #
- Resolves #
## Type of change
<!-- Please delete options that are not relevant. -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Documentation (updates documentation)
# Checklist:
- [ ] I have performed a self-review of my code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation

BIN
.github/tux.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

View File

@ -4,9 +4,19 @@ on:
pull_request:
branches:
- main
paths:
- pubspec.yaml
- assets/**
- lib/**
- linux/**
push:
branches:
- main
paths:
- pubspec.yaml
- assets/**
- lib/**
- linux/**
workflow_dispatch:
# TODO: arm64 runner

21
.github/workflows/flake-checker.yml vendored Normal file
View File

@ -0,0 +1,21 @@
name: Flake ❄️ Checker ✅
on:
push:
branches:
- main
schedule:
- cron: '42 0 * * 6'
workflow_dispatch:
jobs:
flake-checker:
name: Flake Checker
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: DeterminateSystems/nix-installer-action@v12
- uses: DeterminateSystems/magic-nix-cache-action@v7
- uses: DeterminateSystems/flake-checker-action@v8

20
.github/workflows/flake-updater.yml vendored Normal file
View File

@ -0,0 +1,20 @@
name: Flake ❄️ Lock 🔒️ Updater ✨
on:
schedule:
- cron: '37 13 14,28 * *'
workflow_dispatch:
jobs:
lock-updater:
name: Flake Lock Updater
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: DeterminateSystems/nix-installer-action@v12
- uses: DeterminateSystems/magic-nix-cache-action@v7
- uses: DeterminateSystems/update-flake-lock@v23
with:
pr-title: "chore: update flake.lock"

27
.github/workflows/lint-pr.yml vendored Normal file
View File

@ -0,0 +1,27 @@
name: "Lint Pull Request 🐙"
on:
pull_request_target:
types:
- opened
- edited
- synchronize
permissions:
pull-requests: read
jobs:
main:
name: Validate pull request title
runs-on: ubuntu-22.04
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
# If the PR only contains a single commit, the action will validate that
# it matches the configured pattern.
validateSingleCommit: true
# Related to `validateSingleCommit` you can opt-in to validate that the PR
# title matches a single commit to avoid confusion.
validateSingleCommitMatchesPrTitle: true

View File

@ -40,9 +40,9 @@ jobs:
exit 1
fi
build-linux-x64:
publish-linux-x64:
needs: [version-check]
name: "Build Linux x64 🏗️"
name: "Publish Linux (x64) 🐙"
runs-on: ubuntu-22.04
steps:
- name: "Checkout 🥡"
@ -78,26 +78,19 @@ jobs:
run: flutter_distributor package --platform=linux --targets=zip
- name: Show artifacts 👀
run: tree dist/
publish-release:
needs: [build-linux-x64]
name: "Publish Release 📤️"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Publish release ${{ github.ref }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
REL_VER=$(grep "^version" pubspec.yaml | cut -d' ' -f2)
gh release create "${{ github.ref }}" --draft --generate-notes
for PKG in AppImage deb rpm zip; do
gh release upload "${{ github.ref }}" "dist/${REL_VER}/quickgui-${REL_VER}-linux.${PKG}" --clobber
done
if [ "$(gh release view "${{ github.ref }}" --json assets --template '{{len .assets}}')" -lt 0 ]; then
exit 1
fi
gh release edit "${{ github.ref }}" --draft=false
- name: "Publish Release 📤️"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
REL_VER=$(grep "^version" pubspec.yaml | cut -d' ' -f2)
gh release create "${{ github.ref }}" --draft --generate-notes
for PKG in AppImage deb rpm zip; do
gh release upload "${{ github.ref }}" "dist/${REL_VER}/quickgui-${REL_VER}-linux.${PKG}" --clobber
done
if [ "$(gh release view "${{ github.ref }}" --json assets --template '{{len .assets}}')" -lt 0 ]; then
exit 1
fi
gh release edit "${{ github.ref }}" --draft=false
publish-flakehub:
needs: [version-check]
@ -111,7 +104,7 @@ jobs:
with:
ref: "${{ (inputs.tag != null) && format('refs/tags/{0}', inputs.tag) || '' }}"
- uses: "DeterminateSystems/nix-installer-action@v12"
- uses: "DeterminateSystems/magic-nix-cache-actionv7"
- uses: "DeterminateSystems/magic-nix-cache-action@v7"
- uses: "DeterminateSystems/flakehub-push@v4"
with:
visibility: "public"
@ -120,6 +113,7 @@ jobs:
publish-ppa-x64:
needs: [version-check]
name: "Publish PPA (x64) 🟠"
runs-on: ubuntu-22.04
steps:
- name: "Checkout 🥡"

128
CODE_OF_CONDUCT.md Normal file
View File

@ -0,0 +1,128 @@
# Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to a positive environment for our
community include:
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community
Examples of unacceptable behavior include:
* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
#quickemu channel on Discord.
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series
of actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within
the community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.

9
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,9 @@
# Contributing
We welcome contributions to Quickgui.
- Help other Quickgui users by answering questions in the [Quickgui Discussions](https://github.com/quickemu-project/quickgui/discussions) 🛟
- Improve the documentation in [this README](https://github.com/quickemu-project/quickgui/edit/master/README.md) and the [Quickgui Wiki](https://github.com/quickemu-project/quickgui/wiki) 📖
- File bug reports and feature requests in the [Quickgui Issues](https://github.com/quickemu-project/quickgui/issues) 📁
- Submit [Quickgui Pull requests](https://github.com/quickemu-project/quickgui/pulls) to fix bugs 🐞 or add new features ✨
- Commit messages must [conform to the Conventional Commits specification](https://www.conventionalcommits.org/).

201
README.md
View File

@ -1,119 +1,156 @@
<h1 align="center">
<img src=".github/logo.png" alt="Quickgui" width="256" />
<br />
Quickgui
</h1>
<div align="center">
<img src=".github/logo.png" alt="Quickgui" width="256" />
<p align="center">An elegant virtual machine manager for the desktop</p>
<div align="center"><img src="assets/github/screenshot1.png" alt="Quickgui screenshot"></div>
# Quickgui
This project is discussed mainly on [![Discord](https://img.shields.io/discord/712850672223125565?color=87a556&label=WimpysWorld%20Discord&logo=discord&logoColor=ffffff&style=flat-square)](https://discord.gg/sNmz3uw) server
**An elegant virtual machine manager for the desktop**
## Install
**Made with 💝 for <img src=".github/tux.png" align="top" width="24" alt="Tux (Linux)"/>**
<!--& <img src=".github/apple.png" align="top" width="24" alt="Apple (macOS)"/>-->
</div>
### quickemu
For this tool to work, you need to have `quickget`, from the `quickemu`
package, in your current `path`.
Go to the `quickemu` [github page](https://github.com/quickemu-project/quickemu)
for more information about installing the tool.
<p align="center">
&nbsp;<a href="https://wimpysworld.io/discord" target="_blank"><img alt="Discord" src="https://img.shields.io/discord/712850672223125565?style=for-the-badge&logo=discord&logoColor=%23ffffff&label=Discord&labelColor=%234253e8&color=%23e4e2e2"></a>
</p>
### Standard package
# Introduction
On Ubuntu, `quickgui` can be installed as a standard package.
Quickgui is a graphical user interface for the [Quickemu](https://github.com/quickemu-project/quickemu) virtual machine manager.
Quickgui enables you to create and manage virtual machines from a simple and elegant interface.
Nearly 1000 operating systems supported including Windows, macOS, BSDs, and 100s of Linux distros. All with automated downloads and configuration.
First, add this ppa (this only needs to be done once):
# Install
```
sudo add-apt-repository ppa:yannick-mauray/quickgui
sudo apt update
Quickgui depends on Quickemu. Most package managers will automatically install Quickemu when you install Quickgui.
If you don't have Quickemu installed then go and follow the Quickemu installation steps for your operating system:
- [**Quickemu Installation**](https://github.com/quickemu-project/quickemu/wiki/01-Installation)
## Debian
A .deb package is available for Debian on our [release page](https://github.com/quickemu-project/quickgui/releases).
- Download the latest .deb package
- Install it with `apt-get install ./quickgui-1.2.9+1-linux.deb`
## Fedora
A .rpm package is available for Fedora on our [release page](https://github.com/quickemu-project/quickgui/releases).
## NixOS
### Flake
[![FlakeHub](https://img.shields.io/endpoint?url=https://flakehub.com/f/quickemu-project/quickgui/badge)](https://flakehub.com/flake/quickemu-project/quickgui)
Stable releases of Quickgui are published to FlakeHub for NixOS users. See the Quickemu flake on FlakeHub for more details:
- <https://flakehub.com/flake/quickemu-project/quickgui>
### Nixpkgs
Add Quickgui to your `systemPackages`. For example:
```nix
systemPackages = with pkgs; [
quickgui
];
```
Then, install the package:
```
sudo apt install quickgui
## Ubuntu
Ubuntu users can install Quickgui using the [.deb package described above for Debian](#debian) or from our PPA.
```shell
sudo add-apt-repository ppa:flexiondotorg/quickgui
sudo apt-get update
sudo apt-get install quickgui
```
## Other Linux
We provide an AppImage and a pre-compiled binary of Quickemu in a .zip file.
### AppImage
The AppImage should work on most Linux distributions.
* [Download](https://github.com/quickemu-project/quickgui/releases) the latest AppImage.
* `chmod +x quickgui-1.2.9+1-linux.AppImage`
* `./quickgui-1.2.9+1-linux.AppImage`
### Pre-compiled binary
* [Download](https://github.com/quickemu-project/quickgui/releases) the binary.
* Uncompress the tarball wherever you want.
* From anywhere on the filesystem, run the app.
* [Download](https://github.com/quickemu-project/quickgui/releases) the latest .zip file.
* `unzip quickgui-1.2.9+1-linux.zip`
* `cd quickgui-1.2.9+1-linux`
* `chmod +x quickgui`
* `./quickgui`
```bash
xz quickgui-a.b.c-d.tar.xz
tar xvf quickgui-a.b.c-d.tar
/path/to/quickgui
```
# Compile
Alternatively, use `update-alternatives` to install `quickgui` system-wide:
To compile the Quickgui yourself:
```bash
sudo update-alternatives --install /usr/local/bin/quickgui quickgui /path/to/quickgui 50
```
* [Install Flutter](https://docs.flutter.dev/get-started/install/linux/desktop)
* `git clone https://github.com/quickemu-project/quickgui.git`
* `cd quickgui`
* `flutter pub get`
* `flutter config --enable-linux-desktop`
* `flutter build linux --release`
## Build
The compiled binary will be in `build/linux/x64/release/bundle/quickgui`.
You can run it with:
If you don't want to run the binary, you can rebuild the application yourself:
* [Set up Flutter](https://ubuntu.com/blog/getting-started-with-flutter-on-ubuntu)
* Clone this repo,
* Switch to the project's directory,
* Build the project,
* Run the app.
```bash
git clone https://github.com/quickgui/quickgui.git
cd quickgui
flutter build linux --release
```shell
./build/linux/x64/release/bundle/quickgui
```
You can also use `update-alternatives` for easier access to the app.
# Usage
## Usage
<div align="center">
<small><b>Main Screen</b></small><br /><br />
<img src="assets/github/screenshot_01_main.png" width="346" height="290" alt="Quickgui Main screen">
</div>
### Downloading VMs
## Downloader
From the main screen, select the operating system you want to use. The list can be filtered.
- From the main screen, click "Create new machines"
- Select the Operating System you want to install
- Select the Version of the operating system you want to use.
- Click the "Download" button.
- The ISO will be downloaded
- When the download is complete, click the "Dismiss" button.
<div align="center">
<small><b>Downloader</b></small><br />
<img src="assets/github/screenshot_02_downloader.png" width="346" height="290" alt="Quickgui Downloader">
</div>
<div align="center"><img src="assets/github/screenshot1.png" alt="Main screen"></div>
## Manager
<div align="center"><img src="assets/github/screenshot2.png" alt="List of supported operating systems"></div>
- From the main screen, click "Manage existing machines"
- The Manager screen will list available Quickemu VMs in the directory you have chosen to store them.
- Start a VM by clicking the "Play" (▶) button.
- Kill a running VM by clicking the "Stop" (■) button.
- Clicking the "Trash" (🗑) button will prompt you to delete the whole VM or just its disk image.
<div align="center"><img src="assets/github/screenshot3.png" alt="Search a distribution"></div>
<div align="center">
<small><b>Manager</b></small><br />
<img src="assets/github/screenshot_03_manager.png" width="346" height="290" alt="Quickgui Manager">
</div>
Then, select the version:
When a VM is running, Quickgui will display the host ports that are mapped to the SPICE and SSH ports on the guest. These ports are used to connect to the guest for display and SSH access.
<div align="center"><img src="assets/github/screenshot4.png" alt="Main screen after selection of the operating system"></div>
### SPICE
<div align="center"><img src="assets/github/screenshot5.png" alt="Versions of the selected operating system"></div>
If you close the SPICE display and wish to reconnect, you can click the "Connect display with SPICE" button. To open an SSH session, you can click the "Connect with SSH" button.
If there are some options (Windows language, Pop!_OS nvidia or Intel, etc..), they will be displayed:
If the "Connect display with SPICE" button is disabled, the `spicy` client cannot be found. Ensure it is installed, and in your PATH (it should have been installed with `quickemu`).
<div align="center"><img src="assets/github/screenshot8.png" alt="Choose an option"></div>
### SSH
<div align="center"><img src="assets/github/screenshot9.png" alt="Option is displayed"></div>
If the "Connect with SSH" button is disabled, an SSH server cannot be detected on the guest. Most guest operating systems will not install an SSH server by default, so if it was not an option during installation, you will need to install one yourself. It must be listening on port 22 (the default SSH port). Once a server is installed and running, it should be detected automatically.
Then click "Download". The ISO will be downloaded in the current working directory, in 99% of cases that will be the directory where `quickgui` was invoked from.
<div align="center"><img src="assets/github/screenshot10.png" alt="Waiting for download"></div>
<div align="center"><img src="assets/github/screenshot11.png" alt="Downloading"></div>
<div align="center"><img src="assets/github/screenshot12.png" alt="Download finished"></div>
### Managing VMs
The "Manage running VMs" screen will list available Quickemu VMs in the current working directory.
VMs can be launched by clicking the "Play" (▶) button. Running VMs will have the "Play" and "Stop" buttons highlighted in green and red respectively, and pressing "Stop" (■) will kill the running VM.
When a VM is running, the host's ports mapped to SPICE and SSH on the guest will be displayed. If you close the SPICE display and wish to reconnect, you can click the "Connect display with SPICE" button. To open an SSH session, you can click the "Connect with SSH" button.
If the "Connect display with SPICE" button is disabled, the `spicy` client could not be found. Ensure it is installed, and in your PATH (it should have been installed with `quickemu`).
If the "Connect with SSH" button is disabled, an SSH server could not be detected on the guest. Most guest operating systems will not install an SSH server by default, so if it was not an option during install, you will need to install one yourself. It must be listening on port 22 (the default SSH port). Once a server is installed and running, it should be detected automatically.
"Connect with SSH" will use the terminal emulator symlinked to `x-terminal-emulator`. Several common terminal emulators are supported. If yours is not, please raise an issue on this repository.
"Connect with SSH" will open a terminal and attempt to connect to the guest. If the connection is successful, you will be prompted for the password. If the connection is unsuccessful, you might need to remove the host key for the guest from your `~/.ssh/known_hosts` file using something like `ssh-keygen -R [localhost]:22220`.

18
SECURITY.md Normal file
View File

@ -0,0 +1,18 @@
# Security Policy
## Supported Versions
Here are the versions of Quickgui currently being supported with security updates.
| Version | Supported |
| ------- | ------------------ |
| 1.2.x | :white_check_mark: |
| < 1.1 | :x: |
## Reporting a Vulnerability
If you discover a vulnerability in Quickgui then [file an issue](https://github.com/quickemu-project/quickgui/issues/new) and click *Report a vulnerability*.
- Quickgui is a spare-time hobby project.
- We do not have SLAs for responding to security issues.
- It is a best-efforts basis.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

View File

@ -16,12 +16,12 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1719254875,
"narHash": "sha256-ECni+IkwXjusHsm9Sexdtq8weAq/yUyt1TWIemXt3Ko=",
"rev": "2893f56de08021cffd9b6b6dfc70fd9ccd51eb60",
"revCount": 643242,
"lastModified": 1719506693,
"narHash": "sha256-C8e9S7RzshSdHB7L+v9I51af1gDM5unhJ2xO1ywxNH8=",
"rev": "b2852eb9365c6de48ffb0dc2c9562591f652242a",
"revCount": 644565,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.643242%2Brev-2893f56de08021cffd9b6b6dfc70fd9ccd51eb60/0190530b-f61b-7788-9601-b336b1caf671/source.tar.gz"
"url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.644565%2Brev-b2852eb9365c6de48ffb0dc2c9562591f652242a/01906511-d0fc-7244-b596-2d790f5bfdb0/source.tar.gz"
},
"original": {
"type": "tarball",

View File

@ -4,10 +4,10 @@ import 'package:flutter/material.dart';
import 'package:quickgui/src/supported_locales.dart';
class AppSettings extends ChangeNotifier {
ThemeMode? _themeMode;
ThemeMode _themeMode = ThemeMode.light;
String? _activeLocale;
ThemeMode get themeMode => _themeMode ?? ThemeMode.system;
ThemeMode get themeMode => _themeMode;
String get activeLocale => _activeLocale ?? Platform.localeName;
@ -38,8 +38,7 @@ class AppSettings extends ChangeNotifier {
}
set useDarkModeSilently(bool useDarkMode) {
//_themeMode = useDarkMode ? ThemeMode.dark : ThemeMode.light;
_themeMode = ThemeMode.light;
_themeMode = useDarkMode ? ThemeMode.dark : ThemeMode.light;
}
set useDarkMode(bool useDarkMode) {

View File

@ -16,11 +16,15 @@ class LeftMenu extends StatefulWidget {
}
class _LeftMenuState extends State<LeftMenu> with PreferencesMixin {
List<DropdownMenuItem<String>> _dropdownMenuItems = [];
late String currentLocale;
@override
void initState() {
super.initState();
_dropdownMenuItems = supportedLocales
.map((e) => DropdownMenuItem(child: Text(e), value: e))
.toList();
}
@override
@ -45,21 +49,32 @@ class _LeftMenuState extends State<LeftMenu> with PreferencesMixin {
child: ListView(
children: [
ListTile(
title: Text("Quickgui $version",
style: Theme.of(context).textTheme.titleLarge),
title: Text("Quickgui $_version",
style: const TextStyle(fontSize: 24.0, fontWeight: FontWeight.bold)),
),
Container(
height: 4.0,
),
/*
const Divider(),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: Row(
children: [
Text(context.t('Use dark mode')),
Text(context.t('Use dark mode'),
style: TextStyle(
color: Colors.grey[300],
),
),
Expanded(
child: Container(),
),
Switch(
value: Theme.of(context).colorScheme.brightness == Brightness.dark,
onChanged: null,
activeColor: Colors.grey[300],
activeTrackColor: Colors.grey[300],
inactiveThumbColor: Colors.grey[300],
inactiveTrackColor: Colors.grey[300],
/*
onChanged: (value) {
appSettings.useDarkMode = value;
savePreference(prefThemeMode, value);
@ -68,12 +83,14 @@ class _LeftMenuState extends State<LeftMenu> with PreferencesMixin {
activeTrackColor: Colors.black26,
inactiveThumbColor: Theme.of(context).colorScheme.onPrimary,
inactiveTrackColor: Theme.of(context).colorScheme.primary,
*/
),
],
),
),
*/
const Divider(),
Container(
height: 4.0,
),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: Row(
@ -84,10 +101,7 @@ class _LeftMenuState extends State<LeftMenu> with PreferencesMixin {
),
DropdownButton<String>(
value: currentLocale,
items: supportedLocales
.map(
(e) => DropdownMenuItem(value: e, child: Text(e)))
.toList(),
items: _dropdownMenuItems,
onChanged: (value) {
setState(() {
currentLocale = value!;

View File

@ -31,8 +31,10 @@ flutter.buildFlutterApplication rec {
nativeBuildInputs = [ copyDesktopItems ];
postFixup = ''
mkdir -p $out/share/pixmaps
cp $out/app/data/flutter_assets/assets/images/logo_pink.png $out/share/pixmaps/quickemu.png
for SIZE in 16 32 48 64 128 256 512; do
mkdir -p $out/share/icons/hicolor/$SIZEx$SIZE/apps/
cp -av assets/resources/quickgui_$SIZE.png $out/share/icons/hicolor/$SIZEx$SIZE/apps/quickgui.png
done
'';
desktopItems = [
@ -41,12 +43,13 @@ flutter.buildFlutterApplication rec {
exec = "quickgui";
icon = "quickgui";
desktopName = "Quickgui";
comment = "An elegant virtual machine manager for the desktop";
categories = [ "Development" "System" ];
})
];
meta = with lib; {
description = "Flutter frontend for quickemu";
description = "An elegant virtual machine manager for the desktop";
homepage = "https://github.com/quickemu-project/quickgui";
changelog = "https://github.com/quickemu-project/quickgui/releases/";
license = licenses.mit;

View File

@ -20,7 +20,7 @@ dependencies:
gettext_i18n: ^1.0.5
gettext_parser: ^0.2.0
package_info_plus: ^8.0.0
process_run: ^0.14.2
process_run: ^1.0.0+1
provider: ^6.1.2
quiver: ^3.2.1
url_launcher: ^6.3.0