add settings & quit shortcut
This commit is contained in:
@@ -54,6 +54,10 @@ app.on("ready", async () => {
|
||||
globalShortcut.register("CommandOrControl+Shift+I", () => {
|
||||
mainWindow.win.webContents.toggleDevTools();
|
||||
});
|
||||
|
||||
globalShortcut.register("CommandOrControl+Q", () => {
|
||||
app.quit();
|
||||
});
|
||||
});
|
||||
|
||||
// Quit when all windows are closed, except on macOS. There, it's common
|
||||
|
||||
@@ -11,7 +11,6 @@ import {
|
||||
HeadphonesIcon,
|
||||
VideoIcon,
|
||||
NewspaperIcon,
|
||||
BookOpenTextIcon,
|
||||
BookMarkedIcon,
|
||||
UserIcon,
|
||||
BotIcon,
|
||||
@@ -20,11 +19,17 @@ import { useLocation, Link } from "react-router-dom";
|
||||
import { t } from "i18next";
|
||||
import { Preferences } from "@renderer/components";
|
||||
import { Tooltip } from "react-tooltip";
|
||||
import { useHotkeys } from "react-hotkeys-hook";
|
||||
|
||||
export const Sidebar = () => {
|
||||
const location = useLocation();
|
||||
const activeTab = location.pathname;
|
||||
|
||||
useHotkeys("Control+Comma", () => {
|
||||
console.log("open preferences");
|
||||
document.getElementById("preferences-button")?.click();
|
||||
});
|
||||
|
||||
return (
|
||||
<div className="h-[100vh] w-20 xl:w-48 2xl:w-64 transition-all relative">
|
||||
<div className="fixed top-0 left-0 h-full w-20 xl:w-48 2xl:w-64">
|
||||
@@ -210,6 +215,7 @@ export const Sidebar = () => {
|
||||
? "secondary"
|
||||
: "ghost"
|
||||
}
|
||||
id="preferences-button"
|
||||
className="w-full xl:justify-start"
|
||||
data-tooltip-id="sidebar-tooltip"
|
||||
data-tooltip-content={t("sidebar.preferences")}
|
||||
|
||||
Reference in New Issue
Block a user