Skip to content

Commit 8079aa9

Browse files
committed
two buttons no intro
1 parent a03628a commit 8079aa9

File tree

2 files changed

+20
-16
lines changed

2 files changed

+20
-16
lines changed

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

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,16 @@ qx.Class.define("osparc.support.HomePage", {
2828
padding: 5,
2929
});
3030

31-
this.getChildControl("conversations-intro-text");
3231
if (osparc.store.Groups.getInstance().isSupportEnabled()) {
3332
this.getChildControl("ask-a-question");
33+
this.getChildControl("book-a-call");
3434
}
3535
this.__populateButtons();
3636
},
3737

3838
events: {
3939
"openConversation": "qx.event.type.Event",
40+
"openBookACall": "qx.event.type.Event",
4041
},
4142

4243
statics: {
@@ -66,17 +67,11 @@ qx.Class.define("osparc.support.HomePage", {
6667
_createChildControlImpl: function(id) {
6768
let control;
6869
switch (id) {
69-
case "conversations-intro-text": {
70-
control = new qx.ui.basic.Label().set({
71-
rich: true,
72-
font: "text-16",
73-
});
74-
const isSupportUser = osparc.store.Groups.getInstance().amIASupportUser();
75-
const userName = osparc.auth.Data.getInstance().getUserName();
76-
control.set({
77-
value: isSupportUser ?
78-
userName + ", " + this.tr("thanks for being here!<br>Let's help every user feel supported.") :
79-
this.tr("Hi there 👋<br>How can we help?"),
70+
case "conversation-buttons-layout": {
71+
control = new qx.ui.container.Composite(new qx.ui.layout.HBox(10)).set({
72+
// align it with the rest of the buttons in section boxes
73+
marginLeft: 11,
74+
marginRight: 11,
8075
});
8176
this._add(control);
8277
break;
@@ -86,12 +81,20 @@ qx.Class.define("osparc.support.HomePage", {
8681
gap: 8,
8782
appearance: "strong-button",
8883
center: true,
89-
// align it with the rest of the buttons in section boxes
90-
marginLeft: 11,
91-
marginRight: 11,
84+
width: 183,
9285
});
9386
control.addListener("execute", () => this.fireEvent("openConversation"));
94-
this._add(control);
87+
this.getChildControl("conversation-buttons-layout").add(control, { flex: 1 });
88+
break;
89+
case "book-a-call":
90+
control = new qx.ui.form.Button(this.tr("Book a Call"), "@FontAwesome5Solid/phone/16").set({
91+
gap: 8,
92+
appearance: "strong-button",
93+
center: true,
94+
width: 183,
95+
});
96+
control.addListener("execute", () => this.fireEvent("openBookACall"));
97+
this.getChildControl("conversation-buttons-layout").add(control, { flex: 1 });
9598
break;
9699
case "learning-box":
97100
control = new osparc.widget.SectionBox(this.tr("Learning"), "@FontAwesome5Solid/graduation-cap/14");

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ qx.Class.define("osparc.support.SupportCenter", {
130130
case "home-page":
131131
control = new osparc.support.HomePage();
132132
control.addListener("openConversation", () => this.openConversation(), this);
133+
control.addListener("openBookACall", () => this.createConversationBookCall(), this);
133134
this.getChildControl("main-stack").add(control);
134135
break;
135136
case "conversations-stack":

0 commit comments

Comments
 (0)