From 564a87304cc3c6bce7d43a5219e82652ba78a981 Mon Sep 17 00:00:00 2001 From: jiangweidong Date: Fri, 10 Feb 2023 18:20:47 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=E5=85=B3=E9=97=AD?= =?UTF-8?q?=E5=BC=B9=E7=AA=97=E6=96=B9=E5=BC=8F=E5=8F=8A=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93=E8=BF=9E=E6=8E=A5=E5=90=8D=E7=A7=B0=E4=BC=98=E5=8C=96?= =?UTF-8?q?=20(#9508)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/terminal/applets/navicat/app.py | 4 ++-- apps/terminal/applets/navicat/const.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/terminal/applets/navicat/app.py b/apps/terminal/applets/navicat/app.py index 17d3b1579..561d6f978 100644 --- a/apps/terminal/applets/navicat/app.py +++ b/apps/terminal/applets/navicat/app.py @@ -27,7 +27,7 @@ class AppletApplication(BaseApplication): self.host = self.asset.address self.port = self.asset.get_protocol_port(self.protocol) self.db = self.asset.spec_info.db_name - self.name = '%s-%s' % (self.host, self.db) + self.name = '%s-%s-%s' % (self.host, self.db, int(time.time())) self.pid = None self.app = None @@ -267,7 +267,7 @@ class AppletApplication(BaseApplication): raise ValueError('This protocol is not supported: %s' % self.protocol) commands = action() # 关闭掉桌面许可弹框 - commands.insert(0, {'type': 'key', 'commands': (c.ENTER,)}) + commands.insert(0, {'type': 'key', 'commands': (c.ESC,)}) # 登录 commands.extend([ { diff --git a/apps/terminal/applets/navicat/const.py b/apps/terminal/applets/navicat/const.py index 68b111845..7c186b8cc 100644 --- a/apps/terminal/applets/navicat/const.py +++ b/apps/terminal/applets/navicat/const.py @@ -4,4 +4,5 @@ LEFT = '{LEFT}' DOWN = '{DOWN}' RIGHT = '{RIGHT}' TAB = '{VK_TAB}' +ESC = '{ESC}' ENTER = '{VK_RETURN}'