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<{}, {}> {