Skip to content
Merged
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
2dcf0b4
reset folders
odeimaiz Sep 13, 2024
40b1f0a
remove current request
odeimaiz Sep 13, 2024
16f4ff6
minor
odeimaiz Sep 13, 2024
367639a
if resolveWResponse, attach params
odeimaiz Sep 13, 2024
64d12ae
lastParams
odeimaiz Sep 13, 2024
d0ee965
rename file
odeimaiz Sep 13, 2024
14774a0
ignoring
odeimaiz Sep 13, 2024
eb9926a
Merge branch 'master' into enh/tree-ii
odeimaiz Sep 16, 2024
df95a3f
changeContext from Container Header
odeimaiz Sep 16, 2024
fd4a8cd
minor
odeimaiz Sep 16, 2024
7573328
minor fix
odeimaiz Sep 16, 2024
4c1b855
new folder button
odeimaiz Sep 16, 2024
b4afa4d
remove console.logs
odeimaiz Sep 16, 2024
4cd339e
rely on folder's selection
odeimaiz Sep 16, 2024
300cdb2
reset workspaces list
odeimaiz Sep 16, 2024
2c1d3fe
comments
odeimaiz Sep 16, 2024
076f40c
Merge branch 'master' into enh/tree-ii
odeimaiz Sep 16, 2024
664d568
more consistent color scheme
odeimaiz Sep 16, 2024
f7ab773
undo coloring
odeimaiz Sep 16, 2024
ea34d6b
Merge branch 'enh/tree-ii' of github.com:odeimaiz/osparc-simcore into…
odeimaiz Sep 16, 2024
29977d4
add folder in my workspace
odeimaiz Sep 16, 2024
2c273db
Merge branch 'master' into enh/tree-iii
odeimaiz Sep 16, 2024
5afbe5b
minor
odeimaiz Sep 16, 2024
4aa7d31
Merge branch 'enh/tree-iii' of github.com:odeimaiz/osparc-simcore int…
odeimaiz Sep 16, 2024
9393786
smaller tag
odeimaiz Sep 16, 2024
ce2fbdd
WorkspacesAndFoldersTreeItem
odeimaiz Sep 16, 2024
abd3bf7
minor
odeimaiz Sep 16, 2024
a6c1605
fix tooltip
odeimaiz Sep 16, 2024
b5d12fe
disable billing settings
odeimaiz Sep 16, 2024
49d9ed8
error handling
odeimaiz Sep 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ qx.Class.define("osparc.dashboard.ResourceContainerManager", {


const workspacesContainer = this.__workspacesContainer = new osparc.dashboard.ToggleButtonContainer();
this._add(workspacesContainer);
workspacesContainer.setVisibility(osparc.utils.DisabledPlugins.isFoldersEnabled() ? "visible" : "excluded");


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ qx.Class.define("osparc.dashboard.ResourceFilter", {
this.__tagButtons = [];
layout.removeAll();
osparc.store.Store.getInstance().getTags().forEach((tag, idx) => {
const button = new qx.ui.form.ToggleButton(tag.name, "@FontAwesome5Solid/tag/20");
const button = new qx.ui.form.ToggleButton(tag.name, "@FontAwesome5Solid/tag/18");
button.id = tag.id;
button.set({
appearance: "filter-toggle-button",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -480,15 +480,16 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
// If user can't write in workspace, do not show plus button
return;
}
const newFolderCard = new osparc.dashboard.FolderButtonNew();
newFolderCard.setCardKey("new-folder");
newFolderCard.subscribeToFilterGroup("searchBarFilter");
newFolderCard.addListener("createFolder", e => {
const data = e.getData();
this.__createFolder(data);
}, this);
this._resourcesContainer.addNewFolderCard(newFolderCard);
}

const newFolderCard = new osparc.dashboard.FolderButtonNew();
newFolderCard.setCardKey("new-folder");
newFolderCard.subscribeToFilterGroup("searchBarFilter");
newFolderCard.addListener("createFolder", e => {
const data = e.getData();
this.__createFolder(data);
}, this);
this._resourcesContainer.addNewFolderCard(newFolderCard);
},

__createFolder: function(data) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,16 +122,6 @@ qx.Class.define("osparc.dashboard.WorkspaceHeader", {
}));
this._add(control);
break;
case "share-icon": {
control = new qx.ui.basic.Image().set({
alignY: "middle",
allowGrowX: false,
allowShrinkX: false
});
const layout = this.getChildControl("share-layout");
layout.addAt(control, 0);
break;
}
case "share-text": {
control = new qx.ui.basic.Label().set({
font: "text-14"
Expand Down Expand Up @@ -227,8 +217,24 @@ qx.Class.define("osparc.dashboard.WorkspaceHeader", {
this.__spacers.forEach(spacer => spacer.setVisibility(show ? "visible" : "excluded"));
},

__getShareIcon: function() {
// reset previous
const layout = this.getChildControl("share-layout");
if (this.__shareIcon) {
layout.remove(this.__shareIcon);
}

const shareIcon = this.__shareIcon = new qx.ui.basic.Image().set({
alignY: "middle",
allowGrowX: false,
allowShrinkX: false
});
layout.addAt(shareIcon, 0);
return shareIcon;
},

__applyAccessRights: function(accessRights) {
const shareIcon = this.getChildControl("share-icon");
const shareIcon = this.__getShareIcon();
const shareText = this.getChildControl("share-text");
if (accessRights && Object.keys(accessRights).length) {
osparc.dashboard.CardBase.populateShareIcon(shareIcon, accessRights);
Expand All @@ -248,7 +254,7 @@ qx.Class.define("osparc.dashboard.WorkspaceHeader", {
const roleText = this.getChildControl("role-text");
const roleIcon = this.getChildControl("role-icon");
if (value && Object.keys(value).length) {
editButton.show();
editButton.setVisibility(value["delete"] ? "visible" : "excluded");
const menu = new qx.ui.menu.Menu().set({
position: "bottom-right"
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ qx.Class.define("osparc.dashboard.WorkspacesAndFoldersTree", {
decorator: "no-border",
font: "text-14",
hideRoot: true,
paddingLeft: -10,
// paddingLeft: -10,
contentPadding: 0,
padding: 0,
});

this.__addMyWorkspace(rootModel);
Expand Down Expand Up @@ -102,6 +104,7 @@ qx.Class.define("osparc.dashboard.WorkspacesAndFoldersTree", {
__initTree: function() {
const that = this;
this.setDelegate({
createItem: () => new osparc.dashboard.WorkspacesAndFoldersTreeItem(),
bindItem: (c, item, id) => {
c.bindDefaultProperties(item, id);
c.bindProperty("", "open", {
Expand All @@ -115,12 +118,7 @@ qx.Class.define("osparc.dashboard.WorkspacesAndFoldersTree", {
return isOpen;
},
}, item, id);
},
configureItem: item => {
item.set({
indent: 12, // defaults to 19
});
},
}
});

this.setIconPath("icon");
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/* ************************************************************************

osparc - the simcore frontend

https://osparc.io

Copyright:
2024 IT'IS Foundation, https://itis.swiss

License:
MIT: https://opensource.org/licenses/MIT

Authors:
* Odei Maiz (odeimaiz)

************************************************************************ */

qx.Class.define("osparc.dashboard.WorkspacesAndFoldersTreeItem", {
extend: qx.ui.tree.VirtualTreeItem,

construct: function() {
this.base(arguments);

this.set({
indent: 12, // defaults to 19,
});

this.getContentElement().setStyles({
"border-radius": "8px"
});

this.setNotHoveredStyle();
this.__attachEventHandlers();
},

members: {
__attachEventHandlers: function() {
this.addListener("mouseover", () => {
this.setHoveredStyle();
});
this.addListener("mouseout", () => {
this.setNotHoveredStyle();
});
},

setHoveredStyle: function() {
osparc.utils.Utils.addBorder(this, 1, qx.theme.manager.Color.getInstance().resolve("text"));
},

setNotHoveredStyle: function() {
osparc.utils.Utils.hideBorder(this);
}
},
});