mirror of
https://github.com/bitwarden/browser.git
synced 2025-02-12 00:41:29 +01:00
[PM-15975] Prevent dialogs from overlapping interactive top menu bars (#13251)
This commit is contained in:
parent
0b5b1b347e
commit
b9faf2c9c0
@ -63,7 +63,8 @@ export class DialogComponent {
|
||||
@Input() loading = false;
|
||||
|
||||
@HostBinding("class") get classes() {
|
||||
return ["tw-flex", "tw-flex-col", "tw-max-h-screen", "tw-w-screen", "tw-p-4"].concat(
|
||||
// `tw-max-h-[90vh]` is needed to prevent dialogs from overlapping the desktop header
|
||||
return ["tw-flex", "tw-flex-col", "tw-w-screen", "tw-p-4", "tw-max-h-[90vh]"].concat(
|
||||
this.width,
|
||||
);
|
||||
}
|
||||
|
@ -14,11 +14,5 @@
|
||||
>
|
||||
{{ "clearHistory" | i18n }}
|
||||
</button>
|
||||
<!-- FIXME: Remove the close button once the dialog doesn't overlap electron's
|
||||
drag area.
|
||||
-->
|
||||
<button bitButton type="submit" buttonType="secondary" (click)="close()">
|
||||
{{ "close" | i18n }}
|
||||
</button>
|
||||
</ng-container>
|
||||
</bit-dialog>
|
||||
|
@ -1,6 +1,5 @@
|
||||
// FIXME: Update this file to be type safe and remove this and next line
|
||||
// @ts-strict-ignore
|
||||
import { DialogRef } from "@angular/cdk/dialog";
|
||||
import { CommonModule } from "@angular/common";
|
||||
import { Component } from "@angular/core";
|
||||
import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
|
||||
@ -35,7 +34,6 @@ export class CredentialGeneratorHistoryDialogComponent {
|
||||
private accountService: AccountService,
|
||||
private history: GeneratorHistoryService,
|
||||
private dialogService: DialogService,
|
||||
private dialogRef: DialogRef,
|
||||
) {
|
||||
this.accountService.activeAccount$
|
||||
.pipe(
|
||||
@ -54,11 +52,6 @@ export class CredentialGeneratorHistoryDialogComponent {
|
||||
.subscribe(this.hasHistory$);
|
||||
}
|
||||
|
||||
/** closes the dialog */
|
||||
protected close() {
|
||||
this.dialogRef.close();
|
||||
}
|
||||
|
||||
/** Launches clear history flow */
|
||||
protected async clear() {
|
||||
const confirmed = await this.dialogService.openSimpleDialog({
|
||||
|
Loading…
Reference in New Issue
Block a user