⬆️ 升级 electron 到 26

This commit is contained in:
muwoo
2023-08-22 13:52:47 +08:00
parent 6e5a08b9d8
commit d2d94c13b7
21 changed files with 199 additions and 196 deletions

View File

@@ -1,89 +1,86 @@
import { app } from "electron";
import path from "path";
import { app } from 'electron';
import path from 'path';
const appPath = app.getPath("cache");
const appPath = app.getPath('userData');
console.log(appPath);
const PLUGIN_INSTALL_DIR = path.join(appPath, "./rubick-plugins");
const PLUGIN_INSTALL_DIR = path.join(appPath, './rubick-plugins');
const DECODE_KEY = {
Backspace: "Backspace",
Tab: "Tab",
Enter: "Enter",
MediaPlayPause: "MediaPlayPause",
Escape: "Escape",
Space: "Space",
PageUp: "PageUp",
PageDown: "PageDown",
End: "End",
Home: "Home",
ArrowLeft: "Left",
ArrowUp: "Up",
ArrowRight: "Right",
ArrowDown: "Down",
PrintScreen: "PrintScreen",
Insert: "Insert",
Delete: "Delete",
Digit0: "0",
Digit1: "1",
Digit2: "2",
Digit3: "3",
Digit4: "4",
Digit5: "5",
Digit6: "6",
Digit7: "7",
Digit8: "8",
Digit9: "9",
KeyA: "A",
KeyB: "B",
KeyC: "C",
KeyD: "D",
KeyE: "E",
KeyF: "F",
KeyG: "G",
KeyH: "H",
KeyI: "I",
KeyJ: "J",
KeyK: "K",
KeyL: "L",
KeyM: "M",
KeyN: "N",
KeyO: "O",
KeyP: "P",
KeyQ: "Q",
KeyR: "R",
KeyS: "S",
KeyT: "T",
KeyU: "U",
KeyV: "V",
KeyW: "W",
KeyX: "X",
KeyY: "Y",
KeyZ: "Z",
F1: "F1",
F2: "F2",
F3: "F3",
F4: "F4",
F5: "F5",
F6: "F6",
F7: "F7",
F8: "F8",
F9: "F9",
F10: "F10",
F11: "F11",
F12: "F12",
Semicolon: ";",
Equal: "=",
Comma: ",",
Minus: "-",
Period: ".",
Slash: "/",
Backquote: "`",
BracketLeft: "[",
Backslash: "\\",
BracketRight: "]",
Backspace: 'Backspace',
Tab: 'Tab',
Enter: 'Enter',
MediaPlayPause: 'MediaPlayPause',
Escape: 'Escape',
Space: 'Space',
PageUp: 'PageUp',
PageDown: 'PageDown',
End: 'End',
Home: 'Home',
ArrowLeft: 'Left',
ArrowUp: 'Up',
ArrowRight: 'Right',
ArrowDown: 'Down',
PrintScreen: 'PrintScreen',
Insert: 'Insert',
Delete: 'Delete',
Digit0: '0',
Digit1: '1',
Digit2: '2',
Digit3: '3',
Digit4: '4',
Digit5: '5',
Digit6: '6',
Digit7: '7',
Digit8: '8',
Digit9: '9',
KeyA: 'A',
KeyB: 'B',
KeyC: 'C',
KeyD: 'D',
KeyE: 'E',
KeyF: 'F',
KeyG: 'G',
KeyH: 'H',
KeyI: 'I',
KeyJ: 'J',
KeyK: 'K',
KeyL: 'L',
KeyM: 'M',
KeyN: 'N',
KeyO: 'O',
KeyP: 'P',
KeyQ: 'Q',
KeyR: 'R',
KeyS: 'S',
KeyT: 'T',
KeyU: 'U',
KeyV: 'V',
KeyW: 'W',
KeyX: 'X',
KeyY: 'Y',
KeyZ: 'Z',
F1: 'F1',
F2: 'F2',
F3: 'F3',
F4: 'F4',
F5: 'F5',
F6: 'F6',
F7: 'F7',
F8: 'F8',
F9: 'F9',
F10: 'F10',
F11: 'F11',
F12: 'F12',
Semicolon: ';',
Equal: '=',
Comma: ',',
Minus: '-',
Period: '.',
Slash: '/',
Backquote: '`',
BracketLeft: '[',
Backslash: '\\',
BracketRight: ']',
Quote: "'",
};