Skip to content

Commit 95d2be2

Browse files
committed
getCopyrightLink
1 parent 493488c commit 95d2be2

File tree

2 files changed

+17
-8
lines changed

2 files changed

+17
-8
lines changed

services/static-webserver/client/source/class/osparc/product/AboutProduct.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -166,17 +166,13 @@ qx.Class.define("osparc.product.AboutProduct", {
166166
},
167167

168168
__addCopyright: function() {
169-
const copyrightLink = new osparc.ui.basic.LinkLabel().set({
170-
font: "link-label-14"
171-
});
172-
const vendor = osparc.store.VendorInfo.getInstance().getVendor();
173-
if (vendor && "url" in vendor && "copyright" in vendor) {
169+
const copyrightLink = osparc.product.Utils.getCopyrightLink();
170+
if (copyrightLink) {
174171
copyrightLink.set({
175-
value: vendor.copyright,
176-
url: vendor.url
172+
font: "link-label-14"
177173
});
174+
this.add(copyrightLink);
178175
}
179-
this.add(copyrightLink);
180176
},
181177
}
182178
});

services/static-webserver/client/source/class/osparc/product/Utils.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,19 @@ qx.Class.define("osparc.product.Utils", {
205205
return "REGISTER";
206206
},
207207

208+
getCopyrightLink: function() {
209+
const copyrightLink = new osparc.ui.basic.LinkLabel();
210+
const vendor = osparc.store.VendorInfo.getInstance().getVendor();
211+
if (vendor && "url" in vendor && "copyright" in vendor) {
212+
copyrightLink.set({
213+
value: vendor.copyright,
214+
url: vendor.url
215+
});
216+
return copyrightLink;
217+
}
218+
return null;
219+
},
220+
208221
// All products except oSPARC
209222
hasIdlingTrackerEnabled: function() {
210223
const product = this.getProductName();

0 commit comments

Comments
 (0)