From 9d6fd7871b927e3597f8eefe63ab34370d0bc04e Mon Sep 17 00:00:00 2001 From: hstyi Date: Tue, 7 Jan 2025 11:06:38 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=94=AF=E6=8C=81=E5=9C=A8=20Find=20Ev?= =?UTF-8?q?erywhere=20=E4=B8=AD=E5=BF=AB=E9=80=9F=E6=89=93=E5=BC=80?= =?UTF-8?q?=E6=9C=AC=E5=9C=B0=E7=BB=88=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../QuickCommandFindEverywhereProvider.kt | 18 ++++++++++++++++++ src/main/resources/i18n/messages.properties | 1 + .../resources/i18n/messages_zh_CN.properties | 1 + .../resources/i18n/messages_zh_TW.properties | 1 + 4 files changed, 21 insertions(+) diff --git a/src/main/kotlin/app/termora/findeverywhere/QuickCommandFindEverywhereProvider.kt b/src/main/kotlin/app/termora/findeverywhere/QuickCommandFindEverywhereProvider.kt index ebe456b..e7883b0 100644 --- a/src/main/kotlin/app/termora/findeverywhere/QuickCommandFindEverywhereProvider.kt +++ b/src/main/kotlin/app/termora/findeverywhere/QuickCommandFindEverywhereProvider.kt @@ -15,6 +15,24 @@ class QuickCommandFindEverywhereProvider : FindEverywhereProvider { list.add(CreateHostFindEverywhereResult()) } + // Local terminal + list.add(ActionFindEverywhereResult(object : AnAction( + I18n.getString("termora.find-everywhere.quick-command.local-terminal"), + Icons.terminal + ) { + override fun actionPerformed(evt: ActionEvent) { + ActionManager.getInstance().getAction(Actions.OPEN_HOST) + ?.actionPerformed( + OpenHostActionEvent( + this, Host( + name = name, + protocol = Protocol.Local + ) + ) + ) + } + })) + // SFTP list.add(ActionFindEverywhereResult(object : AnAction("SFTP", Icons.fileTransfer) { override fun actionPerformed(evt: ActionEvent) { diff --git a/src/main/resources/i18n/messages.properties b/src/main/resources/i18n/messages.properties index 556df36..56eb60c 100644 --- a/src/main/resources/i18n/messages.properties +++ b/src/main/resources/i18n/messages.properties @@ -99,6 +99,7 @@ termora.find-everywhere.groups.open-new-hosts=Open a new host termora.find-everywhere.groups.opened-hosts=Opened hosts termora.find-everywhere.groups.tools=Tools termora.find-everywhere.groups.settings=${termora.setting} +termora.find-everywhere.quick-command.local-terminal=Local Terminal # Welcome termora.welcome.my-hosts=My hosts diff --git a/src/main/resources/i18n/messages_zh_CN.properties b/src/main/resources/i18n/messages_zh_CN.properties index 4f7a425..ffa0452 100644 --- a/src/main/resources/i18n/messages_zh_CN.properties +++ b/src/main/resources/i18n/messages_zh_CN.properties @@ -58,6 +58,7 @@ termora.find-everywhere.groups.open-new-hosts=打开新的主机 termora.find-everywhere.groups.opened-hosts=已打开的主机 termora.find-everywhere.groups.tools=工具 termora.find-everywhere.groups.settings=${termora.setting} +termora.find-everywhere.quick-command.local-terminal=本地终端 termora.settings.terminal=终端 termora.settings.terminal.font=字体 diff --git a/src/main/resources/i18n/messages_zh_TW.properties b/src/main/resources/i18n/messages_zh_TW.properties index b3903a4..ba40c21 100644 --- a/src/main/resources/i18n/messages_zh_TW.properties +++ b/src/main/resources/i18n/messages_zh_TW.properties @@ -57,6 +57,7 @@ termora.find-everywhere.groups.open-new-hosts=開啟新的主機 termora.find-everywhere.groups.opened-hosts=已開啟的主機 termora.find-everywhere.groups.tools=工具 termora.find-everywhere.groups.settings=${termora.setting} +termora.find-everywhere.quick-command.local-terminal=本地端 termora.settings.terminal=終端 termora.settings.terminal.font=字體