Better license flows

This commit is contained in:
Gregory Schier
2025-02-24 05:59:15 -08:00
parent 2b1431d041
commit af7782c93b
9 changed files with 184 additions and 70 deletions

View File

@@ -115,7 +115,6 @@ export function useHotKey(
if (e.metaKey) currentKeysWithModifiers.add('Meta');
if (e.shiftKey) currentKeysWithModifiers.add('Shift');
console.log('down', currentKeysWithModifiers);
for (const [hkAction, hkKeys] of Object.entries(hotkeys) as [HotkeyAction, string[]][]) {
if (
(e.target instanceof HTMLInputElement || e.target instanceof HTMLTextAreaElement) &&

View File

@@ -0,0 +1,15 @@
import { useKeyValue } from './useKeyValue';
interface LicenseConfirmation {
hasDismissedTrial: boolean;
confirmedPersonalUse: boolean;
}
export function useLicenseConfirmation() {
const { set, value } = useKeyValue<LicenseConfirmation>({
key: 'license_confirmation',
fallback: { hasDismissedTrial: false, confirmedPersonalUse: false },
});
return [value, set] as const;
}