diff --git a/src/common/monaco/lexerRules.ts b/src/common/monaco/lexerRules.ts index 5d6bf06a..fd0c17cd 100644 --- a/src/common/monaco/lexerRules.ts +++ b/src/common/monaco/lexerRules.ts @@ -179,5 +179,9 @@ export const search = { { open: `'`, close: `'` }, { open: '"', close: '"' }, ], + comments: { + lineComment: '//', + blockComment: ['/*', '*/'], + }, }, }; diff --git a/src/components/VersionDetect.vue b/src/components/VersionDetect.vue index a79c38be..90378ad7 100644 --- a/src/components/VersionDetect.vue +++ b/src/components/VersionDetect.vue @@ -65,7 +65,7 @@ const getLatestReleaseInfo = async (): Promise<{ return { version: data.tag_name, assets }; }; const getLatestLink = async () => { - return 'https://github.com/geek-fun/dockit/releases'; + return 'https://dockit.geekfun.club/download.html'; }; onMounted(async () => { diff --git a/src/views/editor/index.vue b/src/views/editor/index.vue index 0b86ef30..5628c93e 100644 --- a/src/views/editor/index.vue +++ b/src/views/editor/index.vue @@ -258,6 +258,11 @@ const setupQueryEditor = (code: string) => { } }); + // comments/uncomment line or block + queryEditor.addCommand(monaco.KeyMod.CtrlCmd | monaco.KeyCode.Slash, () => { + queryEditor!.trigger('keyboard', 'editor.action.commentLine', {}); + }); + // Auto indent current request queryEditor.addCommand(monaco.KeyMod.CtrlCmd | monaco.KeyCode.KeyI, () => { const { position } = getAction(queryEditor!.getPosition()) || {}; @@ -331,7 +336,7 @@ const setupQueryEditor = (code: string) => { }); // Open the documentation for the current action - queryEditor.addCommand(monaco.KeyMod.CtrlCmd | monaco.KeyCode.Slash, () => { + queryEditor.addCommand(monaco.KeyMod.CtrlCmd | monaco.KeyCode.KeyD, () => { const docLink = getActionApiDoc( EngineType.ELASTICSEARCH, 'current',