forked from MapComplete/MapComplete
chore: automated housekeeping...
This commit is contained in:
parent
8109c13b38
commit
297bb1c498
185 changed files with 2826 additions and 5874 deletions
|
|
@ -70,7 +70,7 @@ export class AndroidPolyfill {
|
|||
AndroidPolyfill.backfillGeolocation(AndroidPolyfill.databridgePlugin)
|
||||
}
|
||||
|
||||
public static async openLoginPage(){
|
||||
public static async openLoginPage() {
|
||||
await DatabridgePluginSingleton.request<{ oauth_token: string }>({ key: "open:login" })
|
||||
}
|
||||
public static async requestLoginCodes() {
|
||||
|
|
|
|||
|
|
@ -117,12 +117,12 @@ export class MangroveIdentity {
|
|||
return []
|
||||
}
|
||||
const allReviews = await MangroveReviews.getReviews({
|
||||
kid: pem
|
||||
kid: pem,
|
||||
})
|
||||
this.allReviewsById.setData(
|
||||
allReviews.reviews.map((r) => ({
|
||||
...r,
|
||||
...r.payload
|
||||
...r.payload,
|
||||
}))
|
||||
)
|
||||
})
|
||||
|
|
@ -283,7 +283,9 @@ export default class FeatureReviews {
|
|||
return cached
|
||||
}
|
||||
const themeIsSensitive = state.theme?.enableMorePrivacy
|
||||
const settings = state.osmConnection.getPreference<"always" | "yes" | "ask" | "hidden">("reviews-allowed")
|
||||
const settings = state.osmConnection.getPreference<"always" | "yes" | "ask" | "hidden">(
|
||||
"reviews-allowed"
|
||||
)
|
||||
const loadingAllowed = new UIEventSource(false)
|
||||
settings.addCallbackAndRun((s) => {
|
||||
console.log("Reviews allowed is", s)
|
||||
|
|
@ -329,7 +331,7 @@ export default class FeatureReviews {
|
|||
}
|
||||
const r: Review = {
|
||||
sub: this.subjectUri.data,
|
||||
...review
|
||||
...review,
|
||||
}
|
||||
const keypair: CryptoKeyPair = await this._identity.getKeypair()
|
||||
const jwt = await MangroveReviews.signReview(keypair, r)
|
||||
|
|
@ -344,7 +346,7 @@ export default class FeatureReviews {
|
|||
...r,
|
||||
kid,
|
||||
signature: jwt,
|
||||
madeByLoggedInUser: new ImmutableStore(true)
|
||||
madeByLoggedInUser: new ImmutableStore(true),
|
||||
}
|
||||
this._reviews.data.push(reviewWithKid)
|
||||
this._reviews.ping()
|
||||
|
|
@ -402,7 +404,7 @@ export default class FeatureReviews {
|
|||
signature: reviewData.signature,
|
||||
madeByLoggedInUser: this._identity.getKeyId().map((user_key_id) => {
|
||||
return reviewData.kid === user_key_id
|
||||
})
|
||||
}),
|
||||
})
|
||||
hasNew = true
|
||||
}
|
||||
|
|
@ -428,8 +430,8 @@ export default class FeatureReviews {
|
|||
} else if (this._uncertainty > 1000) {
|
||||
console.error(
|
||||
"Not fetching reviews. Only got a point and a very big uncertainty range (" +
|
||||
this._uncertainty +
|
||||
"), so you'd probably only get garbage. Specify a name"
|
||||
this._uncertainty +
|
||||
"), so you'd probably only get garbage. Specify a name"
|
||||
)
|
||||
return undefined
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue