auth-users.ts91 lines · main
1// @ts-nocheck
2import { RegistryDefinations } from '../types'
3
4export const AUTH_USERS_SHORTCUT_IDS = {
5 AUTH_USERS_REFRESH: 'auth-users.refresh',
6 AUTH_USERS_CLEAR_SORT: 'auth-users.clear-sort',
7 AUTH_USERS_TOGGLE_ALL_SELECTION: 'auth-users.toggle-all-selection',
8 AUTH_USERS_DELETE_SELECTED: 'auth-users.delete-selected',
9 AUTH_USERS_EXIT_SELECTION: 'auth-users.exit-selection',
10 AUTH_USERS_CLOSE_PANEL: 'auth-users.close-panel',
11 AUTH_USERS_START_NAV_DOWN: 'auth-users.start-nav-down',
12 AUTH_USERS_START_NAV_UP: 'auth-users.start-nav-up',
13 AUTH_USERS_CREATE_USER: 'auth-users.create-user',
14 AUTH_USERS_INVITE_USER: 'auth-users.invite-user',
15}
16
17export type AuthUsersShortcutId =
18 (typeof AUTH_USERS_SHORTCUT_IDS)[keyof typeof AUTH_USERS_SHORTCUT_IDS]
19
20export const authUsersRegistry: RegistryDefinations<AuthUsersShortcutId> = {
21 [AUTH_USERS_SHORTCUT_IDS.AUTH_USERS_REFRESH]: {
22 id: AUTH_USERS_SHORTCUT_IDS.AUTH_USERS_REFRESH,
23 label: 'Refresh users',
24 sequence: ['Shift+R'],
25 showInSettings: false,
26 options: { ignoreInputs: true, registerInCommandMenu: true },
27 },
28 [AUTH_USERS_SHORTCUT_IDS.AUTH_USERS_CLEAR_SORT]: {
29 id: AUTH_USERS_SHORTCUT_IDS.AUTH_USERS_CLEAR_SORT,
30 label: 'Clear sort',
31 sequence: ['S', 'C'],
32 showInSettings: false,
33 options: { ignoreInputs: true, registerInCommandMenu: true },
34 },
35 [AUTH_USERS_SHORTCUT_IDS.AUTH_USERS_TOGGLE_ALL_SELECTION]: {
36 id: AUTH_USERS_SHORTCUT_IDS.AUTH_USERS_TOGGLE_ALL_SELECTION,
37 label: 'Toggle selection on all displayed users',
38 sequence: ['Mod+A'],
39 showInSettings: false,
40 options: { ignoreInputs: true },
41 },
42 [AUTH_USERS_SHORTCUT_IDS.AUTH_USERS_DELETE_SELECTED]: {
43 id: AUTH_USERS_SHORTCUT_IDS.AUTH_USERS_DELETE_SELECTED,
44 label: 'Delete selected users',
45 sequence: ['Mod+Backspace'],
46 showInSettings: false,
47 options: { ignoreInputs: true },
48 },
49 [AUTH_USERS_SHORTCUT_IDS.AUTH_USERS_EXIT_SELECTION]: {
50 id: AUTH_USERS_SHORTCUT_IDS.AUTH_USERS_EXIT_SELECTION,
51 label: 'Clear user selection',
52 sequence: ['Escape'],
53 showInSettings: false,
54 options: { ignoreInputs: true, conflictBehavior: 'allow' },
55 },
56 [AUTH_USERS_SHORTCUT_IDS.AUTH_USERS_CLOSE_PANEL]: {
57 id: AUTH_USERS_SHORTCUT_IDS.AUTH_USERS_CLOSE_PANEL,
58 label: 'Close user details panel',
59 sequence: ['Escape'],
60 showInSettings: false,
61 options: { ignoreInputs: true, conflictBehavior: 'allow' },
62 },
63 [AUTH_USERS_SHORTCUT_IDS.AUTH_USERS_START_NAV_DOWN]: {
64 id: AUTH_USERS_SHORTCUT_IDS.AUTH_USERS_START_NAV_DOWN,
65 label: 'Move focus into users grid',
66 sequence: ['ArrowDown'],
67 showInSettings: false,
68 options: { ignoreInputs: true },
69 },
70 [AUTH_USERS_SHORTCUT_IDS.AUTH_USERS_START_NAV_UP]: {
71 id: AUTH_USERS_SHORTCUT_IDS.AUTH_USERS_START_NAV_UP,
72 label: 'Move focus into users grid',
73 sequence: ['ArrowUp'],
74 showInSettings: false,
75 options: { ignoreInputs: true },
76 },
77 [AUTH_USERS_SHORTCUT_IDS.AUTH_USERS_CREATE_USER]: {
78 id: AUTH_USERS_SHORTCUT_IDS.AUTH_USERS_CREATE_USER,
79 label: 'Create new user',
80 sequence: ['I', 'U'],
81 showInSettings: false,
82 options: { ignoreInputs: true, registerInCommandMenu: true },
83 },
84 [AUTH_USERS_SHORTCUT_IDS.AUTH_USERS_INVITE_USER]: {
85 id: AUTH_USERS_SHORTCUT_IDS.AUTH_USERS_INVITE_USER,
86 label: 'Send user invitation',
87 sequence: ['I', 'I'],
88 showInSettings: false,
89 options: { ignoreInputs: true, registerInCommandMenu: true },
90 },
91}