Skip to content

Commit

Permalink
feat: add context menu (blib-la#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelass committed Feb 16, 2024
1 parent b66819f commit bb030dd
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 21 deletions.
7 changes: 7 additions & 0 deletions main/background.ts
@@ -1,6 +1,7 @@
import path from "path";

import { app, protocol, shell, Menu } from "electron";
import contextMenu from "electron-context-menu";
import serve from "electron-serve";

import i18next from "../next-i18next.config.js";
Expand All @@ -14,8 +15,14 @@ import { init } from "./init";
import { getInstalledVersion } from "./utils/first-launch";
import "./live-painting";
import "./datasets";

import "./captions";

contextMenu({
showSaveImageAs: true,
showSearchWithGoogle: false,
});

app.commandLine.appendSwitch("enable-smooth-scrolling");

if (isProduction) {
Expand Down
46 changes: 28 additions & 18 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions package.json
Expand Up @@ -22,10 +22,11 @@
"test:unit": "jest --runInBand --config jest.config.unit.mjs --verbose"
},
"dependencies": {
"electron-dl": "^3.5.1",
"electron-serve": "^1.3.0",
"electron-dl": "3.5.1",
"electron-serve": "1.3.0",
"electron-store": "^8.1.0",
"sharp": "^0.33.2"
"electron-context-menu": "3.6.1",
"sharp": "0.33.2"
},
"devDependencies": {
"@commitlint/cli": "^18.6.0",
Expand Down
2 changes: 2 additions & 0 deletions renderer/ions/styles/index.tsx
Expand Up @@ -3,6 +3,8 @@ import { css, Global } from "@emotion/react";
export const globalStyles = (
<Global
styles={css({
"*": { userSelect: "none" },
"input, textarea, [contenteditable], select": { userSelect: "unset" },
":root": {
"--safe-area-inset-top": "env(safe-area-inset-top)",
"--safe-area-inset-bottom": "env(safe-area-inset-bottom)",
Expand Down

0 comments on commit bb030dd

Please sign in to comment.