premium access already notice
This commit is contained in:
parent
1d941baff1
commit
0c9f122719
|
@ -1,6 +1,9 @@
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<h1>{{'goPremium' | i18n}}</h1>
|
<h1>{{'goPremium' | i18n}}</h1>
|
||||||
</div>
|
</div>
|
||||||
|
<app-callout type="info" *ngIf="canAccessPremium" title="{{'youHavePremiumAccess' | i18n}}" icon="fa-star">
|
||||||
|
{{'alreadyPremiumFromOrg' | i18n}}
|
||||||
|
</app-callout>
|
||||||
<app-callout type="success">
|
<app-callout type="success">
|
||||||
<p>{{'premiumUpgradeUnlockFeatures' | i18n}}</p>
|
<p>{{'premiumUpgradeUnlockFeatures' | i18n}}</p>
|
||||||
<ul class="fa-ul">
|
<ul class="fa-ul">
|
||||||
|
|
|
@ -14,6 +14,7 @@ import { MessagingService } from 'jslib/abstractions/messaging.service';
|
||||||
import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service';
|
import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service';
|
||||||
import { SyncService } from 'jslib/abstractions/sync.service';
|
import { SyncService } from 'jslib/abstractions/sync.service';
|
||||||
import { TokenService } from 'jslib/abstractions/token.service';
|
import { TokenService } from 'jslib/abstractions/token.service';
|
||||||
|
import { UserService } from 'jslib/abstractions/user.service';
|
||||||
|
|
||||||
import { PaymentComponent } from './payment.component';
|
import { PaymentComponent } from './payment.component';
|
||||||
|
|
||||||
|
@ -24,6 +25,7 @@ import { PaymentComponent } from './payment.component';
|
||||||
export class PremiumComponent implements OnInit {
|
export class PremiumComponent implements OnInit {
|
||||||
@ViewChild(PaymentComponent) paymentComponent: PaymentComponent;
|
@ViewChild(PaymentComponent) paymentComponent: PaymentComponent;
|
||||||
|
|
||||||
|
canAccessPremium = false;
|
||||||
selfHosted = false;
|
selfHosted = false;
|
||||||
premiumPrice = 10;
|
premiumPrice = 10;
|
||||||
storageGbPrice = 4;
|
storageGbPrice = 4;
|
||||||
|
@ -35,11 +37,12 @@ export class PremiumComponent implements OnInit {
|
||||||
private analytics: Angulartics2, private toasterService: ToasterService,
|
private analytics: Angulartics2, private toasterService: ToasterService,
|
||||||
platformUtilsService: PlatformUtilsService, private tokenService: TokenService,
|
platformUtilsService: PlatformUtilsService, private tokenService: TokenService,
|
||||||
private router: Router, private messagingService: MessagingService,
|
private router: Router, private messagingService: MessagingService,
|
||||||
private syncService: SyncService) {
|
private syncService: SyncService, private userService: UserService) {
|
||||||
this.selfHosted = platformUtilsService.isSelfHost();
|
this.selfHosted = platformUtilsService.isSelfHost();
|
||||||
}
|
}
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
|
this.canAccessPremium = await this.userService.canAccessPremium();
|
||||||
const premium = await this.tokenService.getPremium();
|
const premium = await this.tokenService.getPremium();
|
||||||
if (premium) {
|
if (premium) {
|
||||||
this.router.navigate(['/settings/billing']);
|
this.router.navigate(['/settings/billing']);
|
||||||
|
|
|
@ -1078,6 +1078,12 @@
|
||||||
"premiumRequiredDesc": {
|
"premiumRequiredDesc": {
|
||||||
"message": "A premium membership is required to use this feature."
|
"message": "A premium membership is required to use this feature."
|
||||||
},
|
},
|
||||||
|
"youHavePremiumAccess": {
|
||||||
|
"message": "You have premium access"
|
||||||
|
},
|
||||||
|
"alreadyPremiumFromOrg": {
|
||||||
|
"message": "You already have access to premium features because of an organization you are a member of."
|
||||||
|
},
|
||||||
"manage": {
|
"manage": {
|
||||||
"message": "Manage"
|
"message": "Manage"
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue