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;
|
@Input() loading = false;
|
||||||
|
|
||||||
@HostBinding("class") get classes() {
|
@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,
|
this.width,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -14,11 +14,5 @@
|
|||||||
>
|
>
|
||||||
{{ "clearHistory" | i18n }}
|
{{ "clearHistory" | i18n }}
|
||||||
</button>
|
</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>
|
</ng-container>
|
||||||
</bit-dialog>
|
</bit-dialog>
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
// FIXME: Update this file to be type safe and remove this and next line
|
// FIXME: Update this file to be type safe and remove this and next line
|
||||||
// @ts-strict-ignore
|
// @ts-strict-ignore
|
||||||
import { DialogRef } from "@angular/cdk/dialog";
|
|
||||||
import { CommonModule } from "@angular/common";
|
import { CommonModule } from "@angular/common";
|
||||||
import { Component } from "@angular/core";
|
import { Component } from "@angular/core";
|
||||||
import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
|
import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
|
||||||
@ -35,7 +34,6 @@ export class CredentialGeneratorHistoryDialogComponent {
|
|||||||
private accountService: AccountService,
|
private accountService: AccountService,
|
||||||
private history: GeneratorHistoryService,
|
private history: GeneratorHistoryService,
|
||||||
private dialogService: DialogService,
|
private dialogService: DialogService,
|
||||||
private dialogRef: DialogRef,
|
|
||||||
) {
|
) {
|
||||||
this.accountService.activeAccount$
|
this.accountService.activeAccount$
|
||||||
.pipe(
|
.pipe(
|
||||||
@ -54,11 +52,6 @@ export class CredentialGeneratorHistoryDialogComponent {
|
|||||||
.subscribe(this.hasHistory$);
|
.subscribe(this.hasHistory$);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** closes the dialog */
|
|
||||||
protected close() {
|
|
||||||
this.dialogRef.close();
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Launches clear history flow */
|
/** Launches clear history flow */
|
||||||
protected async clear() {
|
protected async clear() {
|
||||||
const confirmed = await this.dialogService.openSimpleDialog({
|
const confirmed = await this.dialogService.openSimpleDialog({
|
||||||
|
Loading…
Reference in New Issue
Block a user