mirror of
https://github.com/storytold/craft-launcher.git
synced 2026-11-17 23:46:30 +00:00
sonar-fix/enforce-https
8
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
cb82e851cd |
Add a details drawer for each Craft App (#60)
* Add a hand-written details page for each Craft App
core::details holds, for every app in the suite, a headline, a few
paragraphs, a list of features, where it runs and the list of its
pictures. The copy is the launcher's own: written from each app's page on
getartcraft.com and, for the five newer apps, from its README. It is
compiled in, so it works offline and in the web build, and it leaves out
figures that go stale (effect counts, timings).
The pictures are not in this repository. A page names them (a key and a
caption each) and AppDetails::screenshot_url turns a key into the address
of a 1200 px JPEG in storytold/artcraft-launcher-assets, pinned to a tag
(SCREENSHOTS_REV) so a saved copy never goes stale. It only answers for
keys the page lists, so no address is ever built from anyone else's text.
MAX_SCREENSHOT_BYTES caps what is accepted, and looks_like_jpeg refuses a
login page or error page that arrives as a 200.
PdfCraft lists none yet: its screenshots still show its old name
(PrintCraft). ATTRIBUTION.md points to the pictures repository, which
carries each picture's own provenance.
Tests check that every app has exactly one page, that each is filled in,
and that addresses come only from a page's own pictures.
* Open an app's details in a drawer from its card
Clicking a card (or an app's name in the table) slides a drawer in from
the right over the dimmed grid. It shows the app's headline, version and
main button, links to its website, GitHub and releases, a gallery of
screenshots, its features, the facts and notes of its latest release, and
the same trademark notice as the grid. Esc, the close button or a click
on the grid closes it. The page's text is the hand-written copy in
core::details; the version, date, download size and notes come from the
release the launcher already fetches.
The pictures are fetched when a page is opened, not bundled. The UI sends
Command::FetchScreenshots and gets one Event::Screenshot per picture, the
lead one first. The desktop backend downloads them through the launcher's
Http (its User-Agent, a 2 MB cap, redirects followed) and keeps them under
<cache>/screenshots/<revision>/<app>/<key>.jpg, so later opens, and any
time offline, read from disk. Only a JPEG is kept: a login page or error
page that arrives as a 200 is refused. A missing picture doesn't hold the
others back, but once the network has failed the rest fail at once instead
of each waiting for its own timeout. The web build does the same with
fetch and leaves the caching to the browser.
Until a picture is here, a frame of the same size says "Loading pictures…"
or, when it failed, that it couldn't be loaded and that reopening the page
tries again; nothing moves when the picture arrives. The lead picture
opens full-window, the arrows over the pictures and the arrow keys flip
through them, wrapping around, and a scroll bar stays visible (egui's
floating one only shows under the pointer).
The drawer's labels are tl! strings, with 13 rows in each of ru, zh-CN,
de, fr and pt-BR; details.rs joins the sources the catalog coverage test
reads. Every size taken from the window is kept non-negative: the new
tests resize it from 40 x 30 to 4000 x 2400 with the drawer open.
actions() becomes actions_in(), which can leave the links out of the
... menu where the page already shows them as buttons. The image crate's
jpeg feature is enabled to decode the pictures (zune-jpeg and zune-core
join Cargo.lock). The dim and the enlarged picture's backdrop are colours
in theme.rs.
* Bring the details drawer up to date with main
- Website is always a button now (#198); drop the "Like {name}" line and the trademark notice,
which main removed with the product comparisons (
|
||
|
|
1c03e2d2ea |
Accessibility/UI: follow the OS's animation setting (#201)
* Add a Polish interface - pl.tsv: the full catalog (287 rows), written clean-room from the English labels; plurals use the same one|few|many rule as Russian. - Registered as the seventh language: "Polski" in the picker, locales pl, pl-PL and pl_PL.UTF-8, complete_menus = true so the completeness tests cover it. - tests/polish.rs: the Polish UI test, modeled on the French one. - README and AGENTS updated for the new language. * Add Hungarian localization and fix responsive settings layout * i18n: add Czech (cs) interface language Czech catalog with every key of the most complete catalog (287 rows), the cs language entry with locale detection (cs-CZ, cs_CZ.UTF-8, ?lang=cs), a Czech plural rule (1 / 2-4 / other) with a unit test, and the README language list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * i18n: add Japanese (ja) interface language ja.tsv translates the whole interface, the tray menu and tooltip, each app's tagline and the backend's install/update messages into Japanese, and Settings > Language offers 日本語. Japanese locales (ja, ja-JP, ja_JP.UTF-8…) select it; Japanese has one plural form. Japanese is a CJK language, so cjk_font.rs now looks for a Japanese system font (Hiragino Sans on macOS; Yu Gothic, Meiryo or MS Gothic on Windows; Noto Sans CJK JP, Noto Sans JP, IPAGothic, Takao or VL Gothic on Linux and FreeBSD), falling back to a Chinese one, which draws kana and most kanji, where the system has none. The font is loaded per language, so switching between Japanese and Chinese reloads the right face. A fallback face is nudged onto the body font's baseline: egui puts a fallback glyph's baseline at that face's own ascent and only centres the two line boxes, which left a face whose metrics differ from Inter's riding high. On Windows, Yu Gothic's line gap is half an em, so its kana and kanji sat about 0.29 em above the Latin text beside them (Microsoft YaHei, used for Chinese, happens to match). The nudge, applied through a FontTweak, is the difference in ascent and line height, and helps the Chinese faces too. The README and AGENTS list the new language. Tests: the complete-catalog checks cover ja.tsv (placeholders, plural forms, every tl! literal, taglines, package formats), plus a locale/plural test, a Japanese glyph-coverage test, a baseline test and tests/japanese.rs (grid, table, dates, a backend message). * i18n: make the CJK font choice language-neutral The CJK comments, the missing-font note and the plural-rule docs named the languages, so each new one meant editing them all; they now say "CJK". Each language's writing system (its `script`) now lives in the registry, and a language is drawn only with a face for its own script — never another's, which would leave characters as tofu — so a language the system has no font for stays in English, like any other. Adding Korean or Traditional Chinese is a registry row and a candidate list, not a special case. * Hide Craft apps the user is not interested in. * Read the Linux desktop appearance portal so system theme matching works on Wayland. * UI: follow the OS's animation setting With Windows' "Animation effects" switched off, the launcher still glided each notch of the mouse wheel over several frames and faded its dropdowns in. egui does both by default, and nothing asked the OS. The shell now says what the OS wants (Host::reduce_motion) and the UI asks it about once a second while it draws, so a change shows without a restart. With fewer animations asked for: - a mouse wheel scrolls at once. egui has no switch for its wheel smoothing but applies a trackpad's small steps as they come, so each wheel event is rewritten as a run of those in the shell's raw_input_hook; - dropdowns, tooltips and dialogs appear without a fade, and scrolling to a place jumps there (style.animation_time, style.scroll_animation); - the rule along the top of a hovered card appears instead of wiping in. Progress bars and spinners keep moving: they say that work is going on. Where the setting comes from: - Windows: SPI_GETCLIENTAREAANIMATION, read as bit 33 of UserPreferencesMask in the registry, as SystemParametersInfoW needs unsafe; - macOS: NSWorkspace's accessibilityDisplayShouldReduceMotion; - Linux and the BSDs: the XDG settings portal over D-Bus (its reduced-motion, GNOME's enable-animations, KDE's AnimationDurationFactor), followed on a thread so the UI never waits for D-Bus; - web: prefers-reduced-motion. Animations stay on wherever the setting can't be read. winreg and zbus become direct dependencies of the desktop app; both were already in Cargo.lock. The Windows path was run on a machine with the setting off. The macOS and Linux paths were type-checked for those targets but never run, and the web one only compiled. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * UI tests: hovering a card follows the OS's animation setting With animations off, moving the pointer onto a card leaves the window still within 3 frames: its rule and its icon's rise show at once. With them on, the 0.3 s wipe takes 19 frames at 60 frames a second. Each test fails when the card's timing is made to ignore the setting. The test window no longer has a download in progress, so it is still unless something animates. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * i18n(pl): use Polish plural rule, so 21 is "21 aplikacji" plural_east_slavic treats 21, 31 and 101 as "one", which is right for Russian but not Polish, where only 1 itself takes the singular. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * system theme: back off to every 5 minutes when there's no appearance portal Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Merge #189 and main into #201: one raw_input_hook, and test anchors on taglines Main no longer shows the "Like …" product lines, so the tests find cards by their taglines. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * i18n(cs): translate "Installed · latest {latest}" (added by #195) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * i18n(pl): translate "Installed · latest {latest}" (added by #195) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * i18n(hu): translate "Installed · latest {latest}" (added by #195) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * i18n(ja): translate "Installed · latest {latest}" (added by #195) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * i18n: hide/unhide strings for the Spanish, Czech, Polish, Hungarian and Japanese catalogs Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * hungarian test: count only the settings body's links, not the cards' Website links behind the modal #198 gave every card a Website link, and Hungarian labels both Webhely. * hungarian test: card links are 14px text, settings icons 24px; filter on that --------- Co-authored-by: DzikStar <82441193+DzikStar@users.noreply.github.com> Co-authored-by: ferivoq <ferikegameplay@gmail.com> Co-authored-by: Losminek <301412321+Losminek@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: leonaci <leonacism@gmail.com> Co-authored-by: satchmo91 <eherrmann1991@gmail.com> Co-authored-by: Vikram Bhaskaran <vikram.bhaskaran@outlook.com> Co-authored-by: Brandon Thomas <echelon@gmail.com> |
||
|
|
e8614afa3f |
Add a Linux riscv64 release build (deb, rpm, tar.gz) (#102)
* Add Linux riscv64 release build and switch runners to Ubuntu 26.04 - release.yml: new linux-riscv64 job cross-compiled on ubuntu-26.04 against ports.ubuntu.com riscv64 libs, tar.gz only, artcraft-launcher --version smoke-tested under QEMU. Updated flatpak runner matrix to ubuntu-26.04. Draft-release job now requires linux-riscv64 and checks the tarball. - packaging/linux/package.sh: CROSS_ARCH / CROSS_TARGET / CROSS_COMPILE / EMULATOR support. - platform.rs: add Arch::Riscv64 variant, map linux-riscv64 token, and prioritize tarball format for riscv64 on Linux. - web.rs: detect riscv64 architecture in visitor user agent. - README and AGENTS.md: document the riscv64 tarball. * linux: build deb and rpm packages for riscv64 * ci: configure actionlint to recognize ubuntu-26.04 runner labels * Keep riscv64 and Flatpak release jobs on Ubuntu 24.04 24.04 is what PhotoCraft's linux-riscv64 job uses, so the riscv64 binaries need glibc 2.39 (as the README says) rather than 26.04's newer glibc, and the release pipeline keeps runner images it has already proven on. Drop the actionlint label config that 26.04 needed, revert the default_kinds and download_kinds matches to match on the OS alone, simplify the riscv UA check, and rustfmt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Brandon Thomas <echelon@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
cf5604dc65 |
Add UI localisation (i18n) with a Russian catalog
Every user-visible string in the interface is now looked up from a
per-language catalog at render time instead of being compiled in as
English. English stays the source of truth and the lookup key; a missing
row falls back to English rather than failing.
- crates/ui-egui/src/i18n: `t`/`tl!` for literals, `tr_ctx` (one English
word needing different translations), `tr_id` (command-id keyed),
`trn`/`tn` (plurals), `fmt` ({name} placeholders filled after the
lookup) and `message`/`msg` (backend status and error text, translated
where it is shown). Split into lang.rs (the registry and locale tags),
detect.rs (the system language), translate.rs (lookups) and catalog.rs
(the TSV parser); mod.rs only declares them.
- ru.tsv: the whole interface in Russian, with East Slavic plural forms,
month abbreviations, a day-month-year date template and each app's
tagline. Product and app names (ArtCraft Launcher, Craft App Suite,
PhotoCraft…) stay in English.
- The language follows the system by default: ARTCRAFT_LAUNCHER_LOCALE,
then the OS's preferred UI languages through the sys-locale crate
(desktop only; LANGUAGE/LC_*/LANG on Linux and the BSDs, the preferred
languages on macOS, the user's UI languages on Windows), and `?lang=`
then `navigator.languages` on the web. Settings > Language overrides it.
- core stays pure and wasm-safe: `time::ago_kind` and `month_short_en`
let the UI render relative times and dates in the current language.
Ported onto main from the original PR (#28): every string main added
since (feed notices and alerts, the "using ArtCraft API and GitHub"
footer, window buttons, waiting and retry states, the install-cancelled
toasts, filter tooltips, package formats, the reveal label) goes through
the catalog, with Russian rows. Also changed from the original:
- `@msg` templates now match real messages: `Couldn't open {name}: {e}`
translates "Couldn't open PhotoCraft: …", the most specific template
wins. Rows for messages the launcher never sends (clipboard, recovery
data) are gone; rows for its install/update/remove toasts are added.
- The locale probes no longer spawn /usr/bin/defaults or reg.exe; the
small, dependency-free sys-locale crate asks the OS instead.
- Folded in from #34's framework fixes: catalog tests split rows with
trim_end (trim dropped the leading TAB, so plain rows were silently
skipped), the English plural fallback goes by n == 1, @plural rows take
1 to 3 forms, and Settings::language_label comes from the registry.
- Tests are registry-driven: placeholders, plural form counts and, for
every catalog marked complete, coverage of every tl!/t literal, every
tn plural key, each tagline and the package formats. A Russian UI test
renders the grid and table. Catalog warnings go to the log, not stderr.
- ru.tsv: "Launcher" and "Craft App Suite" stay in English; "лаунчер" is
spelled one way; "Verifying…" (Проверка целостности…) and "Discard
download" (Удалить скачанное) no longer read like "Checking…" and
"Cancel download"; the table's Installed/Latest headers are short
enough to fit; the reveal rows match the backend's "Show in …" labels.
- The toolbar drops its "Sort" caption when longer labels leave no room
for it, rather than drawing over the filters.
- Unused settings helpers and LANGUAGE_CODES were removed, and core's doc
comments now describe what the UI actually translates.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
||
|
|
b42d1f49ec |
Footer names the services in use; retry the ArtCraft API before GitHub
Footer: "Checked just now · using ArtCraft API", "· using GitHub" or "· using ArtCraft API and GitHub", from where each release on screen came from (Latest events now carry their origin), so it follows what's shown. Retries and fallback: - The very first poll (nothing ever loaded or saved) tries the ArtCraft API once, then GitHub at once, so the window fills - Every other poll tries the API up to three times (1 s, then 3 s apart) - Until every app has loaded once, a failing API lets GitHub be asked fairly freely (every 5 minutes per app) - After that, GitHub is asked only for apps the API doesn't list or hasn't refreshed in a day, or once the API has seriously failed (three checks in a row and an hour without an answer); then hourly per app. Until then the API's last answer keeps being shown Tests: the fallback policy for each stage, and the footer wording. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
019330f99a |
Restyle to match getartcraft.com, add an installer wizard, blue app icon (#23)
The launcher now looks like the apps page on getartcraft.com: the site's colour tokens, square corners, 1 px hairlines instead of shadows, app cards in a shared-hairline grid with numbered tabs and "Photo*Craft*" wordmarks, mono upper-case labels and buttons, and square badges for status. Fonts are the site's own, embedded in the binary: Archivo (620, 118 % width) for headings and app names, Inter for body text and Geist Mono for labels, all variable fonts from google/fonts (OFL-1.1) set to the site's weights. The window has a custom title bar on Windows and Linux (drag to move, double-click to maximize, minimize/maximize/close, resize from the edges) and a transparent one on macOS with the traffic lights in the header. The MSI used to flash a progress bar and close. Double-clicked, it now opens a WixUI wizard (Welcome, Ready, progress, Finish with "Launch ArtCraft Launcher"), with art drawn by package.ps1 from the ArtCraft mark and the Craft apps' icons. Self-update still runs it with /passive. CI installs the WiX UI and Util extensions. The app icon is now the blue "A" mark, getartcraft.com's favicon. packaging/icons.sh runs on any OS: `cargo xtask icns` packs the .icns. Also: two clippy fixes in crates/native that newer clippy rejects, and refreshed README screenshots. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
b642df291d |
ArtCraft Launcher updates itself and restarts
When a newer launcher is released, the banner offers "Update and restart": the new build is downloaded and verified like any Craft App, put in place the way this copy was installed, and started by a small helper once this process has exited (it holds the single-instance lock, and Windows locks a running exe). - macOS .app: new bundle copied from the DMG over this one, reopened - Windows MSI (per-user): helper runs the new MSI after exit - Windows portable: helper unzips over the folder after exit; settings stay - Linux AppImage: new AppImage renamed over this one - Linux .deb / .rpm: system package manager, then restart - Flatpak, FreeBSD and dev builds keep the download link ARTCRAFT_LAUNCHER_PRETEND_VERSION makes an installed copy act old, to try the update against the current release. Tested: the helper waits for the old process to exit; a real DMG replaces a bundle in place. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
ec69f0be2c |
ArtCraft Launcher: install and update the Craft App Suite
A native Rust/egui launcher for the 12 Craft Apps (7 classic + 5 new). - Grid (icon cards) or sortable table view, filters and search - Status per app: available, installed and up to date, or update available with version and release date - Installs where each OS keeps apps, from the official release packages: /Applications (DMG), Program Files (MSI), deb/rpm via the system package manager (Flatpak/AppImage fallback), /usr/local on FreeBSD - Detects apps installed by hand; updates keep the installed format - Every download verified against its published SHA-256; running apps are never replaced - Tray/menu-bar mode, start at login, one notification per new version - GitHub API with ETag cache, falling back to release pages when rate-limited; release source is pluggable for a future catalog API - Web build lists latest releases with per-platform downloads - Packaging and release workflows for macOS, Windows (x64/x86/arm64), Linux (x86_64/aarch64), FreeBSD and web Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |