Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
Update versions of various dependencies. Notably electron from 32 to 34
since 34 improves wayland IME support.
  • Loading branch information
poscat0x04 committed Mar 7, 2025
1 parent 13f3818 commit 28e8038
Show file tree
Hide file tree
Showing 4 changed files with 4,786 additions and 2,277 deletions.
8 changes: 4 additions & 4 deletions app/main/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ function getToolsSubmenu(): MenuItemConstructorOptions[] {
accelerator:
process.platform === "darwin" ? "Alt+Command+I" : "Ctrl+Shift+I",
click(_item, focusedWindow) {
if (focusedWindow) {
if (focusedWindow && focusedWindow instanceof BrowserWindow) {
focusedWindow.webContents.openDevTools({mode: "undocked"});
}
},
Expand Down Expand Up @@ -222,7 +222,7 @@ function getViewSubmenu(): MenuItemConstructorOptions[] {
{
label: t.__("Toggle Tray Icon"),
click(_item, focusedWindow) {
if (focusedWindow) {
if (focusedWindow && focusedWindow instanceof BrowserWindow) {
send(focusedWindow.webContents, "toggletray");
}
},
Expand All @@ -231,7 +231,7 @@ function getViewSubmenu(): MenuItemConstructorOptions[] {
label: t.__("Toggle Sidebar"),
accelerator: "CommandOrControl+Shift+S",
click(_item, focusedWindow) {
if (focusedWindow) {
if (focusedWindow && focusedWindow instanceof BrowserWindow) {
const newValue = !ConfigUtil.getConfigItem("showSidebar", true);
send(focusedWindow.webContents, "toggle-sidebar", newValue);
ConfigUtil.setConfigItem("showSidebar", newValue);
Expand All @@ -243,7 +243,7 @@ function getViewSubmenu(): MenuItemConstructorOptions[] {
checked: ConfigUtil.getConfigItem("autoHideMenubar", false),
visible: process.platform !== "darwin",
click(_item, focusedWindow) {
if (focusedWindow) {
if (focusedWindow && focusedWindow instanceof BrowserWindow) {
const newValue = !ConfigUtil.getConfigItem("autoHideMenubar", false);
focusedWindow.autoHideMenuBar = newValue;
focusedWindow.setMenuBarVisibility(!newValue);
Expand Down
13 changes: 8 additions & 5 deletions app/renderer/js/components/webview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ export default class WebView {
}

back(): void {
if (this.getWebContents().canGoBack()) {
this.getWebContents().goBack();
if (this.getWebContents().navigationHistory.canGoBack()) {
this.getWebContents().navigationHistory.goBack();
this.focus();
}
}
Expand All @@ -194,12 +194,15 @@ export default class WebView {
const $backButton = document.querySelector(
"#actions-container #back-action",
)!;
$backButton.classList.toggle("disable", !this.getWebContents().canGoBack());
$backButton.classList.toggle(
"disable",
!this.getWebContents().navigationHistory.canGoBack(),
);
}

forward(): void {
if (this.getWebContents().canGoForward()) {
this.getWebContents().goForward();
if (this.getWebContents().navigationHistory.canGoForward()) {
this.getWebContents().navigationHistory.goForward();
}
}

Expand Down
Loading

0 comments on commit 28e8038

Please sign in to comment.