2022-03-25 12:18:54 +01:00
|
|
|
import Mixin from "@ember/object/mixin";
|
|
|
|
import { getOwner } from "discourse-common/lib/get-owner";
|
|
|
|
import { readOnly } from "@ember/object/computed";
|
|
|
|
import discourseComputed from "discourse-common/utils/decorators";
|
|
|
|
|
|
|
|
export default Mixin.create({
|
|
|
|
subscriptionLandingUrl: "https://custom-wizard.pavilion.tech",
|
|
|
|
subscriptionClientUrl: "/admin/plugins/subscription-client",
|
|
|
|
|
|
|
|
@discourseComputed
|
|
|
|
adminWizards() {
|
2022-03-25 12:22:27 +01:00
|
|
|
return getOwner(this).lookup("controller:admin-wizards");
|
2022-03-25 12:18:54 +01:00
|
|
|
},
|
|
|
|
|
2022-03-25 12:22:27 +01:00
|
|
|
subscribed: readOnly("adminWizards.subscribed"),
|
|
|
|
subscriptionType: readOnly("adminWizards.subscriptionType"),
|
|
|
|
businessSubscription: readOnly("adminWizards.businessSubscription"),
|
|
|
|
standardSubscription: readOnly("adminWizards.standardSubscription"),
|
|
|
|
subscriptionAttributes: readOnly("adminWizards.subscriptionAttributes"),
|
|
|
|
subscriptionClientInstalled: readOnly(
|
|
|
|
"adminWizards.subscriptionClientInstalled"
|
|
|
|
),
|
2022-03-25 12:18:54 +01:00
|
|
|
|
|
|
|
@discourseComputed("subscriptionClientInstalled")
|
|
|
|
subscriptionLink(subscriptionClientInstalled) {
|
2022-03-25 12:22:27 +01:00
|
|
|
return subscriptionClientInstalled
|
|
|
|
? this.subscriptionClientUrl
|
|
|
|
: this.subscriptionLandingUrl;
|
|
|
|
},
|
2022-03-25 12:18:54 +01:00
|
|
|
});
|