Skip to content

Commit ebaeadb

Browse files
committed
some progress
1 parent 5589d99 commit ebaeadb

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

services/static-webserver/client/source/class/osparc/po/Announcements.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ qx.Class.define("osparc.po.Announcements", {
102102
const generateAnnouncementBtn = new osparc.ui.form.FetchButton(this.tr("Generate"));
103103
generateAnnouncementBtn.set({appearance: "form-button"});
104104
generateAnnouncementBtn.addListener("execute", () => {
105+
const products = [osparc.product.Utils.getProductName()];
105106
const widgets = [];
106107
if (widgetLogin.getValue()) {
107108
widgets.push("login");
@@ -118,10 +119,10 @@ qx.Class.define("osparc.po.Announcements", {
118119
}
119120
const announcementData = {
120121
"id": osparc.utils.Utils.uuidV4(),
121-
"products": "[" + osparc.product.Utils.getProductName() + "]",
122-
"title": title.getValue() ? encodeURIComponent(title.getValue()) : "",
123-
"description": description.getValue() ? encodeURIComponent(description.getValue()) : "",
124-
"widgets": "[" + widgets.join("") + "]",
122+
"products": JSON.stringify(products),
123+
"title": title.getValue() ? title.getValue() : "",
124+
"description": description.getValue() ? description.getValue() : "",
125+
"widgets": JSON.stringify(widgets),
125126
"start": start.getValue(),
126127
"end": end.getValue(),
127128
};
@@ -147,7 +148,7 @@ qx.Class.define("osparc.po.Announcements", {
147148
});
148149
copyAnnouncementBtn.set({appearance: "form-button"});
149150
copyAnnouncementBtn.addListener("execute", () => {
150-
if (osparc.utils.Utils.copyTextToClipboard(announcementData)) {
151+
if (osparc.utils.Utils.copyTextToClipboard(JSON.stringify(announcementData))) {
151152
copyAnnouncementBtn.setIcon("@FontAwesome5Solid/check/12");
152153
}
153154
});

0 commit comments

Comments
 (0)