forked from MapComplete/MapComplete
Merge branch 'develop' of source.mapcomplete.org:mapcomplete/mapcomplete into develop
This commit is contained in:
commit
2368f292be
4 changed files with 23 additions and 3 deletions
|
@ -80,10 +80,22 @@ To use the WSL in Visual Studio Code:
|
|||
or `userlayout=true#<layout configuration>` as [Query parameter](URL_Parameters.md). Note that the shorter URLs (
|
||||
e.g. `bookcases.html`, `aed.html`, ...) _don't_ exist on the development version.
|
||||
|
||||
|
||||
Developing a local theme
|
||||
------------------------
|
||||
|
||||
To test theme changes you locally make, the easiest way is:
|
||||
|
||||
- `npm run strt` which will run the server
|
||||
- After making changes to some layers and/or themes, run `npm run generate:layeroverview`. This will recompile the relevant themes.
|
||||
- You might need to refresh (F5) your browser window
|
||||
|
||||
Note that `npm run start` is equivalent to `npm run generate:layeroverview && npm run strt`
|
||||
|
||||
Automatic deployment
|
||||
--------------------
|
||||
|
||||
Currently, the master branch is automatically deployed to https://mapcomplete.org/ by a GitHub action.
|
||||
Currently, the master branch is automatically deployed to https://mapcomplete.org/ by a Forgejo action.
|
||||
|
||||
Every branch is automatically built (upon push) to `https://pietervdvn.github.io/mc/<branchname>` by a GitHub action.
|
||||
|
||||
|
|
|
@ -33,6 +33,9 @@ connection.finishLogin(async () => {
|
|||
})
|
||||
debug.set(dbg)
|
||||
|
||||
if(attempt > 10){
|
||||
window.location.reload()
|
||||
}
|
||||
} while (!token)
|
||||
console.log("Login finished, redirecting to passthrough; token is " + token)
|
||||
tokenSrc.set(token)
|
||||
|
|
|
@ -583,9 +583,14 @@ export class OsmConnection {
|
|||
}
|
||||
|
||||
private async loginAndroidPolyfill() {
|
||||
const key = "https://www.openstreetmap.orgoauth2_access_token"
|
||||
if(localStorage.getItem(key)){
|
||||
// We are probably already logged in
|
||||
return
|
||||
}
|
||||
const token = await AndroidPolyfill.requestLoginCodes()
|
||||
console.log("Got login token!", token)
|
||||
localStorage.setItem("https://www.openstreetmap.orgoauth2_access_token", token)
|
||||
localStorage.setItem(key, token)
|
||||
if (this.auth.authenticated()) {
|
||||
console.log("Logged in!")
|
||||
}
|
||||
|
|
|
@ -182,7 +182,7 @@ export default class FeatureSwitchState extends OsmConnectionFeatureSwitches {
|
|||
|
||||
let testingDefaultValue = false
|
||||
if (
|
||||
!Constants.osmAuthConfig.url.startsWith("https://master.apis.dev.openstreetmap.org") && (location.hostname === "127.0.0.1") && !Utils.runningFromConsole
|
||||
!Constants.osmAuthConfig.url.startsWith("https://master.apis.dev.openstreetmap.org") && !Utils.runningFromConsole && location.hostname === "127.0.0.1"
|
||||
) {
|
||||
testingDefaultValue = true
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue