mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-11-21 16:01:46 +01:00
Better license flows
This commit is contained in:
1 parent
2b1431d041
commit
af7782c93b
9 files changed
+184
-70
No files matched your search
@@ -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) &&
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
Reference in new issue
Block a user