From 870c8b7f058a1b1e464a296ba180a2facf636682 Mon Sep 17 00:00:00 2001 From: matusdrobuliak66 Date: Thu, 5 Jun 2025 08:12:40 +0200 Subject: [PATCH] =?UTF-8?q?Revert=20"=F0=9F=8E=A8=20[Frontend]=20Second=20?= =?UTF-8?q?app=20on=20Sim4Life.lite=20(#7807)"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit c6d1b64a6b7a1e176dc1f751c694bfbe63d72716. --- .../client/source/class/osparc/editor/HtmlEditor.js | 3 +-- .../client/source/class/osparc/editor/MarkdownEditor.js | 3 +-- .../client/source/class/osparc/editor/TextEditor.js | 6 ++++-- .../client/source/class/osparc/info/CommentUI.js | 9 ++------- .../client/source/class/osparc/utils/Avatar.js | 7 ++++++- .../client/source/resource/osparc/ui_config.json | 5 ----- 6 files changed, 14 insertions(+), 19 deletions(-) diff --git a/services/static-webserver/client/source/class/osparc/editor/HtmlEditor.js b/services/static-webserver/client/source/class/osparc/editor/HtmlEditor.js index 21b09135f4dc..5cc4f16fe71d 100644 --- a/services/static-webserver/client/source/class/osparc/editor/HtmlEditor.js +++ b/services/static-webserver/client/source/class/osparc/editor/HtmlEditor.js @@ -26,8 +26,7 @@ qx.Class.define("osparc.editor.HtmlEditor", { this.getChildControl("preview-html"); this.getChildControl("subtitle").set({ - value: this.tr("Supports HTML"), - url: "https://en.wikipedia.org/wiki/HTML", + value: this.tr("Supports HTML") }); }, diff --git a/services/static-webserver/client/source/class/osparc/editor/MarkdownEditor.js b/services/static-webserver/client/source/class/osparc/editor/MarkdownEditor.js index 0aa96f7781c4..2d08dc0bcf65 100644 --- a/services/static-webserver/client/source/class/osparc/editor/MarkdownEditor.js +++ b/services/static-webserver/client/source/class/osparc/editor/MarkdownEditor.js @@ -31,8 +31,7 @@ qx.Class.define("osparc.editor.MarkdownEditor", { this.getChildControl("preview-markdown"); this.getChildControl("subtitle").set({ - value: this.tr("Markdown supported"), - url: "https://en.wikipedia.org/wiki/Markdown", + value: this.tr("Markdown supported") }); }, diff --git a/services/static-webserver/client/source/class/osparc/editor/TextEditor.js b/services/static-webserver/client/source/class/osparc/editor/TextEditor.js index 1acf44f50b52..6aacc3c560fd 100644 --- a/services/static-webserver/client/source/class/osparc/editor/TextEditor.js +++ b/services/static-webserver/client/source/class/osparc/editor/TextEditor.js @@ -81,13 +81,15 @@ qx.Class.define("osparc.editor.TextEditor", { writePage.add(control, { flex: 1 }); - const subtitle = this.getChildControl("subtitle"); + const subtitle = this.getChildControl("subtitle").set({ + value: this.tr("Supports HTML") + }); writePage.add(subtitle); tabs.add(writePage); break; } case "subtitle": - control = new osparc.ui.basic.LinkLabel().set({ + control = new qx.ui.basic.Label().set({ font: "text-12" }); this._add(control); diff --git a/services/static-webserver/client/source/class/osparc/info/CommentUI.js b/services/static-webserver/client/source/class/osparc/info/CommentUI.js index 222631985640..d945cd65f8e9 100644 --- a/services/static-webserver/client/source/class/osparc/info/CommentUI.js +++ b/services/static-webserver/client/source/class/osparc/info/CommentUI.js @@ -113,8 +113,10 @@ qx.Class.define("osparc.info.CommentUI", { __buildLayout: function() { const thumbnail = this.getChildControl("thumbnail"); + thumbnail.setSource(osparc.utils.Avatar.emailToThumbnail("", "", 32)); const userName = this.getChildControl("user-name"); + userName.setValue("Unknown"); const date = new Date(this.__comment["modified"]); const date2 = osparc.utils.Utils.formatDateAndTime(date); @@ -129,14 +131,7 @@ qx.Class.define("osparc.info.CommentUI", { if (user) { thumbnail.setSource(user.getThumbnail()); userName.setValue(user.getLabel()); - } else { - thumbnail.setSource(osparc.utils.Avatar.emailToThumbnail()); - userName.setValue("Unknown user"); } - }) - .catch(() => { - thumbnail.setSource(osparc.utils.Avatar.emailToThumbnail()); - userName.setValue("Unknown user"); }); this.getChildControl("spacer"); diff --git a/services/static-webserver/client/source/class/osparc/utils/Avatar.js b/services/static-webserver/client/source/class/osparc/utils/Avatar.js index fc6030c8fcc8..c108a6613559 100644 --- a/services/static-webserver/client/source/class/osparc/utils/Avatar.js +++ b/services/static-webserver/client/source/class/osparc/utils/Avatar.js @@ -34,7 +34,12 @@ qx.Class.define("osparc.utils.Avatar", { type: "static", statics: { - emailToThumbnail: function(email = "", username = "??", size = 32) { + emailToThumbnail: function(email, username) { + return this.__getUrl(email, username, 32); + }, + + __getUrl: function(email, username, size = 100) { + email = email || ""; // MD5 (Message-Digest Algorithm) by WebToolkit const MD5 = function(s) { function L(k, d) { diff --git a/services/static-webserver/client/source/resource/osparc/ui_config.json b/services/static-webserver/client/source/resource/osparc/ui_config.json index 655adf60f869..157e0426c57d 100644 --- a/services/static-webserver/client/source/resource/osparc/ui_config.json +++ b/services/static-webserver/client/source/resource/osparc/ui_config.json @@ -156,11 +156,6 @@ "title": "${replace_me_product_name}", "newStudyLabel": "New Project", "idToWidget": "startS4LButton" - }, { - "resourceType": "service", - "expectedKey": "simcore/services/dynamic/s4l-ui-framework", - "title": "Sim4Life.framework", - "newStudyLabel": "Sim4Life.framework" }] } },