forked from MapComplete/MapComplete
Add a personal, configurable quest
This commit is contained in:
parent
9c42839f01
commit
7ec00a3301
21 changed files with 376 additions and 237 deletions
|
@ -216,7 +216,6 @@ export class OsmConnection {
|
|||
self.preferences.data[k] = v;
|
||||
}
|
||||
self.preferences.ping();
|
||||
CustomLayersState.InitFavouriteLayer();
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -234,6 +233,24 @@ export class OsmConnection {
|
|||
|
||||
this.preferences.data[k] = v;
|
||||
this.preferences.ping();
|
||||
|
||||
if(v === ""){
|
||||
this.auth.xhr({
|
||||
method: 'DELETE',
|
||||
path: '/api/0.6/user/preferences/' + k,
|
||||
options: {header: {'Content-Type': 'text/plain'}},
|
||||
}, function (error, result) {
|
||||
if (error) {
|
||||
console.log("Could not remove preference", error);
|
||||
return;
|
||||
}
|
||||
|
||||
console.log("Preference removed!", result == "" ? "OK" : result);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
this.auth.xhr({
|
||||
method: 'PUT',
|
||||
path: '/api/0.6/user/preferences/' + k,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue