mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2025-08-04 05:18:19 +00:00
Add log level selection to help menu (#511)
* Add log level selection to help menu * Show keyboard shortcuts in loglevel menu items
This commit is contained in:
parent
492025e79b
commit
62fc269b8a
2 changed files with 30 additions and 1 deletions
|
@ -170,7 +170,21 @@ function makeMenuEntries(editor: EditorState): MenuListEntries {
|
|||
{ label: "Report a Bug", action: (): unknown => window.open("https://github.com/GraphiteEditor/Graphite/issues/new", "_blank") },
|
||||
{ label: "Visit on GitHub", action: (): unknown => window.open("https://github.com/GraphiteEditor/Graphite", "_blank") },
|
||||
],
|
||||
[{ label: "Debug: Panic (DANGER)", action: async (): Promise<void> => editor.rawWasm.intentional_panic() }],
|
||||
[
|
||||
{
|
||||
label: "Debug: Set Log Level",
|
||||
// TODO: Remove empty action after merge of (https://github.com/GraphiteEditor/Graphite/pull/338)
|
||||
action: (): void => undefined,
|
||||
children: [
|
||||
[
|
||||
{ label: "Log Level Info", action: async (): Promise<void> => editor.instance.log_level_info(), shortcut: ["Key1"] },
|
||||
{ label: "Log Level Debug", action: async (): Promise<void> => editor.instance.log_level_debug(), shortcut: ["Key2"] },
|
||||
{ label: "Log Level Trace", action: async (): Promise<void> => editor.instance.log_level_trace(), shortcut: ["Key3"] },
|
||||
],
|
||||
],
|
||||
},
|
||||
{ label: "Debug: Panic (DANGER)", action: async (): Promise<void> => editor.rawWasm.intentional_panic() },
|
||||
],
|
||||
],
|
||||
},
|
||||
];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue