mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-08-30 23:27:26 +02:00
Route all app commands through a single RPC envelope (#542)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
1f91cddab9
commit
23e7229e63
@@ -8,6 +8,10 @@ export * from "./bindings/license";
|
||||
|
||||
const CHECK_QUERY_KEY = ["license.check"];
|
||||
|
||||
export async function checkLicense(): Promise<LicenseCheckStatus> {
|
||||
return platform.rpc<LicenseCheckStatus>("plugin:yaak-license|check");
|
||||
}
|
||||
|
||||
export function useLicense() {
|
||||
const queryClient = useQueryClient();
|
||||
const activate = useMutation<void, string, { licenseKey: string }>({
|
||||
@@ -37,7 +41,7 @@ export function useLicense() {
|
||||
if (!appInfo.featureLicense) {
|
||||
return null;
|
||||
}
|
||||
return platform.rpc<LicenseCheckStatus>("plugin:yaak-license|check");
|
||||
return checkLicense();
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user