Skip to content

Commit d0e2003

Browse files
committed
slide-bar of login announcements
1 parent 624247e commit d0e2003

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

services/static-webserver/client/source/class/osparc/announcement/AnnouncementUIFactory.js

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,22 @@ qx.Class.define("osparc.announcement.AnnouncementUIFactory", {
110110
const loginAnnouncements = [];
111111
this.__announcements.forEach(announcement => {
112112
if (this.self().isValid(announcement, "login")) {
113-
loginAnnouncements.push(this.self().createLoginAnnouncement(announcement.getTitle(), announcement.getDescription()));
113+
const loginAnnouncement = this.self().createLoginAnnouncement(announcement.getTitle(), announcement.getDescription())
114+
loginAnnouncement.setWidth(osparc.auth.core.BaseAuthPage.FORM_WIDTH-5); // show 1-2 pixel of the nearby announcement
115+
loginAnnouncements.push(loginAnnouncement);
114116
}
115117
});
116-
const layout = new qx.ui.container.Composite(new qx.ui.layout.VBox(10));
117-
loginAnnouncements.forEach(loginAnnouncement => layout.add(loginAnnouncement));
118-
return layout;
118+
const slideBar = new osparc.widget.SlideBar().set({
119+
allowGrowX: true,
120+
});
121+
slideBar.getChildControl("button-backward").set({
122+
backgroundColor: "transparent"
123+
});
124+
slideBar.getChildControl("button-forward").set({
125+
backgroundColor: "transparent"
126+
});
127+
loginAnnouncements.forEach(loginAnnouncement => slideBar.add(loginAnnouncement));
128+
return slideBar;
119129
},
120130

121131
__addRibbonAnnouncement: function() {

0 commit comments

Comments
 (0)