0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2025-02-02 19:37:01 +01:00
discourse-custom-wizard/assets/javascripts/discourse/controllers/admin-wizards-wizard.js.es6

25 Zeilen
677 B
Text

2020-04-13 22:17:22 +10:00
import Controller from "@ember/controller";
import { default as discourseComputed } from 'discourse-common/utils/decorators';
import { equal } from '@ember/object/computed';
export default Controller.extend({
creating: equal('wizardId', 'create'),
@discourseComputed('creating', 'wizardId')
wizardListVal(creating, wizardId) {
return creating ? null : wizardId;
},
@discourseComputed('creating', 'wizardId')
2020-04-20 21:40:32 +10:00
messageKey(creating, wizardId) {
let key = 'select';
2020-04-13 22:17:22 +10:00
if (creating) {
2020-04-20 21:40:32 +10:00
key = 'create';
2020-04-13 22:17:22 +10:00
} else if (wizardId) {
2020-04-20 21:40:32 +10:00
key = 'edit';
2020-04-13 22:17:22 +10:00
}
2020-04-20 21:40:32 +10:00
return key;
},
messageUrl: "https://thepavilion.io/c/knowledge/custom-wizard"
2020-04-13 22:17:22 +10:00
});