mirror of
https://github.com/CringeStudios/element-desktop.git
synced 2025-01-18 23:44:59 +01:00
Update all non-major dependencies (#1879)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
78b00471ff
commit
0edde6735f
@ -79,7 +79,7 @@
|
||||
"@babel/core": "^7.18.10",
|
||||
"@babel/preset-env": "^7.18.10",
|
||||
"@babel/preset-typescript": "^7.18.6",
|
||||
"@electron/asar": "^3.2.3",
|
||||
"@electron/asar": "3.2.10",
|
||||
"@electron/fuses": "^1.7.0",
|
||||
"@mapbox/node-pre-gyp": "^1.0.11",
|
||||
"@playwright/test": "1.48.0",
|
||||
|
@ -176,15 +176,18 @@ function onLinkContextMenu(ev: Event, params: ContextMenuParams, webContents: We
|
||||
ev.preventDefault();
|
||||
}
|
||||
|
||||
function cutCopyPasteSelectContextMenus(params: ContextMenuParams): MenuItemConstructorOptions[] {
|
||||
function cutCopyPasteSelectContextMenus(
|
||||
params: ContextMenuParams,
|
||||
webContents: WebContents,
|
||||
): MenuItemConstructorOptions[] {
|
||||
const options: MenuItemConstructorOptions[] = [];
|
||||
|
||||
if (params.misspelledWord) {
|
||||
params.dictionarySuggestions.forEach((word) => {
|
||||
options.push({
|
||||
label: word,
|
||||
click: (menuItem, browserWindow) => {
|
||||
browserWindow?.webContents.replaceMisspelling(word);
|
||||
click: () => {
|
||||
webContents.replaceMisspelling(word);
|
||||
},
|
||||
});
|
||||
});
|
||||
@ -194,8 +197,8 @@ function cutCopyPasteSelectContextMenus(params: ContextMenuParams): MenuItemCons
|
||||
},
|
||||
{
|
||||
label: _t("right_click_menu|add_to_dictionary"),
|
||||
click: (menuItem, browserWindow) => {
|
||||
browserWindow?.webContents.session.addWordToSpellCheckerDictionary(params.misspelledWord);
|
||||
click: () => {
|
||||
webContents.session.addWordToSpellCheckerDictionary(params.misspelledWord);
|
||||
},
|
||||
},
|
||||
{
|
||||
@ -237,8 +240,8 @@ function cutCopyPasteSelectContextMenus(params: ContextMenuParams): MenuItemCons
|
||||
return options;
|
||||
}
|
||||
|
||||
function onSelectedContextMenu(ev: Event, params: ContextMenuParams): void {
|
||||
const items = cutCopyPasteSelectContextMenus(params);
|
||||
function onSelectedContextMenu(ev: Event, params: ContextMenuParams, webContents: WebContents): void {
|
||||
const items = cutCopyPasteSelectContextMenus(params, webContents);
|
||||
const popupMenu = Menu.buildFromTemplate(items);
|
||||
|
||||
// popup() requires an options object even for no options
|
||||
@ -246,12 +249,12 @@ function onSelectedContextMenu(ev: Event, params: ContextMenuParams): void {
|
||||
ev.preventDefault();
|
||||
}
|
||||
|
||||
function onEditableContextMenu(ev: Event, params: ContextMenuParams): void {
|
||||
function onEditableContextMenu(ev: Event, params: ContextMenuParams, webContents: WebContents): void {
|
||||
const items: MenuItemConstructorOptions[] = [
|
||||
{ role: "undo" },
|
||||
{ role: "redo", enabled: params.editFlags.canRedo },
|
||||
{ type: "separator" },
|
||||
...cutCopyPasteSelectContextMenus(params),
|
||||
...cutCopyPasteSelectContextMenus(params, webContents),
|
||||
];
|
||||
|
||||
const popupMenu = Menu.buildFromTemplate(items);
|
||||
@ -286,9 +289,9 @@ export default (webContents: WebContents): void => {
|
||||
if (params.linkURL || params.srcURL) {
|
||||
onLinkContextMenu(ev, params, webContents);
|
||||
} else if (params.selectionText) {
|
||||
onSelectedContextMenu(ev, params);
|
||||
onSelectedContextMenu(ev, params, webContents);
|
||||
} else if (params.isEditable) {
|
||||
onEditableContextMenu(ev, params);
|
||||
onEditableContextMenu(ev, params, webContents);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -973,7 +973,7 @@
|
||||
ajv "^6.12.0"
|
||||
ajv-keywords "^3.4.1"
|
||||
|
||||
"@electron/asar@^3.2.3":
|
||||
"@electron/asar@3.2.10":
|
||||
version "3.2.10"
|
||||
resolved "https://registry.yarnpkg.com/@electron/asar/-/asar-3.2.10.tgz#615cf346b734b23cafa4e0603551010bd0e50aa8"
|
||||
integrity sha512-mvBSwIBUeiRscrCeJE1LwctAriBj65eUDm0Pc11iE5gRwzkmsdbS7FnZ1XUWjpSeQWL1L5g12Fc/SchPM9DUOw==
|
||||
|
Loading…
Reference in New Issue
Block a user