Repository navigation
Conversation
Once per start of the app the status bar shows a small "Support us on Ko-fi" tag. A click opens the fixed Ko-fi page (https://ko-fi.com/warr_ev) in the system browser from Rust and hides it; x only hides it. Whether it was shown is held in memory (donate_tag_due), so reconnecting, switching server or reloading the window does not show it again. Settings -> Support TeamCraft switches it off (donate_tag in the settings file); the new desktop policy ShowDonateTag fixes it (ADMX, en-US and de-DE ADML, macOS profile, Linux policies.json). Texts through the i18n catalogs (English, German). Rust tests for the policy, the settings field, the once-per-start rule and the fixed URL outside the CSP. Also fixes the ci-changes.sh self-test line of local-changes.js, which expected desktop_rust=false although desktop/ui/js scripts run the desktop Rust tests. Docs: CHANGELOG, README, desktop/README, guide/desktop.md, admin/desktop-deployment.md, admin/privacy.md, dev/threat-model.md, OPEN_WORK.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #403
What changed
Tag in the status bar: "Support us on Ko-fi" shows once per start of the desktop app. A click opens
https://ko-fi.com/warr_evin the system browser and hides the tag. The × button only hides it.Once per start: the new command
donate_tag_due(desktop/src/commands.rs) answers yes once per process. The flag is anAtomicBoolin memory, so reconnecting, switching server or reloading the window does not show the tag again.Fixed link:
DONATE_URLis a constant, opened from Rust byopen_donate_page, the same wayopen_release_pageopens the release page. The web view cannot pass an address, and ko-fi.com is not in the CSP. Nothing is loaded, sent or counted before the click.Settings switch: Settings → Support TeamCraft has a checkbox that turns the tag off. It is stored as
donate_tag: Option<bool>in the settings file (#[serde(default)], so older files load unchanged). Command:set_donate_tag.Policy:
ShowDonateTag(0= never shown,1= always shown, not set = the user chooses) is indesktop/src/policy.rs(struct,from_lookup,or,view().fixed→donate_tag, module table). When the policy is set, the Settings checkbox is disabled and shows Set by your organization.set_donate_tagis refused under the policy.Policy templates:
ShowDonateTagis added to the ADMX, the en-US and de-DE ADML, the macOS mobileconfig and the Linuxpolicies.json.i18n: new texts are in
shared/i18n/en.jsonandde.jsonand are used throught(). No inline styles or scripts; the CSS is indesktop/ui/app.css.Tests (Rust):
orprecedence,fixedlist;tauri.conf.json.There is no JS rule test, because the show/hide decision is in Rust.
CI fix:
scripts/ci-changes.sh --self-testalready failed onmain. Itslocal-changes.jsline expecteddesktop_rust=false, but scripts indesktop/ui/jsmatchDESKTOP_RUST_ALSO. The line now expectstrue, and the self-test passes locally.Docs: CHANGELOG, README, desktop/README, guide/desktop.md (new section Support us on Ko-fi), admin/desktop-deployment.md, admin/privacy.md, dev/threat-model.md, OPEN_WORK.md.
Not verified locally
This was not compiled or tested locally. Neither the desktop app nor the server was built, and Node.js was not available to run the UI checks. Only
cargo fmt --check(desktop) and the ci-changes self-test were run. CI verifies the rest.Left out / open
set_donate_tagunder a policy: the policy is a process-wideOnceLock, so the refusal rests onshow_donate_tag.is_some(), which the policy tests cover.🤖 Generated with Claude Code