Commit f75490da authored by Emiliano Balbuena's avatar Emiliano Balbuena

(feat): Show newsfeed banner

1 merge request!459WIP: (feat): Minds Pro
Pipeline #72481553 passed with stages
in 32 minutes and 52 seconds
......@@ -104,6 +104,14 @@
<span>Upgrade to Plus</span>
</a>
<a class="m-page--sidebar--navigation--item"
routerLink="/pro"
*ngIf="session.isLoggedIn() && !session.getLoggedInUser().pro"
>
<i class="material-icons">business_center</i>
<span>Become Pro</span>
</a>
<a class="m-page--sidebar--navigation--item"
routerLink="/tokens"
*ngIf="session.isLoggedIn()"
......
......@@ -19,6 +19,8 @@ export class ProSubscriptionComponent implements OnInit {
error: string = '';
minds = window.Minds;
constructor(
protected service: ProService,
protected session: Session,
......@@ -58,8 +60,10 @@ export class ProSubscriptionComponent implements OnInit {
try {
await this.service.enable();
this.active = true;
this.minds.user.pro = true;
} catch (e) {
this.active = false;
this.minds.user.pro = false;
this.error = (e && e.message) || 'Unknown error';
}
......@@ -75,8 +79,10 @@ export class ProSubscriptionComponent implements OnInit {
try {
await this.service.disable();
this.active = false;
this.minds.user.pro = false;
} catch (e) {
this.active = true;
this.minds.user.pro = true;
this.error = (e && e.message) || 'Unknown error';
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment