1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 08:43:33 +00:00

Add back button.

This commit is contained in:
Alec Rippberger
2024-10-10 10:58:01 -05:00
parent 90a24cba67
commit ea685728ca
2 changed files with 21 additions and 0 deletions

View File

@@ -130,6 +130,19 @@
{{ "loginWithDevice" | i18n }}
</button>
</ng-container>
<!-- Back button -->
<ng-container *ngIf="showBackButton()">
<button
type="button"
bitButton
block
buttonType="secondary"
(click)="toggleValidateEmail(false)"
>
{{ "back" | i18n }}
</button>
</ng-container>
</div>
</ng-container>
</form>

View File

@@ -557,4 +557,12 @@ export class LoginComponent implements OnInit, OnDestroy {
this.messagingService.send("getWindowIsFocused");
}
/**
* Helper function to determine if the back button should be shown.
* @returns true if the back button should be shown.
*/
protected showBackButton(): boolean {
return this.validatedEmail && this.clientType !== ClientType.Browser;
}
}