Skip to content

Commit e958a1a

Browse files
committed
minor
1 parent 11f129e commit e958a1a

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

services/static-webserver/client/source/class/osparc/dashboard/WorkspaceHeader.js

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,13 +170,15 @@ qx.Class.define("osparc.dashboard.WorkspaceHeader", {
170170
},
171171

172172
__buildLayout: function(workspaceId) {
173+
this.getChildControl("icon");
174+
const title = this.getChildControl("title");
173175
if (workspaceId === -2) {
174-
const title = this.getChildControl("title");
176+
this.__setIcon("@FontAwesome5Solid/search/24");
175177
title.setValue(this.tr("Search results"));
178+
return;
176179
}
177180

178-
this.getChildControl("icon");
179-
const title = this.getChildControl("title").set({
181+
title.set({
180182
cursor: "pointer"
181183
});
182184
title.addListener("tap", () => {
@@ -215,15 +217,21 @@ qx.Class.define("osparc.dashboard.WorkspaceHeader", {
215217
this._add(spacer);
216218
},
217219

218-
__setIcon: function(source) {
220+
__resetIcon: function() {
219221
const icon = this.getChildControl("icon");
220222
const image = icon.getChildControl("image");
221223
image.resetSource();
222224
icon.getContentElement().setStyles({
223225
"background-image": "none"
224226
});
227+
},
225228

229+
__setIcon: function(source) {
230+
this.__resetIcon();
231+
232+
const icon = this.getChildControl("icon");
226233
if (source.includes("@")) {
234+
const image = icon.getChildControl("image");
227235
image.set({
228236
source
229237
});

0 commit comments

Comments
 (0)