0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-26 02:50:28 +01:00

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 Controller from "@ember/controller";
import { default as discourseComputed } from "discourse-common/utils/decorators";
export default Controller.extend({ export default Controller.extend({
messageKey: "select",
documentationUrl: "https://thepavilion.io/t/2818", 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 {{combo-box
value=wizardId value=wizardId
content=wizardList content=wizardList
@ -10,6 +10,7 @@
{{wizard-message {{wizard-message
key=messageKey key=messageKey
opts=messageOpts
url=documentationUrl url=documentationUrl
component="submissions"}} component="submissions"}}

Datei anzeigen

@ -93,6 +93,7 @@ en:
destroy_complete: Destruction complete destroy_complete: Destruction complete
submissions: submissions:
select: "Select a wizard to see its 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" documentation: "Check out the submissions documentation"
editor: editor: