tauri-plugin-moonbase
Moonbase license activation for Tauri 2 apps. Register the plugin and it validates the stored license at startup, runs browser and offline activation, trials, deactivation, add-ons and update downloads, locks with an upgrade offer when a license doesn't cover the running version, watches for expiry and for other instances, and presents a finished, themeable activation window whenever the app is locked.
use UiConfig;
default
.plugin
.plugin
To lock the app rather than open a window beside it, present the same UI as an overlay over the app's window, which stays blurred and inert until it is licensed:
.ui
Gate paid features in Rust, where the webview cannot skip the check, and open the UI on demand:
use MoonbaseExt;
if !app.moonbase.is_licensed
if app.moonbase.has_sub_product
UiConfig::show_addons(true) adds a screen to try, buy and activate the product's
add-ons.
Prefer your own UI? UiConfig::disabled() turns the window off; drive yours from the
moonbase://state-changed event and the commands, granted with moonbase:default:
const = window.__TAURI__ // with "withGlobalTauri": true, or import from guest-js/
await moonbase.
await moonbase.
License: MIT