2020-04-21 09:54:29 +03:00
|
|
|
import Component from '@ember/component';
|
2022-02-01 12:34:03 +03:00
|
|
|
import classic from 'ember-classic-decorator';
|
|
|
|
import {action} from '@ember/object';
|
2022-11-03 14:14:36 +03:00
|
|
|
import {inject} from 'ghost-admin/decorators/inject';
|
2022-01-21 22:25:47 +03:00
|
|
|
import {reads} from '@ember/object/computed';
|
2020-04-21 09:54:29 +03:00
|
|
|
import {inject as service} from '@ember/service';
|
|
|
|
|
2022-02-01 12:34:03 +03:00
|
|
|
@classic
|
|
|
|
export default class GhBillingUpdateButton extends Component {
|
2022-02-01 20:03:45 +03:00
|
|
|
@service router;
|
|
|
|
@service ghostPaths;
|
|
|
|
@service ajax;
|
|
|
|
@service billing;
|
2022-02-01 12:34:03 +03:00
|
|
|
|
2022-11-03 14:14:36 +03:00
|
|
|
@inject config;
|
|
|
|
|
2022-02-01 12:34:03 +03:00
|
|
|
subscription = null;
|
|
|
|
|
|
|
|
@reads('billing.subscription.isActiveTrial')
|
2022-02-10 13:41:36 +03:00
|
|
|
showUpgradeButton;
|
2022-02-01 12:34:03 +03:00
|
|
|
|
|
|
|
@action
|
|
|
|
openBilling() {
|
|
|
|
this.billing.openBillingWindow(this.router.currentURL, '/pro/billing/plans');
|
2020-04-21 09:54:29 +03:00
|
|
|
}
|
2022-02-01 12:34:03 +03:00
|
|
|
}
|