Skip to content

Commit

Permalink
feat: help menu
Browse files Browse the repository at this point in the history
  • Loading branch information
DIYgod committed Jul 11, 2024
1 parent 1f2dfeb commit 8fde72d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 21 deletions.
32 changes: 12 additions & 20 deletions src/main/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,37 +29,29 @@ export const registerAppMenu = () => {
{ role: "editMenu" },
{ role: "viewMenu" },
{ role: "windowMenu" },
{ role: "help" },
]

if (import.meta.env.DEV) {
menus.push({
label: "Dev",
{
role: "help",
submenu: [
{
label: "Open log file",
click: async () => {
await revealLogFile()
},
},
],
},
]

if (import.meta.env.DEV) {
menus.push({
label: "Debug",
submenu: [
{
label: "follow https://rsshub.app/twitter/user/DIYgod",
click: () => {
createWindow({
extraPath: `#add?url=${encodeURIComponent(
"https://rsshub.app/twitter/user/DIYgod",
)}`,
width: 800,
height: 600,
})
},
},
{
label: "follow https://diygod.me/feed",
label: "follow https://github.com/RSSNext/follow/releases.atom",
click: () => {
createWindow({
extraPath: `#add?url=${encodeURIComponent(
"https://diygod.me/feed",
"https://github.com/RSSNext/follow/releases.atom",
)}`,
width: 800,
height: 600,
Expand Down
2 changes: 1 addition & 1 deletion src/main/updater/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { getMainWindow } from "../window"
import { CustomGitHubProvider } from "./custom-github-provider"

// skip auto update in dev mode
const disabled = false
const disabled = isDev

export const quitAndInstall = async () => {
autoUpdater.quitAndInstall()
Expand Down

0 comments on commit 8fde72d

Please sign in to comment.