feat: refactor the settings page architecture

This commit is contained in:
Michael Aaron Murphy 2023-04-25 00:30:50 +02:00
parent efdd934e62
commit c015ad9948
No known key found for this signature in database
GPG key ID: B2732D4240C9212C
55 changed files with 2212 additions and 1635 deletions

View file

@ -15,12 +15,12 @@ rootdir := ''
prefix := '/usr'
# File paths
bin-src := 'target/release/' + name
bin-dest := rootdir + prefix + '/bin/' + name
bin-src := 'target' / 'release' / name
bin-dest := clean(rootdir / prefix) / 'bin' / name
desktop := appid + '.desktop'
desktop-src := 'resources/' + desktop
desktop-dest := rootdir + prefix + '/share/applications/' + desktop
desktop-src := 'resources' / desktop
desktop-dest := clean(rootdir / prefix) / 'share' / 'applications' / desktop
[private]
help:
@ -34,21 +34,21 @@ clean:
clean-dist: clean
rm -rf .cargo vendor vendor.tar target
# Compile debug build of cosmic-settings
# Compile with debug profile
build-debug *args:
cargo build {{args}}
# Compile release build of cosmic-settings
# Compile with release profile
build-release *args: (build-debug '--release' args)
# Vendored release build of cosmic-settings
# Compile with a vendored tarball
build-vendored *args: vendor-extract (build-release '--frozen --offline' args)
# Run `cargo clippy`
# Check for errors and linter warnings
check *args:
cargo clippy --all-features {{args}} -- -W clippy::pedantic
# Run `cargo clippy` with json message format
# Runs a check with JSON message format for IDE integration
check-json: (check '--message-format=json')
# Installation command
@ -67,11 +67,11 @@ install: (install-bin bin-src bin-dest) (install-file desktop-src desktop-dest)
# Run the application for testing purposes
run *args:
cargo run {{args}}
env RUST_BACKTRACE=full cargo run --release {{args}}
# Run `cargo test`
test:
cargo test --all-features
cargo test
# Uninstalls everything (requires same arguments as given to install)
uninstall:
@ -86,10 +86,9 @@ vendor:
tar pcf vendor.tar vendor
rm -rf vendor
# Extracts vendored dependencies if vendor=1
# Extracts vendored dependencies
[private]
vendor-extract:
#!/usr/bin/env sh
rm -rf vendor
tar pxf vendor.tar