From cb19b99653bba25cc054ac262b2e6db6ecdee00d Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Thu, 31 Oct 2024 10:06:01 -0700 Subject: [PATCH] Update category styles --- src/common/util/deviceCategories.js | 3 --- src/map/core/preloadImages.js | 18 +++++++++++------- src/resources/images/icon/animal.svg | 3 +-- src/resources/images/icon/bicycle.svg | 3 +-- src/resources/images/icon/boat.svg | 3 +-- src/resources/images/icon/bus.svg | 3 +-- src/resources/images/icon/camper.svg | 3 +-- src/resources/images/icon/car.svg | 3 +-- src/resources/images/icon/crane.svg | 3 +-- src/resources/images/icon/default.svg | 3 +-- src/resources/images/icon/helicopter.svg | 3 +-- src/resources/images/icon/motorcycle.svg | 3 +-- src/resources/images/icon/person.svg | 3 +-- src/resources/images/icon/plane.svg | 3 +-- src/resources/images/icon/scooter.svg | 3 +-- src/resources/images/icon/ship.svg | 3 +-- src/resources/images/icon/tractor.svg | 3 +-- src/resources/images/icon/train.svg | 3 +-- src/resources/images/icon/tram.svg | 3 +-- src/resources/images/icon/truck.svg | 3 +-- src/resources/images/icon/van.svg | 3 +-- src/resources/l10n/en.json | 3 --- 22 files changed, 30 insertions(+), 51 deletions(-) diff --git a/src/common/util/deviceCategories.js b/src/common/util/deviceCategories.js index a991e505..c86447d4 100644 --- a/src/common/util/deviceCategories.js +++ b/src/common/util/deviceCategories.js @@ -9,15 +9,12 @@ export default [ 'crane', 'helicopter', 'motorcycle', - 'offroad', 'person', - 'pickup', 'plane', 'ship', 'tractor', 'train', 'tram', - 'trolleybus', 'truck', 'van', 'scooter', diff --git a/src/map/core/preloadImages.js b/src/map/core/preloadImages.js index 09886a69..a2c53bb6 100644 --- a/src/map/core/preloadImages.js +++ b/src/map/core/preloadImages.js @@ -16,16 +16,13 @@ import startSvg from '../../resources/images/icon/start.svg'; import finishSvg from '../../resources/images/icon/finish.svg'; import helicopterSvg from '../../resources/images/icon/helicopter.svg'; import motorcycleSvg from '../../resources/images/icon/motorcycle.svg'; -import offroadSvg from '../../resources/images/icon/offroad.svg'; import personSvg from '../../resources/images/icon/person.svg'; -import pickupSvg from '../../resources/images/icon/pickup.svg'; import planeSvg from '../../resources/images/icon/plane.svg'; import scooterSvg from '../../resources/images/icon/scooter.svg'; import shipSvg from '../../resources/images/icon/ship.svg'; import tractorSvg from '../../resources/images/icon/tractor.svg'; import trainSvg from '../../resources/images/icon/train.svg'; import tramSvg from '../../resources/images/icon/tram.svg'; -import trolleybusSvg from '../../resources/images/icon/trolleybus.svg'; import truckSvg from '../../resources/images/icon/truck.svg'; import vanSvg from '../../resources/images/icon/van.svg'; @@ -41,9 +38,7 @@ export const mapIcons = { finish: finishSvg, helicopter: helicopterSvg, motorcycle: motorcycleSvg, - offroad: offroadSvg, person: personSvg, - pickup: pickupSvg, plane: planeSvg, scooter: scooterSvg, ship: shipSvg, @@ -51,12 +46,21 @@ export const mapIcons = { tractor: tractorSvg, train: trainSvg, tram: tramSvg, - trolleybus: trolleybusSvg, truck: truckSvg, van: vanSvg, }; -export const mapIconKey = (category) => (mapIcons.hasOwnProperty(category) ? category : 'default'); +export const mapIconKey = (category) => { + switch (category) { + case 'offroad': + case 'pickup': + return 'car'; + case 'trolleybus': + return 'bus'; + default: + return mapIcons.hasOwnProperty(category) ? category : 'default'; + } +}; export const mapImages = {}; diff --git a/src/resources/images/icon/animal.svg b/src/resources/images/icon/animal.svg index 5a239349..480e706d 100644 --- a/src/resources/images/icon/animal.svg +++ b/src/resources/images/icon/animal.svg @@ -1,2 +1 @@ - - + \ No newline at end of file diff --git a/src/resources/images/icon/bicycle.svg b/src/resources/images/icon/bicycle.svg index a473f4bc..b02c931f 100644 --- a/src/resources/images/icon/bicycle.svg +++ b/src/resources/images/icon/bicycle.svg @@ -1,2 +1 @@ - - + \ No newline at end of file diff --git a/src/resources/images/icon/boat.svg b/src/resources/images/icon/boat.svg index 33bfe27d..8ff7ddd5 100644 --- a/src/resources/images/icon/boat.svg +++ b/src/resources/images/icon/boat.svg @@ -1,2 +1 @@ - - + \ No newline at end of file diff --git a/src/resources/images/icon/bus.svg b/src/resources/images/icon/bus.svg index 5e881481..fc337c02 100644 --- a/src/resources/images/icon/bus.svg +++ b/src/resources/images/icon/bus.svg @@ -1,2 +1 @@ - - + \ No newline at end of file diff --git a/src/resources/images/icon/camper.svg b/src/resources/images/icon/camper.svg index 19e95cc5..2e5255c8 100644 --- a/src/resources/images/icon/camper.svg +++ b/src/resources/images/icon/camper.svg @@ -1,2 +1 @@ - - + \ No newline at end of file diff --git a/src/resources/images/icon/car.svg b/src/resources/images/icon/car.svg index f919e0be..21d8de32 100644 --- a/src/resources/images/icon/car.svg +++ b/src/resources/images/icon/car.svg @@ -1,2 +1 @@ - - + \ No newline at end of file diff --git a/src/resources/images/icon/crane.svg b/src/resources/images/icon/crane.svg index 23db0916..6b39abf8 100644 --- a/src/resources/images/icon/crane.svg +++ b/src/resources/images/icon/crane.svg @@ -1,2 +1 @@ - - + \ No newline at end of file diff --git a/src/resources/images/icon/default.svg b/src/resources/images/icon/default.svg index a4ba881f..e2d460e1 100644 --- a/src/resources/images/icon/default.svg +++ b/src/resources/images/icon/default.svg @@ -1,2 +1 @@ - - + \ No newline at end of file diff --git a/src/resources/images/icon/helicopter.svg b/src/resources/images/icon/helicopter.svg index 2849ee8d..5b9b4ee2 100644 --- a/src/resources/images/icon/helicopter.svg +++ b/src/resources/images/icon/helicopter.svg @@ -1,2 +1 @@ - - + \ No newline at end of file diff --git a/src/resources/images/icon/motorcycle.svg b/src/resources/images/icon/motorcycle.svg index 0289a346..eb650c1f 100644 --- a/src/resources/images/icon/motorcycle.svg +++ b/src/resources/images/icon/motorcycle.svg @@ -1,2 +1 @@ - - + \ No newline at end of file diff --git a/src/resources/images/icon/person.svg b/src/resources/images/icon/person.svg index 805ba442..41bf0c21 100644 --- a/src/resources/images/icon/person.svg +++ b/src/resources/images/icon/person.svg @@ -1,2 +1 @@ - - + \ No newline at end of file diff --git a/src/resources/images/icon/plane.svg b/src/resources/images/icon/plane.svg index 5210e4c9..47f87644 100644 --- a/src/resources/images/icon/plane.svg +++ b/src/resources/images/icon/plane.svg @@ -1,2 +1 @@ - - + \ No newline at end of file diff --git a/src/resources/images/icon/scooter.svg b/src/resources/images/icon/scooter.svg index ea23f9fa..9d1a1430 100644 --- a/src/resources/images/icon/scooter.svg +++ b/src/resources/images/icon/scooter.svg @@ -1,2 +1 @@ - - + \ No newline at end of file diff --git a/src/resources/images/icon/ship.svg b/src/resources/images/icon/ship.svg index b8c563c8..5d8646a1 100644 --- a/src/resources/images/icon/ship.svg +++ b/src/resources/images/icon/ship.svg @@ -1,2 +1 @@ - - + \ No newline at end of file diff --git a/src/resources/images/icon/tractor.svg b/src/resources/images/icon/tractor.svg index 3a9e9f25..fd7ecaca 100644 --- a/src/resources/images/icon/tractor.svg +++ b/src/resources/images/icon/tractor.svg @@ -1,2 +1 @@ - - + \ No newline at end of file diff --git a/src/resources/images/icon/train.svg b/src/resources/images/icon/train.svg index 125b468e..b7631d7d 100644 --- a/src/resources/images/icon/train.svg +++ b/src/resources/images/icon/train.svg @@ -1,2 +1 @@ - - + \ No newline at end of file diff --git a/src/resources/images/icon/tram.svg b/src/resources/images/icon/tram.svg index f54084f7..509d3c56 100644 --- a/src/resources/images/icon/tram.svg +++ b/src/resources/images/icon/tram.svg @@ -1,2 +1 @@ - - + \ No newline at end of file diff --git a/src/resources/images/icon/truck.svg b/src/resources/images/icon/truck.svg index df5c164c..db805bff 100644 --- a/src/resources/images/icon/truck.svg +++ b/src/resources/images/icon/truck.svg @@ -1,2 +1 @@ - - + \ No newline at end of file diff --git a/src/resources/images/icon/van.svg b/src/resources/images/icon/van.svg index a3ee13c7..d879ef42 100644 --- a/src/resources/images/icon/van.svg +++ b/src/resources/images/icon/van.svg @@ -1,2 +1 @@ - - + \ No newline at end of file diff --git a/src/resources/l10n/en.json b/src/resources/l10n/en.json index 3a7cd485..37911a35 100644 --- a/src/resources/l10n/en.json +++ b/src/resources/l10n/en.json @@ -599,15 +599,12 @@ "categoryCrane": "Crane", "categoryHelicopter": "Helicopter", "categoryMotorcycle": "Motorcycle", - "categoryOffroad": "Offroad", "categoryPerson": "Person", - "categoryPickup": "Pickup", "categoryPlane": "Plane", "categoryShip": "Ship", "categoryTractor": "Tractor", "categoryTrain": "Train", "categoryTram": "Tram", - "categoryTrolleybus": "Trolleybus", "categoryTruck": "Truck", "categoryVan": "Van", "categoryScooter": "Scooter",