mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-11-21 16:27:39 -06:00
Fixed an issue where ERD Open/Save shorcuts were not working on Windows/Linux. #7639
This commit is contained in:
parent
70a7c42be1
commit
1d5f5a2067
@ -19,6 +19,7 @@
|
||||
"dependencies": {
|
||||
"axios": "^1.7.2",
|
||||
"bootstrap": "^4.5.3",
|
||||
"electron-context-menu": "^4.0.1",
|
||||
"electron-store": "^10.0.0"
|
||||
}
|
||||
}
|
||||
|
@ -15,6 +15,7 @@ import * as misc from './misc.js';
|
||||
import { spawn } from 'child_process';
|
||||
import { fileURLToPath } from 'url';
|
||||
import { setupMenu } from './menu.js';
|
||||
import contextMenu from 'electron-context-menu';
|
||||
|
||||
const configStore = new Store({
|
||||
defaults: {
|
||||
@ -65,6 +66,13 @@ if (fs.existsSync('dev_config.json')) {
|
||||
}
|
||||
}
|
||||
|
||||
contextMenu({
|
||||
showInspectElement: false,
|
||||
showSearchWithGoogle: false,
|
||||
showLookUpSelection: false,
|
||||
showSelectAll: true,
|
||||
});
|
||||
|
||||
Menu.setApplicationMenu(null);
|
||||
|
||||
function openConfigure() {
|
||||
|
@ -266,6 +266,13 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"ansi-regex@npm:^6.0.1":
|
||||
version: 6.0.1
|
||||
resolution: "ansi-regex@npm:6.0.1"
|
||||
checksum: 1ff8b7667cded1de4fa2c9ae283e979fc87036864317da86a2e546725f96406746411d0d85e87a2d12fa5abd715d90006de7fa4fa0477c92321ad3b4c7d4e169
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"ansi-styles@npm:^4.1.0":
|
||||
version: 4.3.0
|
||||
resolution: "ansi-styles@npm:4.3.0"
|
||||
@ -275,6 +282,13 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"ansi-styles@npm:^6.0.0":
|
||||
version: 6.2.1
|
||||
resolution: "ansi-styles@npm:6.2.1"
|
||||
checksum: ef940f2f0ced1a6347398da88a91da7930c33ecac3c77b72c5905f8b8fe402c52e6fde304ff5347f616e27a742da3f1dc76de98f6866c69251ad0b07a66776d9
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"argparse@npm:^2.0.1":
|
||||
version: 2.0.1
|
||||
resolution: "argparse@npm:2.0.1"
|
||||
@ -390,6 +404,16 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"cli-truncate@npm:^4.0.0":
|
||||
version: 4.0.0
|
||||
resolution: "cli-truncate@npm:4.0.0"
|
||||
dependencies:
|
||||
slice-ansi: ^5.0.0
|
||||
string-width: ^7.0.0
|
||||
checksum: d5149175fd25ca985731bdeec46a55ec237475cf74c1a5e103baea696aceb45e372ac4acbaabf1316f06bd62e348123060f8191ffadfeedebd2a70a2a7fb199d
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"clone-response@npm:^1.0.2":
|
||||
version: 1.0.3
|
||||
resolution: "clone-response@npm:1.0.3"
|
||||
@ -548,6 +572,35 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"electron-context-menu@npm:^4.0.1":
|
||||
version: 4.0.1
|
||||
resolution: "electron-context-menu@npm:4.0.1"
|
||||
dependencies:
|
||||
cli-truncate: ^4.0.0
|
||||
electron-dl: ^4.0.0
|
||||
electron-is-dev: ^3.0.1
|
||||
checksum: 47a09c96f1d5f2db422dac2c3bae8bbd2f4bb1c8dedcdc75ea9320defbbb8a06945d4d455e2a6fe6100ce321cdb4ffbfb1eacdc67223474d04d91fbd8f28da33
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"electron-dl@npm:^4.0.0":
|
||||
version: 4.0.0
|
||||
resolution: "electron-dl@npm:4.0.0"
|
||||
dependencies:
|
||||
ext-name: ^5.0.0
|
||||
pupa: ^3.1.0
|
||||
unused-filename: ^4.0.1
|
||||
checksum: 2c152be48bd66e9325f7e48ea53cdc41f2a8674361c6729117ebae2dc37ff22216ccf60545e8e554c89a505e350200ed8918a6011dd71e571c1b41553fb485ec
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"electron-is-dev@npm:^3.0.1":
|
||||
version: 3.0.1
|
||||
resolution: "electron-is-dev@npm:3.0.1"
|
||||
checksum: 0f3bb1ebac00ab25d541a5e6b2ba9c6cdbcb0875782bffd1b0a7e8d303f837669580febfc696f1ce2b0f79cc4bc529dd71f0bf4da5d934492003c9a9b833ec22
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"electron-store@npm:^10.0.0":
|
||||
version: 10.0.0
|
||||
resolution: "electron-store@npm:10.0.0"
|
||||
@ -571,6 +624,13 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"emoji-regex@npm:^10.3.0":
|
||||
version: 10.3.0
|
||||
resolution: "emoji-regex@npm:10.3.0"
|
||||
checksum: 5da48edfeb9462fb1ae5495cff2d79129974c696853fb0ce952cbf560f29a2756825433bf51cfd5157ec7b9f93f46f31d712e896d63e3d8ac9c3832bdb45ab73
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"end-of-stream@npm:^1.1.0":
|
||||
version: 1.4.4
|
||||
resolution: "end-of-stream@npm:1.4.4"
|
||||
@ -617,6 +677,13 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"escape-goat@npm:^4.0.0":
|
||||
version: 4.0.0
|
||||
resolution: "escape-goat@npm:4.0.0"
|
||||
checksum: 7034e0025eec7b751074b837f10312c5b768493265bdad046347c0aadbc1e652776f7e5df94766473fecb5d3681169cc188fe9ccc1e22be53318c18be1671cc0
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"escape-string-regexp@npm:^4.0.0":
|
||||
version: 4.0.0
|
||||
resolution: "escape-string-regexp@npm:4.0.0"
|
||||
@ -624,6 +691,13 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"escape-string-regexp@npm:^5.0.0":
|
||||
version: 5.0.0
|
||||
resolution: "escape-string-regexp@npm:5.0.0"
|
||||
checksum: 20daabe197f3cb198ec28546deebcf24b3dbb1a5a269184381b3116d12f0532e06007f4bc8da25669d6a7f8efb68db0758df4cd981f57bc5b57f521a3e12c59e
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"eslint-scope@npm:^8.0.1":
|
||||
version: 8.0.1
|
||||
resolution: "eslint-scope@npm:8.0.1"
|
||||
@ -735,6 +809,25 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"ext-list@npm:^2.0.0":
|
||||
version: 2.2.2
|
||||
resolution: "ext-list@npm:2.2.2"
|
||||
dependencies:
|
||||
mime-db: ^1.28.0
|
||||
checksum: 9b2426bea312e674eeced62c5f18407ab9a8653bbdfbde36492331c7973dab7fbf9e11d6c38605786168b42da333910314988097ca06eee61f1b9b57efae3f18
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"ext-name@npm:^5.0.0":
|
||||
version: 5.0.0
|
||||
resolution: "ext-name@npm:5.0.0"
|
||||
dependencies:
|
||||
ext-list: ^2.0.0
|
||||
sort-keys-length: ^1.0.0
|
||||
checksum: f598269bd5de4295540ea7d6f8f6a01d82a7508f148b7700a05628ef6121648d26e6e5e942049e953b3051863df6b54bd8fe951e7877f185e34ace5d44370b33
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"extract-zip@npm:^2.0.1":
|
||||
version: 2.0.1
|
||||
resolution: "extract-zip@npm:2.0.1"
|
||||
@ -866,6 +959,13 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"get-east-asian-width@npm:^1.0.0":
|
||||
version: 1.2.0
|
||||
resolution: "get-east-asian-width@npm:1.2.0"
|
||||
checksum: ea55f4d4a42c4b00d3d9be3111bc17eb0161f60ed23fc257c1390323bb780a592d7a8bdd550260fd4627dabee9a118cdfa3475ae54edca35ebcd3bdae04179e3
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"get-intrinsic@npm:^1.1.3, get-intrinsic@npm:^1.2.4":
|
||||
version: 1.2.4
|
||||
resolution: "get-intrinsic@npm:1.2.4"
|
||||
@ -1050,6 +1150,13 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"is-fullwidth-code-point@npm:^4.0.0":
|
||||
version: 4.0.0
|
||||
resolution: "is-fullwidth-code-point@npm:4.0.0"
|
||||
checksum: 8ae89bf5057bdf4f57b346fb6c55e9c3dd2549983d54191d722d5c739397a903012cc41a04ee3403fd872e811243ef91a7c5196da7b5841dc6b6aae31a264a8d
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"is-glob@npm:^4.0.0, is-glob@npm:^4.0.3":
|
||||
version: 4.0.3
|
||||
resolution: "is-glob@npm:4.0.3"
|
||||
@ -1066,6 +1173,13 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"is-plain-obj@npm:^1.0.0":
|
||||
version: 1.1.0
|
||||
resolution: "is-plain-obj@npm:1.1.0"
|
||||
checksum: 0ee04807797aad50859652a7467481816cbb57e5cc97d813a7dcd8915da8195dc68c436010bf39d195226cde6a2d352f4b815f16f26b7bf486a5754290629931
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"isexe@npm:^2.0.0":
|
||||
version: 2.0.0
|
||||
resolution: "isexe@npm:2.0.0"
|
||||
@ -1196,6 +1310,13 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"mime-db@npm:^1.28.0":
|
||||
version: 1.53.0
|
||||
resolution: "mime-db@npm:1.53.0"
|
||||
checksum: 3fd9380bdc0b085d0b56b580e4f89ca4fc3b823722310d795c248f0806b9a80afd5d8f4347f015ad943b9ecfa7cc0b71dffa0db96fa776d01a13474821a2c7fb
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"mime-types@npm:^2.1.12":
|
||||
version: 2.1.35
|
||||
resolution: "mime-types@npm:2.1.35"
|
||||
@ -1327,6 +1448,13 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"path-exists@npm:^5.0.0":
|
||||
version: 5.0.0
|
||||
resolution: "path-exists@npm:5.0.0"
|
||||
checksum: 8ca842868cab09423994596eb2c5ec2a971c17d1a3cb36dbf060592c730c725cd524b9067d7d2a1e031fef9ba7bd2ac6dc5ec9fb92aa693265f7be3987045254
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"path-key@npm:^3.1.0":
|
||||
version: 3.1.1
|
||||
resolution: "path-key@npm:3.1.1"
|
||||
@ -1349,6 +1477,7 @@ __metadata:
|
||||
axios: ^1.7.2
|
||||
bootstrap: ^4.5.3
|
||||
electron: ^31.2.1
|
||||
electron-context-menu: ^4.0.1
|
||||
electron-store: ^10.0.0
|
||||
eslint: ^9.5.0
|
||||
languageName: unknown
|
||||
@ -1392,6 +1521,15 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"pupa@npm:^3.1.0":
|
||||
version: 3.1.0
|
||||
resolution: "pupa@npm:3.1.0"
|
||||
dependencies:
|
||||
escape-goat: ^4.0.0
|
||||
checksum: 0e4f4ab6bbdce600fa6d23b1833f1af57b2641246ff4cbe10f9d66e4e5479b0de2864a88d5bd629eef59524eda3c6680726acd7f3f873d9ed46b7f095d0bb5f6
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"queue-microtask@npm:^1.2.2":
|
||||
version: 1.2.3
|
||||
resolution: "queue-microtask@npm:1.2.3"
|
||||
@ -1516,6 +1654,34 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"slice-ansi@npm:^5.0.0":
|
||||
version: 5.0.0
|
||||
resolution: "slice-ansi@npm:5.0.0"
|
||||
dependencies:
|
||||
ansi-styles: ^6.0.0
|
||||
is-fullwidth-code-point: ^4.0.0
|
||||
checksum: 7e600a2a55e333a21ef5214b987c8358fe28bfb03c2867ff2cbf919d62143d1812ac27b4297a077fdaf27a03da3678e49551c93e35f9498a3d90221908a1180e
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"sort-keys-length@npm:^1.0.0":
|
||||
version: 1.0.1
|
||||
resolution: "sort-keys-length@npm:1.0.1"
|
||||
dependencies:
|
||||
sort-keys: ^1.0.0
|
||||
checksum: f9acac5fb31580a9e3d43b419dc86a1b75e85b79036a084d95dd4d1062b621c9589906588ac31e370a0dd381be46d8dbe900efa306d087ca9c912d7a59b5a590
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"sort-keys@npm:^1.0.0":
|
||||
version: 1.1.2
|
||||
resolution: "sort-keys@npm:1.1.2"
|
||||
dependencies:
|
||||
is-plain-obj: ^1.0.0
|
||||
checksum: 5963fd191a2a185a5ec86f06e47721e8e04713eda43bb04ae60d2a8afb21241553dd5bc9d863ed2bd7c3d541b609b0c8d0e58836b1a3eb6764c09c094bcc8b00
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"sprintf-js@npm:^1.1.2":
|
||||
version: 1.1.3
|
||||
resolution: "sprintf-js@npm:1.1.3"
|
||||
@ -1523,6 +1689,17 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"string-width@npm:^7.0.0":
|
||||
version: 7.2.0
|
||||
resolution: "string-width@npm:7.2.0"
|
||||
dependencies:
|
||||
emoji-regex: ^10.3.0
|
||||
get-east-asian-width: ^1.0.0
|
||||
strip-ansi: ^7.1.0
|
||||
checksum: 42f9e82f61314904a81393f6ef75b832c39f39761797250de68c041d8ba4df2ef80db49ab6cd3a292923a6f0f409b8c9980d120f7d32c820b4a8a84a2598a295
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"strip-ansi@npm:^6.0.1":
|
||||
version: 6.0.1
|
||||
resolution: "strip-ansi@npm:6.0.1"
|
||||
@ -1532,6 +1709,15 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"strip-ansi@npm:^7.1.0":
|
||||
version: 7.1.0
|
||||
resolution: "strip-ansi@npm:7.1.0"
|
||||
dependencies:
|
||||
ansi-regex: ^6.0.1
|
||||
checksum: 859c73fcf27869c22a4e4d8c6acfe690064659e84bef9458aa6d13719d09ca88dcfd40cbf31fd0be63518ea1a643fe070b4827d353e09533a5b0b9fd4553d64d
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"strip-json-comments@npm:^3.1.1":
|
||||
version: 3.1.1
|
||||
resolution: "strip-json-comments@npm:3.1.1"
|
||||
@ -1615,6 +1801,16 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"unused-filename@npm:^4.0.1":
|
||||
version: 4.0.1
|
||||
resolution: "unused-filename@npm:4.0.1"
|
||||
dependencies:
|
||||
escape-string-regexp: ^5.0.0
|
||||
path-exists: ^5.0.0
|
||||
checksum: ca15d4957b8a3bac538480eb523f4e7f4a99e1cf4ecd6e4a678c95c89f8ee8202056514380fb89e455efef75440f7c091bfa845f488bdcf220219ac87468d4b2
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"uri-js@npm:^4.2.2, uri-js@npm:^4.4.1":
|
||||
version: 4.4.1
|
||||
resolution: "uri-js@npm:4.4.1"
|
||||
|
@ -36,6 +36,7 @@ import usePreferences from '../../../../../../preferences/static/js/store';
|
||||
import pgAdmin from 'sources/pgadmin';
|
||||
import { styled } from '@mui/material/styles';
|
||||
import BeforeUnload from './BeforeUnload';
|
||||
import { isMac } from '../../../../../../static/js/keyboard_shortcuts';
|
||||
|
||||
/* Custom react-diagram action for keyboard events */
|
||||
export class KeyboardShortcutAction extends Action {
|
||||
@ -52,7 +53,7 @@ export class KeyboardShortcutAction extends Action {
|
||||
for(let shortcut_val of shortcut_handlers){
|
||||
let [key, handler] = shortcut_val;
|
||||
if(key) {
|
||||
this.shortcuts[this.shortcutKey(key.alt, key.ctrl_is_meta ? false : key.control, key.shift, Boolean(key.ctrl_is_meta), key.key.key_code)] = handler;
|
||||
this.shortcuts[this.shortcutKey(key.alt, (isMac() && key.ctrl_is_meta) ? false : key.control, key.shift, isMac() && Boolean(key.ctrl_is_meta), key.key.key_code)] = handler;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user