mirror of
https://github.com/bitwarden/browser.git
synced 2024-10-09 05:57:40 +02:00
eeb407b8a4
* rebase to master * use bit-menu in product switcher; add focusStrategy to bit-menu * recommit locales after rebase * add light style to iconButton, use in product-switcher * move out of component library * add buttonType input * gate behind sm flag * update aria-label * add role input to bit-menu * style changes * simplify partition logic * split into two components for Storybook * update focus styles; update grid sizing to relative * fix underline on hover * update attribute binding * move to layouts dir * add bitLink; update grid gap * reorder loose components * move orgs mock * move a11y module * fix aria role bug; add aria label to menu * update colors * update ring color * simplify colors * remove duplicate link module
57 lines
2.3 KiB
HTML
57 lines
2.3 KiB
HTML
<div class="tw-mb-3 tw-flex tw-items-center tw-gap-2" *ngIf="routeData$ | async as routeData">
|
|
<h1 class="tw-m-0 tw-mr-2 tw-text-3xl tw-font-semibold">{{ routeData.title | i18n }}</h1>
|
|
<div class="tw-ml-auto tw-w-1/4">
|
|
<input bitInput class="search tw-w-full" placeholder="{{ routeData.searchTitle | i18n }}" />
|
|
</div>
|
|
<sm-new-menu></sm-new-menu>
|
|
<product-switcher></product-switcher>
|
|
<ng-container *ngIf="account$ | async as account">
|
|
<button [bitMenuTriggerFor]="accountMenu" class="tw-border-0 tw-bg-transparent tw-p-0">
|
|
<bit-avatar [id]="account.userId" [text]="account.name || account.email"></bit-avatar>
|
|
</button>
|
|
|
|
<bit-menu #accountMenu>
|
|
<div class="tw-flex tw-min-w-52 tw-max-w-72 tw-flex-col">
|
|
<div
|
|
class="tw-flex tw-items-center tw-py-1 tw-px-4 tw-leading-tight tw-text-info"
|
|
appStopProp
|
|
>
|
|
<bit-avatar [text]="account.name || account.email" [id]="account.userId"></bit-avatar>
|
|
<div class="tw-ml-2 tw-block tw-overflow-hidden tw-whitespace-nowrap">
|
|
<span>{{ "loggedInAs" | i18n }}</span>
|
|
<small class="tw-block tw-overflow-hidden tw-whitespace-nowrap tw-text-muted">
|
|
{{ account.name }}
|
|
</small>
|
|
</div>
|
|
</div>
|
|
|
|
<bit-menu-divider></bit-menu-divider>
|
|
|
|
<a bitMenuItem routerLink="/settings/account">
|
|
<i class="bwi bwi-fw bwi-user" aria-hidden="true"></i>
|
|
{{ "accountSettings" | i18n }}
|
|
</a>
|
|
<a bitMenuItem href="https://bitwarden.com/help/" target="_blank" rel="noopener">
|
|
<i class="bwi bwi-fw bwi-question-circle" aria-hidden="true"></i>
|
|
{{ "getHelp" | i18n }}
|
|
</a>
|
|
<a bitMenuItem href="https://bitwarden.com/download/" target="_blank" rel="noopener">
|
|
<i class="bwi bwi-fw bwi-download" aria-hidden="true"></i>
|
|
{{ "getApps" | i18n }}
|
|
</a>
|
|
|
|
<bit-menu-divider></bit-menu-divider>
|
|
|
|
<button bitMenuItem type="button">
|
|
<i class="bwi bwi-fw bwi-lock" aria-hidden="true"></i>
|
|
{{ "lockNow" | i18n }}
|
|
</button>
|
|
<button bitMenuItem type="button">
|
|
<i class="bwi bwi-fw bwi-sign-out" aria-hidden="true"></i>
|
|
{{ "logOut" | i18n }}
|
|
</button>
|
|
</div>
|
|
</bit-menu>
|
|
</ng-container>
|
|
</div>
|