mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-02 08:13:34 +03:00
affe6743e5
refs: https://github.com/TryGhost/Team/issues/1145 - this should allow us to remove the /products endpoint in v5 It avoids: - `kg-product-card`, that really is meant to say product - `product-cadence` on offers Co-authored-by: Rishabh <zrishabhgarg@gmail.com>
37 lines
962 B
JavaScript
37 lines
962 B
JavaScript
import Controller from '@ember/controller';
|
|
import {action} from '@ember/object';
|
|
import {htmlSafe} from '@ember/template';
|
|
import {inject as service} from '@ember/service';
|
|
import {tracked} from '@glimmer/tracking';
|
|
|
|
export default class TiersController extends Controller {
|
|
@service settings;
|
|
@service config;
|
|
|
|
@tracked iconStyle = '';
|
|
@tracked showFreeMembershipModal = false;
|
|
|
|
constructor() {
|
|
super(...arguments);
|
|
this.iconStyle = this.setIconStyle();
|
|
}
|
|
|
|
get tiers() {
|
|
return this.model.sortBy('name');
|
|
}
|
|
|
|
setIconStyle() {
|
|
let icon = this.config.get('icon');
|
|
if (icon) {
|
|
return htmlSafe(`background-image: url(${icon})`);
|
|
}
|
|
icon = 'https://static.ghost.org/v4.0.0/images/ghost-orb-2.png';
|
|
return htmlSafe(`background-image: url(${icon})`);
|
|
}
|
|
|
|
@action
|
|
closeFreeMembershipModal() {
|
|
this.showFreeMembershipModal = false;
|
|
}
|
|
}
|