1
0
Fork 0

UX: Change info message when selecting a wizard in the submissions pane

Dieser Commit ist enthalten in:
Keegan George 2021-06-18 11:25:51 -07:00
Ursprung c490da3145
Commit 10c7c8bcc0
3 geänderte Dateien mit 32 neuen und 2 gelöschten Zeilen

Datei anzeigen

@ -1,6 +1,34 @@
import Controller from "@ember/controller";
import { default as discourseComputed } from "discourse-common/utils/decorators";
export default Controller.extend({
messageKey: "select",
documentationUrl: "https://thepavilion.io/t/2818",
@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;
},
});

Datei anzeigen

@ -1,4 +1,4 @@
<div class="admin-wizard-select">
<div class="admin-wizard-select admin-wizard-controls">
{{combo-box
value=wizardId
content=wizardList
@ -10,6 +10,7 @@
{{wizard-message
key=messageKey
opts=messageOpts
url=documentationUrl
component="submissions"}}

Datei anzeigen

@ -93,6 +93,7 @@ en:
destroy_complete: Destruction complete
submissions:
select: "Select a wizard to see its submissions"
viewing: "You're viewing the logs of the %{wizardName}. Click 'Download' on the right to download them."
documentation: "Check out the submissions documentation"
editor: