First working version of fully automatic uploader

This commit is contained in:
Pieter Vander Vennet 2021-12-13 02:05:34 +01:00
parent 04dc373b1e
commit e922768f99
21 changed files with 342 additions and 106 deletions

View file

@ -70,7 +70,8 @@ export class OsmConnection {
// Used to keep multiple changesets open and to write to the correct changeset
layoutName: string,
singlePage?: boolean,
osmConfiguration?: "osm" | "osm-test"
osmConfiguration?: "osm" | "osm-test",
attemptLogin?: true | boolean
}
) {
this.fakeUser = options.fakeUser ?? false;
@ -117,7 +118,7 @@ export class OsmConnection {
options.oauth_token.setData(undefined);
}
if (this.auth.authenticated()) {
if (this.auth.authenticated() && (options.attemptLogin !== false)) {
this.AttemptLogin(); // Also updates the user badge
} else {
console.log("Not authenticated");