mirror of
https://github.com/bitwarden/browser
synced 2025-12-13 14:53:33 +00:00
[PM-12732] - fix new send button (#11266)
* fix new send button * simplify logic. use static class name where possible
This commit is contained in:
@@ -23,7 +23,11 @@
|
|||||||
<bit-no-items [icon]="noItemIcon" class="tw-text-main">
|
<bit-no-items [icon]="noItemIcon" class="tw-text-main">
|
||||||
<ng-container slot="title">{{ "sendsNoItemsTitle" | i18n }}</ng-container>
|
<ng-container slot="title">{{ "sendsNoItemsTitle" | i18n }}</ng-container>
|
||||||
<ng-container slot="description">{{ "sendsNoItemsMessage" | i18n }}</ng-container>
|
<ng-container slot="description">{{ "sendsNoItemsMessage" | i18n }}</ng-container>
|
||||||
<tools-new-send-dropdown *ngIf="!sendsDisabled" slot="button"></tools-new-send-dropdown>
|
<tools-new-send-dropdown
|
||||||
|
[hideIcon]="true"
|
||||||
|
*ngIf="!sendsDisabled"
|
||||||
|
slot="button"
|
||||||
|
></tools-new-send-dropdown>
|
||||||
</bit-no-items>
|
</bit-no-items>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<button bitButton [bitMenuTriggerFor]="itemOptions" buttonType="primary" type="button">
|
<button bitButton [bitMenuTriggerFor]="itemOptions" buttonType="primary" type="button">
|
||||||
<i class="bwi bwi-plus-f" aria-hidden="true"></i>
|
<i *ngIf="!hideIcon" class="bwi bwi-plus-f" aria-hidden="true"></i>
|
||||||
{{ "new" | i18n }}
|
{{ (hideIcon ? "createSend" : "new") | i18n }}
|
||||||
</button>
|
</button>
|
||||||
<bit-menu #itemOptions>
|
<bit-menu #itemOptions>
|
||||||
<a type="button" bitMenuItem (click)="newItemNavigate(sendType.Text)">
|
<a type="button" bitMenuItem (click)="newItemNavigate(sendType.Text)">
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { CommonModule } from "@angular/common";
|
import { CommonModule } from "@angular/common";
|
||||||
import { Component, OnInit } from "@angular/core";
|
import { Component, Input, OnInit } from "@angular/core";
|
||||||
import { Router, RouterLink } from "@angular/router";
|
import { Router, RouterLink } from "@angular/router";
|
||||||
import { firstValueFrom } from "rxjs";
|
import { firstValueFrom } from "rxjs";
|
||||||
|
|
||||||
@@ -15,6 +15,8 @@ import { BadgeModule, ButtonModule, MenuModule } from "@bitwarden/components";
|
|||||||
imports: [JslibModule, CommonModule, ButtonModule, RouterLink, MenuModule, BadgeModule],
|
imports: [JslibModule, CommonModule, ButtonModule, RouterLink, MenuModule, BadgeModule],
|
||||||
})
|
})
|
||||||
export class NewSendDropdownComponent implements OnInit {
|
export class NewSendDropdownComponent implements OnInit {
|
||||||
|
@Input() hideIcon: boolean = false;
|
||||||
|
|
||||||
sendType = SendType;
|
sendType = SendType;
|
||||||
|
|
||||||
hasNoPremium = false;
|
hasNoPremium = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user