From b8584db48f39e13c5228d7c0bc50af68182ca469 Mon Sep 17 00:00:00 2001 From: Jan Prochazka Date: Sun, 13 Feb 2022 10:47:50 +0100 Subject: [PATCH] new json lines command --- app/src/mainMenuDefinition.js | 7 ++----- packages/web/src/commands/stdCommands.ts | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/app/src/mainMenuDefinition.js b/app/src/mainMenuDefinition.js index cb999f0eb..40bf94b1e 100644 --- a/app/src/mainMenuDefinition.js +++ b/app/src/mainMenuDefinition.js @@ -21,6 +21,7 @@ module.exports = [ { command: 'new.query', hideDisabled: true }, { command: 'new.freetable', hideDisabled: true }, { command: 'new.shell', hideDisabled: true }, + { command: 'new.jsonl', hideDisabled: true }, { divider: true }, { command: 'tabs.closeTab', hideDisabled: true }, { command: 'tabs.closeAll', hideDisabled: true }, @@ -52,11 +53,7 @@ module.exports = [ }, { label: 'Tools', - submenu: [ - { command: 'sql.generator' }, - { command: 'file.import' }, - { command: 'new.modelCompare' }, - ], + submenu: [{ command: 'sql.generator' }, { command: 'file.import' }, { command: 'new.modelCompare' }], }, { label: 'Help', diff --git a/packages/web/src/commands/stdCommands.ts b/packages/web/src/commands/stdCommands.ts index 460a26947..9ad588f5e 100644 --- a/packages/web/src/commands/stdCommands.ts +++ b/packages/web/src/commands/stdCommands.ts @@ -259,6 +259,21 @@ registerCommand({ }, }); +registerCommand({ + id: 'new.jsonl', + category: 'New', + icon: 'img archive', + name: 'JSON Lines', + menuName: 'New JSON lines file', + onClick: () => { + openNewTab({ + title: 'Lines #', + icon: 'img archive', + tabComponent: 'JsonLinesEditorTab', + }); + }, +}); + registerCommand({ id: 'new.sqliteDatabase', category: 'New',