Git Product home page Git Product logo

Comments (10)

EhsanFox avatar EhsanFox commented on June 29, 2024

when i click, it won't open anything.......

from electron-context-menu.

 avatar commented on June 29, 2024

We can't help if you don't provide more info :/

And also, you shouldn't ask for help here. I come from the electron.js discord server, there we can help you! This is only to track bugs and other stuff.

from electron-context-menu.

EhsanFox avatar EhsanFox commented on June 29, 2024

well, this kinda looks like a bug, it works before building/packaging the app, but not afterward.

from electron-context-menu.

EhsanFox avatar EhsanFox commented on June 29, 2024

for more information, I just did what it said on example, it works fine in the dev process

from electron-context-menu.

 avatar commented on June 29, 2024

for more information, I just did what it said on example, it works fine in the dev process

We don't know which app isn't working or how we should repro this issue :/. Maybe create a repro gist or link your repo?

from electron-context-menu.

EhsanFox avatar EhsanFox commented on June 29, 2024

well, the app is private, but the context menu (literally the example code) in the readme is not working on the production......
i opened a help channel in Electron discord server too (channel number 9)

from electron-context-menu.

EhsanFox avatar EhsanFox commented on June 29, 2024

here is the code:

const ctxMenu = require("electron-context-menu");
ctxMenu({
        window: mainTab,
        labels: {
            copy: "πŸ“„ | Copy",
            paste: "πŸ“‹ | Paste",
            cut: "βœ‚ | Cut"
        },

        /* Context Menu Items */
        menu: (actions, params, win, dicSuggestion) => [
            /* Custom Buttons */
            {
                label: 'WinTube v'+version,
                icon: path.resolve(__dirname, "..", "..", "src", "icons", "main-min.png"),
                enabled: false,
            },
            {
                label: 'Discord Server',
                icon: path.resolve(__dirname, "..", "..", "src", "icons", "discord.png"),
                click: () => open('https://discord.gg/GBDkr9T')
            },
            actions.separator(),
            /* System Buttons */
            actions.copy(),
            actions.cut(),
            actions.paste(),
            actions.separator(),
            /* Public Buttons */
            {
                label: "Exit",
                icon: path.resolve(__dirname, "..", "..", "src", "icons", "shutdown.png"),
                click: () => app.quit()
            },
            
            /* Dev Buttons */
            {
                label: 'Developer Tools',
                icon: path.resolve(__dirname, "..", "..", "src", "icons", "dev-tools.png"),
                click: () => mainTab.webContents.openDevTools(),
                visible: isDev
            },
        ]
    });
    
    it's on 'ready' event btw.

from electron-context-menu.

 avatar commented on June 29, 2024

Where is this code? Main thread? Renderer thread?

from electron-context-menu.

EhsanFox avatar EhsanFox commented on June 29, 2024

app ready event is obviously on the main thread

from electron-context-menu.

nop33 avatar nop33 commented on June 29, 2024

Are you sure you didn't install it as a dev dependency?

from electron-context-menu.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.