FEATURE: Show/hide campaign banner with goal status (#85)
This commit is contained in:
@@ -27,6 +27,7 @@ export default Component.extend({
|
||||
"Subscribers"
|
||||
),
|
||||
currency: setting("discourse_subscriptions_currency"),
|
||||
amountRaised: setting("discourse_subscriptions_campaign_amount_raised"),
|
||||
goalTarget: setting("discourse_subscriptions_campaign_goal"),
|
||||
product: setting("discourse_subscriptions_campaign_product"),
|
||||
showContributors: setting(
|
||||
@@ -120,6 +121,10 @@ export default Component.extend({
|
||||
!currentRoute.split(".")[0].includes("admin") &&
|
||||
currentRoute.split(".")[0] !== "s";
|
||||
|
||||
if (!this.site.show_campaign_banner) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// make sure not to render above main container when inside a topic
|
||||
if (
|
||||
this.connectorName === "above-main-container" &&
|
||||
@@ -154,13 +159,6 @@ export default Component.extend({
|
||||
);
|
||||
},
|
||||
|
||||
@discourseComputed
|
||||
amountRaised() {
|
||||
return (
|
||||
this.siteSettings.discourse_subscriptions_campaign_amount_raised / 100
|
||||
);
|
||||
},
|
||||
|
||||
@discourseComputed
|
||||
isGoalMet() {
|
||||
const currentVolume = this.subscriberGoal
|
||||
|
||||
Reference in New Issue
Block a user