diff --git a/Logic/OsmConnection.ts b/Logic/OsmConnection.ts
index c347fe7..ca10f13 100644
--- a/Logic/OsmConnection.ts
+++ b/Logic/OsmConnection.ts
@@ -49,6 +49,9 @@ export class OsmConnection {
public LogOut() {
this.auth.logout();
+ this.userDetails.data.loggedIn = false;
+ this.userDetails.ping();
+ console.log("Logged out")
}
public AttemptLogin() {
@@ -76,7 +79,7 @@ export class OsmConnection {
let data = self.userDetails.data;
data.loggedIn = true;
- console.log(userInfo);
+ console.log("Log incompleted, userinfo is ", userInfo);
data.name = userInfo.getAttribute('display_name');
data.csCount = userInfo.getElementsByTagName("changesets")[0].getAttribute("count");
diff --git a/README.md b/README.md
index 45a305a..5cd3832 100644
--- a/README.md
+++ b/README.md
@@ -77,6 +77,8 @@ Camera Icon, Dave Gandy, CC-BY-SA 3.0
https://commons.wikimedia.org/wiki/File:OOjs_UI_indicator_search-rtl.svg
Search Icon, MIT
+
+
https://commons.wikimedia.org/wiki/File:Home-icon.svg
Home icon by Timothy Miller, CC-BY-SA 3.0
diff --git a/UI/UserBadge.ts b/UI/UserBadge.ts
index 21bd7d0..26eb303 100644
--- a/UI/UserBadge.ts
+++ b/UI/UserBadge.ts
@@ -22,15 +22,20 @@ export class UserBadge extends UIElement {
this._userDetails = userDetails;
this._pendingChanges = pendingChanges;
this._basemap = basemap;
-
- this._logout = new FixedUiElement("")
- .onClick(() => {userDetails.data.osmConnection.LogOut();});
+
+ this._logout = new FixedUiElement("
")
+ .onClick(() => {
+ userDetails.data.osmConnection.LogOut();
+ });
userDetails.addCallback(function () {
const profilePic = document.getElementById("profile-pic");
- profilePic.onload = function () {
- profilePic.style.opacity = "1"
- };
+ if (profilePic) {
+
+ profilePic.onload = function () {
+ profilePic.style.opacity = "1"
+ };
+ }
});
}
@@ -92,6 +97,7 @@ export class UserBadge extends UIElement {
" " +
"
" + user.csCount +
" " +
+ this._logout.Render() +
this._pendingChanges.Render() +
"