File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -204,6 +204,14 @@ const markdownMenuItems: MenuConfig[] = [
204204 click : ( ) => send ( 'main-menu:preview-mindmap' ) ,
205205 accelerator : 'CommandOrControl+Shift+I' ,
206206 } ,
207+ {
208+ type : 'separator' ,
209+ } ,
210+ {
211+ label : i18n . t ( 'menu:markdown.presentationMode' ) ,
212+ click : ( ) => send ( 'main-menu:presentation-mode' ) ,
213+ accelerator : 'CommandOrControl+Shift+P' ,
214+ } ,
207215]
208216
209217const menuItems : MenuItemConstructorOptions [ ] = [
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ type MainMenuAction =
1818 | 'preview-markdown'
1919 | 'preview-mindmap'
2020 | 'preview-code'
21+ | 'presentation-mode'
2122
2223type DBAction = 'relaod' | 'move' | 'migrate' | 'clear'
2324type SystemAction = 'reload' | 'open-external'
Original file line number Diff line number Diff line change @@ -4,7 +4,12 @@ import { router, RouterName } from '@/router'
44
55const { createSnippetAndSelect, addFragment } = useSnippets ( )
66const { createFolderAndSelect } = useFolders ( )
7- const { isShowMarkdown, isShowMindmap, isShowCodePreview } = useApp ( )
7+ const {
8+ isShowMarkdown,
9+ isShowMindmap,
10+ isShowCodePreview,
11+ isShowMarkdownPresentation,
12+ } = useApp ( )
813
914export function registerMainMenuListeners ( ) {
1015 ipc . on ( 'main-menu:goto-preferences' , ( ) => {
@@ -34,4 +39,9 @@ export function registerMainMenuListeners() {
3439 ipc . on ( 'main-menu:preview-code' , ( ) => {
3540 isShowCodePreview . value = ! isShowCodePreview . value
3641 } )
42+
43+ ipc . on ( 'main-menu:presentation-mode' , ( ) => {
44+ isShowMarkdownPresentation . value = ! isShowMarkdownPresentation . value
45+ router . push ( { name : RouterName . markdownPresentation } )
46+ } )
3747}
You can’t perform that action at this time.
0 commit comments