Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-09 20:02:54 +01:00
UX: Change info message when selecting a wizard in the submissions pane
Dieser Commit ist enthalten in:
Ursprung
c490da3145
Commit
10c7c8bcc0
3 geänderte Dateien mit 32 neuen und 2 gelöschten Zeilen
|
@ -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;
|
||||
},
|
||||
});
|
||||
|
|
|
@ -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"}}
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
Laden …
In neuem Issue referenzieren