mirror of
https://github.com/FoggedLens/iD.git
synced 2026-03-24 13:00:26 +01:00
Write changeset tags for new mappers to indicate walkthrough progress
These tags all start with `ideditor:` (closes #3968) ``` ideditor:walkthrough_completed=yes ideditor:walkthrough_progress=welcome;navigation;point;area;line;building;startEditing ideditor:walkthrough_started=yes ```
This commit is contained in:
@@ -14,6 +14,7 @@ var changeset;
|
||||
var readOnlyTags = [
|
||||
/^changesets_count$/,
|
||||
/^created_by$/,
|
||||
/^ideditor:/,
|
||||
/^imagery_used$/,
|
||||
/^host$/,
|
||||
/^locale$/
|
||||
@@ -335,6 +336,25 @@ export function uiCommit(context) {
|
||||
// always update userdetails, just in case user reauthenticates as someone else
|
||||
if (userDetails && userDetails.changesets_count !== undefined) {
|
||||
tags.changesets_count = String(userDetails.changesets_count);
|
||||
|
||||
// first 100 edits - new user
|
||||
if (parseInt(tags.changesets_count, 10) < 100) {
|
||||
var s;
|
||||
s = context.storage('walkthrough_completed');
|
||||
if (s) {
|
||||
tags['ideditor:walkthrough_completed'] = s;
|
||||
}
|
||||
|
||||
s = context.storage('walkthrough_progress');
|
||||
if (s) {
|
||||
tags['ideditor:walkthrough_progress'] = s;
|
||||
}
|
||||
|
||||
s = context.storage('walkthrough_started');
|
||||
if (s) {
|
||||
tags['ideditor:walkthrough_started'] = s;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
delete tags.changesets_count;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user