Skip to content

Commit 67420ca

Browse files
committed
convertToPipelineClicked
1 parent f826acf commit 67420ca

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

services/static-webserver/client/source/class/osparc/navigation/StudyTitleWOptions.js

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,22 @@ qx.Class.define("osparc.navigation.StudyTitleWOptions", {
173173
},
174174

175175
__convertToPipelineClicked: function() {
176-
this.getStudy().getUi().setMode("pipeline");
176+
let message = this.tr("Would you like to convert this project to a pipeline?");
177+
message += "<br>" + this.tr("If you want to create a copy of the project and convert the copy instead, please close the project first.");
178+
const confirmationWin = new osparc.ui.window.Confirmation();
179+
confirmationWin.set({
180+
caption: this.tr("Convert to Pipeline"),
181+
confirmText: this.tr("Convert"),
182+
confirmAction: "create",
183+
message,
184+
});
185+
confirmationWin.addListener("close", () => {
186+
if (confirmationWin.getConfirmed()) {
187+
this.getStudy().getUi().setMode("pipeline");
188+
osparc.FlashMessenger.logAs(this.tr("Project converted to pipeline"), "INFO");
189+
}
190+
});
191+
confirmationWin.open();
177192
},
178193
}
179194
});

0 commit comments

Comments
 (0)