Skip to content

Commit fed9d78

Browse files
committed
minor
1 parent d4c1871 commit fed9d78

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

services/static-webserver/client/source/class/osparc/TooSmallDialog.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,17 +61,21 @@ qx.Class.define("osparc.TooSmallDialog", {
6161
const layout = new qx.ui.container.Composite(new qx.ui.layout.HBox().set({
6262
alignX: "right"
6363
}));
64-
const authData = osparc.auth.Data.getInstance();
65-
authData.bind("loggedIn", layout, "visibility", {
66-
converter: isLoggedIn => isLoggedIn ? "visible" : "excluded"
67-
});
6864

69-
const button = new qx.ui.form.Button(authData.isGuest() ? this.tr("Exit") : this.tr("Log out")).set({
65+
const button = new qx.ui.form.Button().set({
7066
allowGrowX: false
7167
});
7268
button.addListener("execute", () => qx.core.Init.getApplication().logout());
7369
layout.add(button);
7470

71+
const authData = osparc.auth.Data.getInstance();
72+
authData.bind("loggedIn", layout, "visibility", {
73+
converter: isLoggedIn => isLoggedIn ? "visible" : "excluded"
74+
});
75+
authData.bind("guest", button, "label", {
76+
converter: isGuest => isGuest ? this.tr("Exit") : this.tr("Log out")
77+
});
78+
7579
return layout;
7680
},
7781
}

services/static-webserver/client/source/class/osparc/WindowSizeTracker.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ qx.Class.define("osparc.WindowSizeTracker", {
8383
this.__tooSmallDialog.open();
8484
} else {
8585
this.__tooSmallDialog = osparc.TooSmallDialog.openWindow();
86+
this.__tooSmallDialog.addListener("close", () => {
87+
this.__tooSmallDialog = null;
88+
}, this);
8689
}
8790
} else if (this.__tooSmallDialog) {
8891
this.__tooSmallDialog.close();

0 commit comments

Comments
 (0)