diff --git a/services/static-webserver/client/source/class/osparc/auth/LoginPage.js b/services/static-webserver/client/source/class/osparc/auth/LoginPage.js index a972fce24d6..82aec70c3c5 100644 --- a/services/static-webserver/client/source/class/osparc/auth/LoginPage.js +++ b/services/static-webserver/client/source/class/osparc/auth/LoginPage.js @@ -353,17 +353,13 @@ qx.Class.define("osparc.auth.LoginPage", { }); versionLinkLayout.add(createReleaseNotesLink); - const organizationLink = new osparc.ui.basic.LinkLabel().set({ - textColor: "text-darker" - }); - const vendor = osparc.store.VendorInfo.getInstance().getVendor(); - if (vendor && "url" in vendor && "copyright" in vendor) { - organizationLink.set({ - value: vendor.copyright, - url: vendor.url + const copyrightLink = osparc.product.Utils.getCopyrightLink(); + if (copyrightLink) { + copyrightLink.set({ + textColor: "text-darker" }); + versionLinkLayout.add(copyrightLink); } - versionLinkLayout.add(organizationLink); versionLinkLayout.add(new qx.ui.core.Spacer(), { flex: 1 diff --git a/services/static-webserver/client/source/class/osparc/product/AboutProduct.js b/services/static-webserver/client/source/class/osparc/product/AboutProduct.js index c0760d01082..63e557456d7 100644 --- a/services/static-webserver/client/source/class/osparc/product/AboutProduct.js +++ b/services/static-webserver/client/source/class/osparc/product/AboutProduct.js @@ -166,17 +166,13 @@ qx.Class.define("osparc.product.AboutProduct", { }, __addCopyright: function() { - const copyrightLink = new osparc.ui.basic.LinkLabel().set({ - font: "link-label-14" - }); - const vendor = osparc.store.VendorInfo.getInstance().getVendor(); - if (vendor && "url" in vendor && "copyright" in vendor) { + const copyrightLink = osparc.product.Utils.getCopyrightLink(); + if (copyrightLink) { copyrightLink.set({ - value: vendor.copyright, - url: vendor.url + font: "link-label-14" }); + this.add(copyrightLink); } - this.add(copyrightLink); }, } }); diff --git a/services/static-webserver/client/source/class/osparc/product/Utils.js b/services/static-webserver/client/source/class/osparc/product/Utils.js index 31501afeb34..f1b016e257a 100644 --- a/services/static-webserver/client/source/class/osparc/product/Utils.js +++ b/services/static-webserver/client/source/class/osparc/product/Utils.js @@ -205,6 +205,27 @@ qx.Class.define("osparc.product.Utils", { return "REGISTER"; }, + getCopyrightLink: function() { + const copyrightLink = new osparc.ui.basic.LinkLabel(); + const vendor = osparc.store.VendorInfo.getInstance().getVendor(); + if (vendor && "url" in vendor && "copyright" in vendor) { + let copyrightText = vendor.copyright; + // remove the copyright symbol (©) + copyrightText = copyrightText.replace("©", ""); + copyrightText = copyrightText.trim(); + // remove the year + copyrightText = copyrightText.replace(/^\d+\s/, ""); + // add the copyright symbol (©) and current year + copyrightText = `©${new Date().getFullYear()} ` + copyrightText; + copyrightLink.set({ + value: copyrightText, + url: vendor.url + }); + return copyrightLink; + } + return null; + }, + // All products except oSPARC hasIdlingTrackerEnabled: function() { const product = this.getProductName();