From 6db96d6687205654705742911cd4d38d574bc017 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=94=A6=E5=BF=83?= <41134017+Lhcfl@users.noreply.github.com> Date: Mon, 22 Jul 2024 16:14:22 +0800 Subject: [PATCH] FEATURE: Add shortcut keys for save and execute for query editor (#299) This is a very simple change that adds two shortcuts to the query editor in Data Explorer: `ctrl+s` to save, and `ctrl+enter` to save and run the query. Related meta topic: https://meta.discourse.org/t/wishlist-ctrl-enter-to-run-the-data-explorer-query-im-editing/280564 --- .../javascripts/discourse/templates/admin/plugins-explorer.hbs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/assets/javascripts/discourse/templates/admin/plugins-explorer.hbs b/assets/javascripts/discourse/templates/admin/plugins-explorer.hbs index a99fd1e..f629aee 100644 --- a/assets/javascripts/discourse/templates/admin/plugins-explorer.hbs +++ b/assets/javascripts/discourse/templates/admin/plugins-explorer.hbs @@ -128,6 +128,8 @@ @mode="sql" @disabled={{this.selectedItem.destroyed}} {{on "click" this.setDirty}} + @save={{this.save}} + @submit={{this.saveAndRun}} />