mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 07:43:35 +00:00
* migrate all components to use PremiumBadgeComponent * move badge component to vault * move premium badge to vault * move premium badge to billing * fix import * use premium badge in tools new send dropdown * remove badge module import * remove module
24 lines
700 B
TypeScript
24 lines
700 B
TypeScript
import { Component } from "@angular/core";
|
|
|
|
import { JslibModule } from "@bitwarden/angular/jslib.module";
|
|
import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service";
|
|
import { BadgeModule } from "@bitwarden/components";
|
|
|
|
@Component({
|
|
selector: "app-premium-badge",
|
|
standalone: true,
|
|
template: `
|
|
<button type="button" *appNotPremium bitBadge variant="success" (click)="premiumRequired()">
|
|
{{ "premium" | i18n }}
|
|
</button>
|
|
`,
|
|
imports: [BadgeModule, JslibModule],
|
|
})
|
|
export class PremiumBadgeComponent {
|
|
constructor(private messagingService: MessagingService) {}
|
|
|
|
premiumRequired() {
|
|
this.messagingService.send("premiumRequired");
|
|
}
|
|
}
|