mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 06:13:38 +00:00
Change account switching dropdown to align with the right side (#1248)
This commit is contained in:
@@ -28,6 +28,7 @@
|
|||||||
[cdkConnectedOverlayBackdropClass]="'cdk-overlay-transparent-backdrop'"
|
[cdkConnectedOverlayBackdropClass]="'cdk-overlay-transparent-backdrop'"
|
||||||
(backdropClick)="toggle()"
|
(backdropClick)="toggle()"
|
||||||
[cdkConnectedOverlayOpen]="showSwitcher && isOpen"
|
[cdkConnectedOverlayOpen]="showSwitcher && isOpen"
|
||||||
|
[cdkConnectedOverlayPositions]="overlayPostition"
|
||||||
cdkConnectedOverlayMinWidth="250px"
|
cdkConnectedOverlayMinWidth="250px"
|
||||||
>
|
>
|
||||||
<div class="account-switcher-dropdown" [@transformPanel]="'open'">
|
<div class="account-switcher-dropdown" [@transformPanel]="'open'">
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { animate, state, style, transition, trigger } from "@angular/animations";
|
import { animate, state, style, transition, trigger } from "@angular/animations";
|
||||||
|
import { ConnectedPosition } from "@angular/cdk/overlay";
|
||||||
import { Component, OnInit } from "@angular/core";
|
import { Component, OnInit } from "@angular/core";
|
||||||
import { Router } from "@angular/router";
|
|
||||||
|
|
||||||
import { MessagingService } from "jslib-common/abstractions/messaging.service";
|
import { MessagingService } from "jslib-common/abstractions/messaging.service";
|
||||||
import { StateService } from "jslib-common/abstractions/state.service";
|
import { StateService } from "jslib-common/abstractions/state.service";
|
||||||
@@ -55,6 +55,14 @@ export class AccountSwitcherComponent implements OnInit {
|
|||||||
accounts: { [userId: string]: SwitcherAccount } = {};
|
accounts: { [userId: string]: SwitcherAccount } = {};
|
||||||
activeAccountEmail: string;
|
activeAccountEmail: string;
|
||||||
serverUrl: string;
|
serverUrl: string;
|
||||||
|
overlayPostition: ConnectedPosition[] = [
|
||||||
|
{
|
||||||
|
originX: "end",
|
||||||
|
originY: "bottom",
|
||||||
|
overlayX: "end",
|
||||||
|
overlayY: "top",
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
get showSwitcher() {
|
get showSwitcher() {
|
||||||
return !Utils.isNullOrWhitespace(this.activeAccountEmail);
|
return !Utils.isNullOrWhitespace(this.activeAccountEmail);
|
||||||
|
|||||||
Reference in New Issue
Block a user