Skip to content

Commit f148110

Browse files
committed
market icons and rented category
1 parent 97bc8af commit f148110

File tree

7 files changed

+302
-2
lines changed

7 files changed

+302
-2
lines changed

services/static-webserver/client/source/class/osparc/desktop/preferences/pages/BasePage.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,16 @@ qx.Class.define("osparc.desktop.preferences.pages.BasePage", {
3030
paddingLeft: 15
3131
});
3232

33-
this.__showLabelOnTab(title)
33+
this.__showLabelOnTab(title);
34+
35+
const tabButton = this.getChildControl("button");
36+
if (tabButton.getIcon() && tabButton.getIcon().includes(".svg")) {
37+
tabButton.getChildControl("icon").set({
38+
minWidth: 24,
39+
minHeight: 24,
40+
scale: true,
41+
});
42+
}
3443
},
3544

3645
members: {

services/static-webserver/client/source/class/osparc/vipMarket/Market.js

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,27 @@ qx.Class.define("osparc.vipMarket.Market", {
4141
])
4242
.then(values => {
4343
const licensedItems = values[0];
44+
const purchasedItems = values[1];
4445
const categories = [];
46+
const rentedCategory = {
47+
categoryId: "rentedModels",
48+
label: this.tr("Rented"),
49+
icon: "osparc/market/RentedModels.svg",
50+
items: [],
51+
};
52+
categories.push(rentedCategory);
4553
licensedItems.forEach(licensedItem => {
54+
if (purchasedItems.find(purchasedItem => purchasedItem["licensedItemId"] === licensedItem["licensedItemId"])) {
55+
rentedCategory["items"].push(licensedItem);
56+
}
4657
if (licensedItem["licensedResourceData"] && licensedItem["licensedResourceData"]["categoryId"]) {
4758
const categoryId = licensedItem["licensedResourceData"]["categoryId"];
4859
let category = categories.find(cat => cat["categoryId"] === categoryId);
4960
if (!category) {
5061
category = {
5162
categoryId,
5263
label: licensedItem["licensedResourceData"]["categoryDisplay"] || "Category",
53-
icon: licensedItem["licensedResourceData"]["categoryIcon"] || "@FontAwesome5Solid/users/20",
64+
icon: licensedItem["licensedResourceData"]["categoryIcon"] || `osparc/market/${categoryId}.svg`,
5465
items: [],
5566
};
5667
categories.push(category);
Lines changed: 68 additions & 0 deletions
Loading
Lines changed: 48 additions & 0 deletions
Loading
Lines changed: 60 additions & 0 deletions
Loading
Lines changed: 51 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)