Skip to content

Commit 1624b5d

Browse files
committed
wording
1 parent 3fc85c8 commit 1624b5d

File tree

1 file changed

+23
-14
lines changed

1 file changed

+23
-14
lines changed

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

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ qx.Class.define("osparc.dashboard.ResourceContainerManager", {
3131
this.__foldersList = [];
3232
this.__resourcesList = [];
3333
this.__groupedContainersList = [];
34+
this.__resourceType = resourceType || "study";
3435

3536
if (resourceType === "study") {
3637
const workspacesContainer = this.__workspacesContainer = new osparc.dashboard.CardContainer();
@@ -135,26 +136,34 @@ qx.Class.define("osparc.dashboard.ResourceContainerManager", {
135136
__groupedContainersList: null,
136137
__foldersContainer: null,
137138
__workspacesContainer: null,
138-
__noResourcesFound: null,
139139
__nonGroupedContainer: null,
140140
__groupedContainers: null,
141+
__resourceType: null,
142+
__noResourcesFound: null,
141143

142-
__evaluateNoResourcesFoundLabel: function(cards, context) {
144+
__evaluateNoResourcesFoundLabel: function(cards) {
143145
if (this.__noResourcesFound) {
144146
let text = null;
145-
switch (context) {
146-
case "studiesAndFolders":
147-
case "searchProjects":
148-
text = this.tr("No Projects found");
149-
break;
150-
case "templates":
151-
case "searchTemplates":
152-
text = this.tr("No Templates found");
153-
break;
154-
case "publicTemplates":
155-
case "searchPublicTemplates":
156-
text = this.tr("No Public Projects found");
147+
switch (this.__resourceType) {
148+
case "study": {
149+
const studyBrowserContext = osparc.store.Store.getInstance().getStudyBrowserContext();
150+
switch (studyBrowserContext) {
151+
case "studiesAndFolders":
152+
case "searchProjects":
153+
case "trash":
154+
text = this.tr("No Projects found");
155+
break;
156+
case "templates":
157+
case "searchTemplates":
158+
text = this.tr("No Templates found");
159+
break;
160+
case "publicTemplates":
161+
case "searchPublicTemplates":
162+
text = this.tr("No Public Projects found");
163+
break;
164+
}
157165
break;
166+
}
158167
case "template":
159168
text = this.tr("No Tutorials found");
160169
break;

0 commit comments

Comments
 (0)