From 7e5cdb881aea10c6f01e2fdff50436b0a2713d4e Mon Sep 17 00:00:00 2001 From: "Phyks (Lucas Verney)" Date: Sat, 30 Jun 2018 22:54:38 +0200 Subject: [PATCH] Add a new obstacle report type --- README.md | 12 ++ src/assets/interrupt.svg | 371 +++++++++++++++++++++++++++++++++ src/assets/interruptMarker.svg | 160 ++++++++++++++ src/assets/obstacle.svg | 295 +++++++++----------------- src/assets/obstacleMarker.svg | 221 ++++++++++++-------- src/components/About.vue | 8 +- src/constants.js | 19 +- src/i18n/en.js | 10 +- src/i18n/fr.js | 10 +- 9 files changed, 809 insertions(+), 297 deletions(-) create mode 100644 src/assets/interrupt.svg create mode 100644 src/assets/interruptMarker.svg diff --git a/README.md b/README.md index 321131f..a597071 100644 --- a/README.md +++ b/README.md @@ -109,3 +109,15 @@ to spawn the server-side part, listening on `localhost:8081`. This software is licensed under an MIT license, unless explicitly mentionned otherwise. + +Icons are made from the original works: +* [Bike icon](https://commons.wikimedia.org/wiki/File:Ic_directions_bike_48px.svg) + licensed under CC BY on Wikimedia. +* [Car icon](https://commons.wikimedia.org/wiki/File:Car_icon_top.svg) + licensed under CC BY-SA on Wikimedia. +* [Pothole icon](https://commons.wikimedia.org/wiki/File:France_road_sign_A2a.svg) + licensed under CC BY-SA on Wikimedia. +* [Work icons](https://www.vecteezy.com/vector-art/87351-road-traffic-cartoon-icons-vector) + were designed by Vecteezy. +* [Trash icon](https://pixabay.com/en/trash-waste-trashcan-garbage-99257/) is + coming from Pixabay under CC0 license. diff --git a/src/assets/interrupt.svg b/src/assets/interrupt.svg new file mode 100644 index 0000000..c922b28 --- /dev/null +++ b/src/assets/interrupt.svg @@ -0,0 +1,371 @@ + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/assets/interruptMarker.svg b/src/assets/interruptMarker.svg new file mode 100644 index 0000000..55a4012 --- /dev/null +++ b/src/assets/interruptMarker.svg @@ -0,0 +1,160 @@ + +image/svg+xml \ No newline at end of file diff --git a/src/assets/obstacle.svg b/src/assets/obstacle.svg index 1bf2bda..f49f121 100644 --- a/src/assets/obstacle.svg +++ b/src/assets/obstacle.svg @@ -6,61 +6,61 @@ xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" - width="200" - height="100" - viewBox="0 0 52.916666 26.458334" + id="svg8" version="1.1" - id="svg8"> + viewBox="0 0 52.916666 26.458334" + height="100" + width="200"> + patternTransform="matrix(0.00750367,0.00298396,-0.01306779,0.03286117,47.822171,276.73419)" /> - - - - - - - - - - + + + + + + + + + + + width="709.14825" + height="15.437531" + x="-531.86121" + y="309.52475" + transform="matrix(0.50598324,-0.86254331,0.86943888,0.49404052,0,0)" /> + transform="translate(0,-270.54165)" + id="layer1"> + style="stroke:none;stroke-opacity:1"> + id="path1597" /> + id="path1599" /> + style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#231f20;stroke-width:1.45679581;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:5.82718337, 5.82718337;stroke-dashoffset:0;stroke-opacity:1" /> - - - - - - - - - - - - - - - - - - - - - - - - - + style="fill:#231f20;fill-opacity:1;stroke:none;stroke-opacity:1" + id="g4408" + transform="matrix(-0.00907326,0.17020704,-0.17430561,0.14631967,42.206247,269.70626)"> - - + style="fill:#231f20;fill-opacity:1;stroke:none;stroke-opacity:1" + transform="matrix(1.8213662,-2.1187127,2.1697311,-0.11294263,-2521.5719,2160.5579)" + id="surface221942"> - + style="fill:#231f20;fill-opacity:1;stroke:none;stroke-opacity:1" + transform="matrix(0.75,-1.3966098e-8,0,0.75,899.35232,180.97661)" + id="g5169"> + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + id="path4568" /> diff --git a/src/assets/obstacleMarker.svg b/src/assets/obstacleMarker.svg index d729b09..3160200 100644 --- a/src/assets/obstacleMarker.svg +++ b/src/assets/obstacleMarker.svg @@ -5,96 +5,143 @@ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" - version="1.1" - id="Layer_1" - x="0px" - y="0px" - width="64" - height="64" + xmlns:xlink="http://www.w3.org/1999/xlink" + xml:space="preserve" viewBox="0 0 64.000001 64" - xml:space="preserve">image/svg+xml \ No newline at end of file + id="path4169" /> \ No newline at end of file diff --git a/src/components/About.vue b/src/components/About.vue index 0ea7249..250ebb2 100644 --- a/src/components/About.vue +++ b/src/components/About.vue @@ -9,13 +9,13 @@

{{ $t('about.availableReportsTitle') }}

    -
  • {{ $t('reportLabels.gcum') }}{{ $t('misc.spaceBeforeDoublePunctuations') }}: {{ $t('about.gcumDescription') }}
  • -
  • {{ $t('reportLabels.interrupt') }}{{ $t('misc.spaceBeforeDoublePunctuations') }}: {{ $t('about.interruptDescription') }}
  • -
  • {{ $t('reportLabels.pothole') }}{{ $t('misc.spaceBeforeDoublePunctuations') }}: {{ $t('about.potholeDescription') }}
  • +
  • {{ $t('reportLabels.gcum') }}{{ $t('misc.spaceBeforeDoublePunctuations') }}: {{ $t('reportLabels.gcumDescription') }}
  • +
  • {{ $t('reportLabels.interrupt') }}{{ $t('misc.spaceBeforeDoublePunctuations') }}: {{ $t('reportLabels.interruptDescription') }}
  • +
  • {{ $t('reportLabels.obstacle') }}{{ $t('misc.spaceBeforeDoublePunctuations') }}: {{ $t('reportLabels.obstacleDescription') }}
  • +
  • {{ $t('reportLabels.pothole') }}{{ $t('misc.spaceBeforeDoublePunctuations') }}: {{ $t('reportLabels.potholeDescription') }}

- diff --git a/src/constants.js b/src/constants.js index 67cefde..d452022 100644 --- a/src/constants.js +++ b/src/constants.js @@ -1,11 +1,13 @@ import L from 'leaflet'; import gcumMarker from '@/assets/gcumMarker.svg'; +import interruptMarker from '@/assets/interruptMarker.svg'; import obstacleMarker from '@/assets/obstacleMarker.svg'; import potholeMarker from '@/assets/potholeMarker.svg'; import GCUMIcon from '@/assets/gcum.svg'; -import ObstacleIcon from '@/assets/obstacle.svg'; -import PotHoleIcon from '@/assets/pothole.svg'; +import interruptIcon from '@/assets/interrupt.svg'; +import obstacleIcon from '@/assets/obstacle.svg'; +import potholeIcon from '@/assets/pothole.svg'; export const REPORT_TYPES = { gcum: { @@ -19,7 +21,16 @@ export const REPORT_TYPES = { }, interrupt: { label: 'reportLabels.interrupt', - image: ObstacleIcon, + image: interruptIcon, + marker: L.icon({ + iconUrl: interruptMarker, + iconSize: [40, 40], + iconAnchor: [20, 40], + }), + }, + obstacle: { + label: 'reportLabels.obstacle', + image: obstacleIcon, marker: L.icon({ iconUrl: obstacleMarker, iconSize: [40, 40], @@ -28,7 +39,7 @@ export const REPORT_TYPES = { }, pothole: { label: 'reportLabels.pothole', - image: PotHoleIcon, + image: potholeIcon, marker: L.icon({ iconUrl: potholeMarker, iconSize: [40, 40], diff --git a/src/i18n/en.js b/src/i18n/en.js index a8e5ef2..1c811e2 100644 --- a/src/i18n/en.js +++ b/src/i18n/en.js @@ -2,11 +2,8 @@ export default { about: { availableReportsTitle: 'The available reports so far are:', - gcumDescription: 'A car poorly parked on a bike lane. Such reports are automatically deleted after one hour, as they are by nature temporary.', geolocationDescription: 'As of current version, your geolocation is handled within your device and never sent from it to any external service.', - interruptDescription: 'An interruption of the bike lane (works, unexpected end of the bike lane, etc.).', - license: 'It is released under an MIT license (source code). The map background is using tiles from OpenCycleMap, thanks to OpenStreetMap contributors and Leaflet. Collected reports are available under ODbL license.', - potholeDescription: 'A pothole in the ground.', + license: 'It is released under an MIT license (source code). Icons are based on creations from Wikimedia and Vecteezy. The map background is using tiles from OpenCycleMap, thanks to OpenStreetMap contributors and Leaflet. Collected reports are available under ODbL license.', summary: 'This app lets you track and share issues with bike lanes.', usage: 'How to use', usageDescription: 'Use the button in the lower right corner to add a new report at your current location. To add a report elsewhere, do a long press (or right click) where you want the report to be shown.', @@ -25,8 +22,13 @@ export default { }, reportLabels: { gcum: 'GCUM', + gcumDescription: 'A car poorly parked on a bike lane. Such reports are automatically deleted after one hour, as they are by nature temporary.', interrupt: 'Interruption', + interruptDescription: 'An interruption of the bike lane (works, unexpected end of the bike lane, etc.).', + obstacle: 'Obstacle', + obstacleDescription: 'An obstacle on the bike lane (stones, bulky waste, etc.).', pothole: 'Pothole', + potholeDescription: 'A pothole in the ground.', }, settings: { locale: 'Language', diff --git a/src/i18n/fr.js b/src/i18n/fr.js index 37a421b..44b0859 100644 --- a/src/i18n/fr.js +++ b/src/i18n/fr.js @@ -2,11 +2,8 @@ export default { about: { availableReportsTitle: "Les signalements disponibles pour l'instant sont :", - gcumDescription: "Une voiture (mal) garée sur la piste cyclable. Ces signalements sont automatiquement supprimés au bout d'une heure car ils sont par essence temporaires.", geolocationDescription: "Dans la version actuelle, votre position est traitée directement par votre appareil et n'est jamais envoyée à un service externe.", - interruptDescription: "Une interruption d'itinéraire cyclable (travaux, arrêt inattendu d'une piste cyclable, etc)", - license: "Le code source est sous licence MIT license (code source). Les tuiles de fond de carte proviennent de chez OpenCycleMap, grace aux contributeurs OpenStreetMap et à Leaflet. Les signalements sont disponibles sous licence ODbL.", - potholeDescription: 'Un nid de poule dans la route.', + license: "Le code source est sous licence MIT license (code source). Les icones sont basées sur des travaux de Wikimedia et Vecteezy. Les tuiles de fond de carte proviennent de chez OpenCycleMap, grace aux contributeurs OpenStreetMap et à Leaflet. Les signalements sont disponibles sous licence ODbL.", summary: 'Cette application vous permet de signaler et de partager des problèmes avec les itinéraires cyclables.', usage: 'Utilisation', usageDescription: "Utilisez le bouton en bas à droite pour ajouter un signalement à votre emplacement actuel. Pour ajouter un signalement ailleurs, faites un appui long (ou clic droit) à l'emplacement souhaité sur la carte.", @@ -25,8 +22,13 @@ export default { }, reportLabels: { gcum: 'GCUM', + gcumDescription: "Une voiture (mal) garée sur la piste cyclable. Ces signalements sont automatiquement supprimés au bout d'une heure car ils sont par essence temporaires.", interrupt: 'Interruption', + interruptDescription: "Une interruption d'itinéraire cyclable (travaux, arrêt inattendu d'une piste cyclable, etc)", + obstacle: 'Obstacle', + obstacleDescription: 'Un obstacle sur la piste cyclable (granit de bordure, encombrants, etc)', pothole: 'Nid de poule', + potholeDescription: 'Un nid de poule dans la route.', }, settings: { locale: 'Langue',