Browse Source

fix(nc-gui): change $e type from a -> c

pull/4550/head
Wing-Kam Wong 2 years ago
parent
commit
ac65ec7f8c
  1. 2
      packages/nc-gui/components/dashboard/TreeView.vue
  2. 2
      packages/nc-gui/components/general/FullScreen.vue
  3. 2
      packages/nc-gui/components/general/ShareBaseButton.vue
  4. 12
      packages/nc-gui/components/smartsheet/Grid.vue
  5. 4
      packages/nc-gui/pages/[projectType]/[projectId]/index.vue

2
packages/nc-gui/components/dashboard/TreeView.vue

@ -241,7 +241,7 @@ useEventListener(document, 'keydown', async (e: KeyboardEvent) => {
if (isCreateTableAllowed.value && !isDrawerOrModalExist()) {
// prevent the key `T` is inputted to table title input
e.preventDefault()
$e('a:shortcut', { key: 'ALT + T' })
$e('c:shortcut', { key: 'ALT + T' })
openTableCreateDialog()
}
break

2
packages/nc-gui/components/general/FullScreen.vue

@ -22,7 +22,7 @@ useEventListener(document, 'keydown', async (e: KeyboardEvent) => {
case 70: {
// ALT + F
if (!isDrawerOrModalExist()) {
$e('a:shortcut', { key: 'ALT + F' })
$e('c:shortcut', { key: 'ALT + F' })
isSidebarsOpen.value = !isSidebarsOpen.value
}
break

2
packages/nc-gui/components/general/ShareBaseButton.vue

@ -26,7 +26,7 @@ useEventListener(document, 'keydown', async (e: KeyboardEvent) => {
case 73: {
// ALT + I
if (isShareBaseAllowed.value && !isDrawerOrModalExist()) {
$e('a:shortcut', { key: 'ALT + I' })
$e('c:shortcut', { key: 'ALT + I' })
showUserModal.value = true
}
break

12
packages/nc-gui/components/smartsheet/Grid.vue

@ -226,7 +226,7 @@ const { selectCell, startSelectRange, endSelectRange, clearSelectedRange, copyVa
switch (e.key) {
case 'ArrowUp':
e.preventDefault()
$e('a:shortcut', { key: 'CTRL + ArrowUp' })
$e('c:shortcut', { key: 'CTRL + ArrowUp' })
selectedCell.row = 0
selectedCell.col = selectedCell.col ?? 0
scrollToCell?.()
@ -234,7 +234,7 @@ const { selectCell, startSelectRange, endSelectRange, clearSelectedRange, copyVa
return true
case 'ArrowDown':
e.preventDefault()
$e('a:shortcut', { key: 'CTRL + ArrowDown' })
$e('c:shortcut', { key: 'CTRL + ArrowDown' })
selectedCell.row = data.value.length - 1
selectedCell.col = selectedCell.col ?? 0
scrollToCell?.()
@ -242,7 +242,7 @@ const { selectCell, startSelectRange, endSelectRange, clearSelectedRange, copyVa
return true
case 'ArrowRight':
e.preventDefault()
$e('a:shortcut', { key: 'CTRL + ArrowRight' })
$e('c:shortcut', { key: 'CTRL + ArrowRight' })
selectedCell.row = selectedCell.row ?? 0
selectedCell.col = fields.value?.length - 1
scrollToCell?.()
@ -250,7 +250,7 @@ const { selectCell, startSelectRange, endSelectRange, clearSelectedRange, copyVa
return true
case 'ArrowLeft':
e.preventDefault()
$e('a:shortcut', { key: 'CTRL + ArrowLeft' })
$e('c:shortcut', { key: 'CTRL + ArrowLeft' })
selectedCell.row = selectedCell.row ?? 0
selectedCell.col = 0
scrollToCell?.()
@ -264,7 +264,7 @@ const { selectCell, startSelectRange, endSelectRange, clearSelectedRange, copyVa
case 82: {
// ALT + R
if (isAddingEmptyRowAllowed) {
$e('a:shortcut', { key: 'ALT + R' })
$e('c:shortcut', { key: 'ALT + R' })
addEmptyRow()
}
break
@ -272,7 +272,7 @@ const { selectCell, startSelectRange, endSelectRange, clearSelectedRange, copyVa
case 67: {
// ALT + C
if (isAddingColumnAllowed) {
$e('a:shortcut', { key: 'ALT + C' })
$e('c:shortcut', { key: 'ALT + C' })
addColumnDropdown.value = true
}
break

4
packages/nc-gui/pages/[projectType]/[projectId]/index.vue

@ -213,7 +213,7 @@ useEventListener(document, 'keydown', async (e: KeyboardEvent) => {
// ALT + ,
if (isUIAllowed('settings') && !isDrawerOrModalExist()) {
e.preventDefault()
$e('a:shortcut', { key: 'ALT + ,' })
$e('c:shortcut', { key: 'ALT + ,' })
toggleDialog(true, 'teamAndAuth')
}
break
@ -224,7 +224,7 @@ useEventListener(document, 'keydown', async (e: KeyboardEvent) => {
switch (e.key) {
case '/':
if (!isDrawerOrModalExist()) {
$e('a:shortcut', { key: 'CTRL + /' })
$e('c:shortcut', { key: 'CTRL + /' })
openKeyboardShortcutDialog()
}
break

Loading…
Cancel
Save