From 0173cbce238a69a6e8fe532d1c55e0582bc43c88 Mon Sep 17 00:00:00 2001 From: sawka Date: Tue, 4 Oct 2022 10:52:55 -0700 Subject: [PATCH] reset pw --- src/main.tsx | 18 ++++++++++++++++++ src/sh2.less | 6 ++++++ 2 files changed, 24 insertions(+) diff --git a/src/main.tsx b/src/main.tsx index 2b915d9f6..325fa3781 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -976,6 +976,21 @@ class InfoRemoteEdit extends React.Component<{}, {}> { } } + canResetPw() : boolean { + let redit = this.getRemoteEdit(); + if (redit == null) { + return false; + } + return redit.haspassword && this.passwordStr.get() != PasswordUnchangedSentinel; + } + + @boundMethod + resetPw() : void { + mobx.action(() => { + this.passwordStr.set(PasswordUnchangedSentinel); + })(); + } + @boundMethod doSubmitRemote() { let redit = this.getRemoteEdit(); @@ -1253,6 +1268,9 @@ class InfoRemoteEdit extends React.Component<{}, {}> {
ssh password
+ + +
diff --git a/src/sh2.less b/src/sh2.less index 5a23497b4..5b5a78625 100644 --- a/src/sh2.less +++ b/src/sh2.less @@ -905,6 +905,12 @@ body .xterm .xterm-viewport { color: @term-bright-white; } + .undo-icon { + margin-left: 4px; + cursor: pointer; + padding: 2px; + } + .remote-field-control { &.text-control { }