From 66904c061ae92cf4abb3fe6b07dcb36de42eedbb Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Fri, 16 Jul 2021 11:14:05 +0200 Subject: [PATCH] Add per user mock upload toggle with warnings --- frontend/App.vue | 17 ++++++++++++++++- matcher/model.py | 1 + templates/map.html | 1 + 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/frontend/App.vue b/frontend/App.vue index 4b83a05..f42150d 100644 --- a/frontend/App.vue +++ b/frontend/App.vue @@ -54,7 +54,21 @@
-

{{ edits.length }} edits to upload

+ + + +

+ {{ edits.length + (edits.length == 1 ? " edit" : " edits") }} to upload +

@@ -590,6 +604,7 @@ export default { startMode: String, q: String, defaultComment: String, + mockUpload: Boolean, }, data() { return { diff --git a/matcher/model.py b/matcher/model.py index 84de394..dbab7b0 100644 --- a/matcher/model.py +++ b/matcher/model.py @@ -327,6 +327,7 @@ class User(Base, UserMixin): multi = Column(String) units = Column(String) wikipedia_tag = Column(Boolean, default=False) + mock_upload = Column(Boolean, default=True) osm_id = Column(Integer, index=True) osm_account_created = Column(DateTime) diff --git a/templates/map.html b/templates/map.html index 212db3e..f385a6a 100644 --- a/templates/map.html +++ b/templates/map.html @@ -28,6 +28,7 @@ username: {{ username | tojson }}, startMode: {{ mode | tojson }}, q: {{ q | tojson }}, + mockUpload: {{ g.user.is_authenticated and g.user.mock_upload | tojson }}, }; const app = createApp(App, props).mount('#app');