mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-06 02:22:00 +00:00
The update prompt drew the app name's first letter in a blue square and used that blue for
its buttons and highlights. App gains accent and developer, and the prompt now draws:
- App::icon_png (decoded once per context, PNG only, at most 1024 px a side and never past
the renderer's texture limit), keeping the letter badge for an app without a usable icon;
- App::accent filling its buttons, the badge and an UPDATE chip, with white or black text,
whichever contrasts more, so every Craft app's accent reaches WCAG AA (4.5:1) for these
small labels; the What's new link is body text with an accent underline (accent-coloured
text missed 4.5:1 for several apps). No accent keeps the default blue;
- "by <developer>" beside the app name: App::developer, ArtCraft (app::DEVELOPER) for every
app in the storytold organisation unless the app passes its own;
- its own button states: backgrounds for unfilled buttons (LATER, DISMISS) when hovered and
pressed, as the host app's style can hover in a colour its dark text doesn't read on, and a
2 px focus ring in the body text colour on every button (egui shows focus in that state)
and on the What's new link.
Apps opt in by passing their own App, e.g.
App { icon_png: Some(include_bytes!("…128x128…png")), accent: Some([0x3f, 0x5f, 0xe0]), ..suite::WORDCRAFT }.
48 lines
1.4 KiB
TOML
48 lines
1.4 KiB
TOML
[package]
|
|
name = "craft-update"
|
|
description = "Release checking, downloading, installing and self-updating for the Craft App Suite and ArtCraft Launcher"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
rust-version.workspace = true
|
|
repository.workspace = true
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[features]
|
|
default = []
|
|
egui = ["dep:egui", "dep:image"]
|
|
local-mirror = []
|
|
|
|
[dependencies]
|
|
egui = { workspace = true, optional = true }
|
|
# Decodes the app icon the startup prompt shows (`App::icon_png`); PNG only.
|
|
image = { version = "0.25", default-features = false, features = ["png"], optional = true }
|
|
serde = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
log = "0.4"
|
|
getrandom = "0.3"
|
|
tempfile = "3"
|
|
sha2 = "0.10"
|
|
ureq = { version = "3.4", default-features = false, features = ["rustls-no-provider", "_ring", "gzip", "platform-verifier"] }
|
|
chrono = { workspace = true }
|
|
semver = { version = "1", features = ["serde"] }
|
|
|
|
[dev-dependencies]
|
|
flate2 = "1"
|
|
|
|
[target.'cfg(unix)'.dependencies]
|
|
flate2 = "1"
|
|
tar = { version = "0.4", default-features = false }
|
|
|
|
[target.'cfg(target_os = "macos")'.dependencies]
|
|
plist = "1"
|
|
|
|
[target.'cfg(target_os = "windows")'.dependencies]
|
|
winreg = "0.55"
|
|
dunce = "1"
|
|
zip = { version = "9", default-features = false, features = ["deflate"] }
|
|
winsafe = { version = "0.0.29", features = ["advapi", "kernel", "shell", "version"] }
|
|
verifysign = "1"
|