forked from MapComplete/MapComplete
UX: make settings available if not logged in
This commit is contained in:
parent
3bf099c14a
commit
87c68cedc7
4 changed files with 30 additions and 24 deletions
|
|
@ -146,7 +146,7 @@ export class OsmConnection {
|
|||
this.UpdateCapabilities()
|
||||
|
||||
this.isLoggedIn = this.userDetails.map(
|
||||
(user) => user !== undefined && (this.apiIsOnline.data === "unknown" || this.apiIsOnline.data === "online"),
|
||||
(user) => user !== undefined && this.apiIsOnline.data === "online",
|
||||
[this.apiIsOnline]
|
||||
)
|
||||
|
||||
|
|
@ -578,8 +578,10 @@ export class OsmConnection {
|
|||
if (!(this.apiIsOnline.data === "unreachable" || this.apiIsOnline.data === "offline")) {
|
||||
return
|
||||
}
|
||||
if (!this.isLoggedIn.data) {
|
||||
return
|
||||
}
|
||||
try {
|
||||
console.log("Api is offline - trying to reconnect...")
|
||||
this.AttemptLogin()
|
||||
} catch (e) {
|
||||
console.log("Could not login due to", e)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue