0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-23 09:50:28 +01:00
discourse-custom-wizard/assets/javascripts/discourse/components/subscription-container.js.es6

26 Zeilen
704 B
Text

2021-09-24 11:58:42 +02:00
import Component from "@ember/component";
import discourseComputed from "discourse-common/utils/decorators";
export default Component.extend({
classNameBindings: [":subscription-container", "subscribed"],
2021-10-19 14:49:06 +02:00
@discourseComputed("subscribed")
2021-09-24 11:58:42 +02:00
subscribedIcon(subscribed) {
2021-10-19 14:49:06 +02:00
return subscribed ? "check" : "dash";
2021-09-24 11:58:42 +02:00
},
2021-10-19 14:49:06 +02:00
@discourseComputed("subscribed")
2021-09-24 11:58:42 +02:00
subscribedLabel(subscribed) {
2021-10-19 14:49:06 +02:00
return `admin.wizard.subscription_container.${
subscribed ? "subscribed" : "not_subscribed"
}.label`;
2021-09-24 11:58:42 +02:00
},
2021-10-19 14:49:06 +02:00
@discourseComputed("subscribed")
2021-09-24 11:58:42 +02:00
subscribedTitle(subscribed) {
2021-10-19 14:49:06 +02:00
return `admin.wizard.subscription_container.${
subscribed ? "subscribed" : "not_subscribed"
}.title`;
},
});