Skip to content

Commit

Permalink
Update next text
Browse files Browse the repository at this point in the history
  • Loading branch information
garrettmflynn committed Feb 6, 2024
1 parent 5097f2e commit 823c0a3
Show file tree
Hide file tree
Showing 10 changed files with 7 additions and 17 deletions.
3 changes: 2 additions & 1 deletion src/renderer/src/stories/Main.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ export class Main extends LitElement {
footer = Object.assign(
{
exit: false,
next: "Complete Pipeline",
onNext: () => this.toRender.page.to("/"),
},
footer && typeof footer === "object" ? footer : {}
Expand All @@ -106,7 +107,7 @@ export class Main extends LitElement {
}

if (footer === true) footer = {};
if (footer && "onNext" in footer && !("next" in footer)) footer.next = "Save and Continue";
if (footer && "onNext" in footer && !("next" in footer)) footer.next = "Next";

// Default Capsules Behavior
const section = sections[info.section];
Expand Down
4 changes: 2 additions & 2 deletions src/renderer/src/stories/pages/guided-mode/GuidedFooter.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class GuidedFooter extends LitElement {
constructor({
back = "Back",
next = "Next",
exit = "Return to Home Screen",
exit = "Exit Current Pipeline",
onBack = () => this.to(-1),
onNext = () => this.to(1),
onExit = () => this.to("/"),
Expand Down Expand Up @@ -57,7 +57,7 @@ export class GuidedFooter extends LitElement {
<div>
${this.exit ? html`<nwb-button @click=${this.onExit}>${this.exit}</nwb-button>` : ""}
</div>
<div>
${this.back ? html`<nwb-button @click=${this.onBack}>${this.back}</nwb-button>` : ""}
${this.next ? html`<nwb-button @click=${this.onNext} primary>${this.next}</nwb-button>` : ""}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ export class GuidedMetadataPage extends ManagedPage {
};

footer = {
next: "Run Conversion Preview",
onNext: async () => {
await this.save(); // Save in case the conversion fails

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,6 @@ export class GuidedPathExpansionPage extends Page {
};

footer = {
next: "Populate Subject Details",
onNext: async () => {
await this.save(); // Save in case the request fails

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ export class GuidedSourceDataPage extends ManagedPage {
};

footer = {
next: "Request Metadata Schema",
onNext: async () => {
await this.save(); // Save in case the conversion fails

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export class GuidedConversionOptionsPage extends Page {
}

footer = {
next: "Run Conversion Preview",
onNext: async () => {
await this.save(); // Save in case the conversion fails
await this.form.validate(); // Will throw an error in the callback
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,7 @@ export class GuidedInspectorPage extends Page {
};

// NOTE: We may want to trigger this whenever (1) this page is visited AND (2) data has been changed.
footer = {
next: "Preview Files",
};
footer = {};

getStatus = (list) => {
return list.reduce((acc, messageInfo) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ export class GuidedUploadPage extends Page {
}

footer = {
next: "Upload Project",
onNext: async () => {
await this.save(); // Save in case the conversion fails

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ export class GuidedResultsPage extends Page {
super(...args);
}

footer = {
next: "Complete Conversion",
};
footer = {};

render() {
const { conversion } = this.info.globalState;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,7 @@ export class GuidedSubjectsPage extends Page {
updateResultsFromSubjects(results, subjects, sourceDataObject); // NOTE: This directly mutates the results object
};

footer = {
next: "Generate Data Structure",
};
footer = {};

updated() {
const add = this.query("#addButton");
Expand Down

0 comments on commit 823c0a3

Please sign in to comment.