feat: license system (UI card + auto-update gating) (#47, #48) #64

Merged
maximus merged 4 commits from issue-46-license-commands-entitlements into main 2026-04-10 14:28:28 +00:00
Owner

Summary

Merge la branche license complète dans main. Inclut :

  • PR #57 — Carte de licence dans les paramètres (issue #47)
  • PR #58 — Mises à jour auto conditionnées à l'entitlement auto-update (issue #48)

La fondation Rust (issue #46, PR #56) est déjà dans main.

Changes

  • src/components/settings/LicenseCard.tsx — UI carte de licence
  • src/services/licenseService.ts — Service de licence côté TypeScript
  • src/i18n/locales/{fr,en}.json — Traductions licence
  • Gating auto-update derrière l'entitlement licence
## Summary Merge la branche license complète dans main. Inclut : - **PR #57** — Carte de licence dans les paramètres (issue #47) - **PR #58** — Mises à jour auto conditionnées à l'entitlement `auto-update` (issue #48) La fondation Rust (issue #46, PR #56) est déjà dans main. ## Changes - `src/components/settings/LicenseCard.tsx` — UI carte de licence - `src/services/licenseService.ts` — Service de licence côté TypeScript - `src/i18n/locales/{fr,en}.json` — Traductions licence - Gating auto-update derrière l'entitlement licence
maximus added 4 commits 2026-04-10 14:28:19 +00:00
feat: license card in settings (#47)
All checks were successful
PR Check / rust (push) Successful in 16m19s
PR Check / frontend (push) Successful in 2m14s
2da2de183a
Adds the user-facing layer on top of the Rust license commands shipped
in #46.

- `licenseService.ts` thin wrapper around the new Tauri commands
- `useLicense` hook follows the project's useReducer pattern (idle,
  loading, ready, validating, error) and exposes `submitKey`,
  `refresh`, and `checkEntitlement` for cross-component use
- `LicenseCard` shows the current edition, the expiry date when set,
  accepts a license key with inline validation feedback, and links to
  the purchase page via `openUrl` from `@tauri-apps/plugin-opener`
- Card is inserted at the top of `SettingsPage` so the edition is the
  first thing users see when looking for license-related actions
- i18n: new `license.*` keys in both `fr.json` and `en.json`
- Bilingual CHANGELOG entries
feat: gate auto-updates behind license entitlement (#48)
All checks were successful
PR Check / rust (push) Successful in 16m6s
PR Check / frontend (push) Successful in 2m15s
6d67ab8935
Both code paths that touch the updater now consult `check_entitlement`
from the Rust entitlements module before calling `check()`:

- `useUpdater.ts` adds a `notEntitled` status; on Free, the check
  short-circuits and the Settings page displays an upgrade hint instead
  of fetching update metadata.
- `ErrorPage.tsx` (recovery screen) does the same so the error path
  matches the main path; users on Free no longer see network errors when
  the updater would have run.

The gate name (`auto-update`) is the same string consumed by
`commands/entitlements.rs::FEATURE_TIERS`, so changing which tier
unlocks updates is a one-line edit in that file.

Bilingual i18n keys for the new messages are added to both `fr.json`
and `en.json`. CHANGELOG entries in both languages.
Merge pull request 'feat: gate auto-updates behind license entitlement (#48)' (#58) from issue-48-gate-auto-updates into issue-46-license-commands-entitlements
All checks were successful
PR Check / rust (push) Successful in 16m9s
PR Check / frontend (push) Successful in 2m11s
PR Check / rust (pull_request) Successful in 16m10s
PR Check / frontend (pull_request) Successful in 2m14s
dd106a1df6
maximus merged commit 877ace370f into main 2026-04-10 14:28:28 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: maximus/Simpl-Resultat#64
No description provided.