mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-07-03 11:31:47 +02:00
Fix commercial use banner snooze
This commit is contained in:
@@ -54,7 +54,7 @@ export function CommercialUseBanner({
|
|||||||
setSnoozedAt(JSON.stringify({ source, at: new Date().toISOString() })).catch(console.error);
|
setSnoozedAt(JSON.stringify({ source, at: new Date().toISOString() })).catch(console.error);
|
||||||
}, [setSnoozedAt, snoozed, source]);
|
}, [setSnoozedAt, snoozed, source]);
|
||||||
|
|
||||||
if (!visible || isSnoozeLoading || snoozed) {
|
if (!visible || isSnoozeLoading || (snoozed && !snoozeStartedRef.current)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -96,10 +96,10 @@ async function shouldShowCommercialUsePrompt(): Promise<boolean> {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
const license = await invoke<LicenseCheckStatus>("plugin:yaak-license|check");
|
const license = await invoke<LicenseCheckStatus>("plugin:yaak-license|check");
|
||||||
return license.status !== "active" && license.status !== "trialing";
|
return license.status === "personal_use";
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log("Failed to check license before commercial-use prompt", err);
|
console.log("Failed to check license before commercial-use prompt", err);
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user