Skip to content

Commit

Permalink
open logs folder
Browse files Browse the repository at this point in the history
  • Loading branch information
corn-potage committed Jul 10, 2024
1 parent 59b7b20 commit 1f4fd47
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions assets/locales/en/windowMenu.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

"Help": "Help",
"NiceNodeWebsite": "NiceNode website",
"OpenLogs": "Open Logs",
"ReportAProblem": "Report a problem",
"RemoveAllNodesAndData": "Remove all nodes and data",
"UninstallPodman": "Uninstall Podman",
Expand Down
12 changes: 12 additions & 0 deletions src/main/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
getSetHasSeenAlphaModal,
getSetHasSeenSplashscreen,
} from './state/settings';
import path from 'node:path';

import { runBenchmark } from './benchbuddy/runBenchmark';
import { getDebugInfoString, getGithubIssueProblemURL } from './debug';
Expand Down Expand Up @@ -233,6 +234,17 @@ export default class MenuBuilder {
shell.openExternal(url);
},
},
{
label: t('OpenLogs'),
click: async () => {
const logFolderPath = path.join(app.getPath('userData'), 'logs');
shell.openPath(logFolderPath).then((result) => {
if (result) {
console.error('Error opening log folder:', result);
}
});
},
},
{
label: t('CopyConfigurationDetailsToClipboard'),
click: async () => {
Expand Down

0 comments on commit 1f4fd47

Please sign in to comment.