1
0
mirror of https://github.com/bitwarden/browser.git synced 2025-03-11 13:30:39 +01:00

Add back button.

This commit is contained in:
Alec Rippberger 2024-10-10 10:58:01 -05:00
parent 90a24cba67
commit ea685728ca
No known key found for this signature in database
GPG Key ID: 9DD8DA583B28154A
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;
}
}