Skip to content

Commit 1da38ba

Browse files
committed
grouped sections
1 parent a3acf1e commit 1da38ba

File tree

1 file changed

+14
-8
lines changed
  • services/static-webserver/client/source/class/osparc/support

1 file changed

+14
-8
lines changed

services/static-webserver/client/source/class/osparc/support/HomePage.js

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -80,46 +80,52 @@ qx.Class.define("osparc.support.HomePage", {
8080
control.addListener("execute", () => this.fireEvent("openConversation"));
8181
this._add(control);
8282
break;
83-
case "links-layout":
84-
control = new qx.ui.container.Composite(new qx.ui.layout.VBox(10));
83+
case "learning-box":
84+
control = new osparc.widget.SectionBox(this.tr("Learning"));
85+
this._add(control);
86+
break;
87+
case "references-box":
88+
control = new osparc.widget.SectionBox(this.tr("References"));
8589
this._add(control);
8690
break;
8791
}
8892
return control || this.base(arguments, id);
8993
},
9094

9195
__populateButtons: function() {
96+
const learningBox = this.getChildControl("learning-box");
9297
const quickStartButton = osparc.store.Support.getQuickStartButton();
9398
if (quickStartButton) {
94-
this.getChildControl("links-layout").add(quickStartButton);
99+
learningBox.add(quickStartButton);
95100
this.self().decorateButton(quickStartButton);
96101
}
97102

98103
const permissions = osparc.data.Permissions.getInstance();
99104
if (permissions.canDo("dashboard.templates.read")) {
100105
const tutorialsBtn = new qx.ui.form.Button(this.tr("Explore Tutorials"), "@FontAwesome5Solid/graduation-cap/14");
101-
this.getChildControl("links-layout").add(tutorialsBtn);
106+
learningBox.add(tutorialsBtn);
102107
this.self().decorateButton(tutorialsBtn);
103108
}
104109

105110
const guidedToursButton = osparc.store.Support.getGuidedToursButton();
106-
this.getChildControl("links-layout").add(guidedToursButton);
111+
learningBox.add(guidedToursButton);
107112
this.self().decorateButton(guidedToursButton);
108113

114+
const referencesBox = this.getChildControl("references-box");
109115
const manualButtons = osparc.store.Support.getManualButtons();
110116
manualButtons.forEach(manualButton => {
111-
this.getChildControl("links-layout").add(manualButton);
117+
referencesBox.add(manualButton);
112118
this.self().decorateButton(manualButton);
113119
});
114120

115121
const supportButtons = osparc.store.Support.getSupportButtons();
116122
supportButtons.forEach(supportButton => {
117-
this.getChildControl("links-layout").add(supportButton);
123+
referencesBox.add(supportButton);
118124
this.self().decorateButton(supportButton);
119125
});
120126

121127
const releaseNotesButton = osparc.store.Support.getReleaseNotesButton();
122-
this.getChildControl("links-layout").add(releaseNotesButton);
128+
this._add(releaseNotesButton);
123129
this.self().decorateButton(releaseNotesButton);
124130
},
125131
}

0 commit comments

Comments
 (0)