Skip to content

Commit edb096e

Browse files
committed
less intro
1 parent 8079aa9 commit edb096e

File tree

3 files changed

+7
-35
lines changed

3 files changed

+7
-35
lines changed

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

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@ qx.Class.define("osparc.support.Conversations", {
2323
this.base(arguments);
2424

2525
this._setLayout(new qx.ui.layout.VBox(10));
26-
27-
this.__noConversationsLabel = new qx.ui.basic.Label("No conversations yet — your messages will appear here.").set({
28-
padding: 5,
29-
});
3026
this.__conversationListItems = [];
3127

3228
this.__fetchConversations();
@@ -39,7 +35,6 @@ qx.Class.define("osparc.support.Conversations", {
3935
},
4036

4137
members: {
42-
__noConversationsLabel: null,
4338
__conversationListItems: null,
4439

4540
_createChildControlImpl: function(id) {
@@ -72,9 +67,6 @@ qx.Class.define("osparc.support.Conversations", {
7267
.then(conversations => {
7368
if (conversations.length) {
7469
conversations.forEach(conversation => this.__addConversation(conversation));
75-
} else {
76-
// No conversations found
77-
this.getChildControl("conversations-layout").add(this.__noConversationsLabel);
7870
}
7971
})
8072
.finally(() => {
@@ -91,12 +83,6 @@ qx.Class.define("osparc.support.Conversations", {
9183
},
9284

9385
__addConversation: function(conversation) {
94-
const conversationsLayout = this.getChildControl("conversations-layout");
95-
// remove the noConversationsLabel
96-
if (conversationsLayout && conversationsLayout.getChildren().indexOf(this.__noConversationsLabel) > -1) {
97-
conversationsLayout.remove(this.__noConversationsLabel);
98-
}
99-
10086
// ignore it if it was already there
10187
const conversationId = conversation.getConversationId();
10288
const conversationItemFound = this.__getConversationItem(conversationId);
@@ -107,6 +93,7 @@ qx.Class.define("osparc.support.Conversations", {
10793
const conversationListItem = new osparc.support.ConversationListItem();
10894
conversationListItem.setConversation(conversation);
10995
conversationListItem.addListener("tap", () => this.fireDataEvent("openConversation", conversationId, this));
96+
const conversationsLayout = this.getChildControl("conversations-layout");
11097
conversationsLayout.add(conversationListItem);
11198
this.__conversationListItems.push(conversationListItem);
11299

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

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ qx.Class.define("osparc.support.ConversationsPage", {
2424

2525
this._setLayout(new qx.ui.layout.VBox(15));
2626

27-
this.getChildControl("conversations-intro-text");
2827
this.getChildControl("conversations-list");
2928
this.getChildControl("ask-a-question-button");
3029
this.getChildControl("book-a-call-button");
@@ -39,20 +38,6 @@ qx.Class.define("osparc.support.ConversationsPage", {
3938
_createChildControlImpl: function(id) {
4039
let control;
4140
switch (id) {
42-
case "conversations-intro-text": {
43-
control = new qx.ui.basic.Label().set({
44-
rich: true,
45-
font: "text-14",
46-
});
47-
const isSupportUser = osparc.store.Groups.getInstance().amIASupportUser();
48-
control.set({
49-
value: isSupportUser ?
50-
this.tr("Thanks for being here! Let's help every user feel supported.") :
51-
this.tr("Need help or want to share feedback? You're in the right place."),
52-
});
53-
this._add(control);
54-
break;
55-
}
5641
case "conversations-list": {
5742
control = new osparc.support.Conversations();
5843
control.addListener("openConversation", e => {

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ qx.Class.define("osparc.support.HomePage", {
2929
});
3030

3131
if (osparc.store.Groups.getInstance().isSupportEnabled()) {
32-
this.getChildControl("ask-a-question");
33-
this.getChildControl("book-a-call");
32+
this.getChildControl("ask-a-question-button");
33+
this.getChildControl("book-a-call-button");
3434
}
3535
this.__populateButtons();
3636
},
3737

3838
events: {
3939
"openConversation": "qx.event.type.Event",
40-
"openBookACall": "qx.event.type.Event",
40+
"createConversationBookCall": "qx.event.type.Event",
4141
},
4242

4343
statics: {
@@ -76,7 +76,7 @@ qx.Class.define("osparc.support.HomePage", {
7676
this._add(control);
7777
break;
7878
}
79-
case "ask-a-question":
79+
case "ask-a-question-button":
8080
control = new qx.ui.form.Button(this.tr("Ask a Question"), "@FontAwesome5Solid/comments/16").set({
8181
gap: 8,
8282
appearance: "strong-button",
@@ -86,14 +86,14 @@ qx.Class.define("osparc.support.HomePage", {
8686
control.addListener("execute", () => this.fireEvent("openConversation"));
8787
this.getChildControl("conversation-buttons-layout").add(control, { flex: 1 });
8888
break;
89-
case "book-a-call":
89+
case "book-a-call-button":
9090
control = new qx.ui.form.Button(this.tr("Book a Call"), "@FontAwesome5Solid/phone/16").set({
9191
gap: 8,
9292
appearance: "strong-button",
9393
center: true,
9494
width: 183,
9595
});
96-
control.addListener("execute", () => this.fireEvent("openBookACall"));
96+
control.addListener("execute", () => this.fireEvent("createConversationBookCall"));
9797
this.getChildControl("conversation-buttons-layout").add(control, { flex: 1 });
9898
break;
9999
case "learning-box":

0 commit comments

Comments
 (0)