2021-06-18 19:25:01 +02:00
|
|
|
import Controller from "@ember/controller";
|
2021-06-18 20:25:51 +02:00
|
|
|
import { default as discourseComputed } from "discourse-common/utils/decorators";
|
2021-06-18 19:25:01 +02:00
|
|
|
|
|
|
|
export default Controller.extend({
|
|
|
|
documentationUrl: "https://thepavilion.io/t/2818",
|
2021-06-18 20:25:51 +02:00
|
|
|
|
|
|
|
@discourseComputed("wizardId")
|
|
|
|
wizardName(wizardId) {
|
|
|
|
let currentWizard = this.wizardList.find(
|
|
|
|
(wizard) => wizard.id === wizardId
|
|
|
|
);
|
|
|
|
if (currentWizard) {
|
|
|
|
return currentWizard.name;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
@discourseComputed("wizardName")
|
|
|
|
messageOpts(wizardName) {
|
|
|
|
return {
|
|
|
|
wizardName,
|
|
|
|
};
|
|
|
|
},
|
|
|
|
|
|
|
|
@discourseComputed("wizardId")
|
|
|
|
messageKey(wizardId) {
|
|
|
|
let key = "select";
|
|
|
|
|
|
|
|
if (wizardId) {
|
|
|
|
key = "viewing";
|
|
|
|
}
|
|
|
|
|
|
|
|
return key;
|
|
|
|
},
|
2021-06-18 19:25:01 +02:00
|
|
|
});
|