From 17f9668e22f62589bff1ff054892fb1922c76723 Mon Sep 17 00:00:00 2001 From: Jorge Bolois Guerrero Date: Mon, 17 Oct 2022 21:33:50 +0200 Subject: [PATCH] Adding currentMoney. Better darkMode styles. Adding more locations. --- locations/Ansó.json | 16 ++++++++++++++++ locations/Bielsa.json | 2 +- locations/Formigal.json | 16 ++++++++++++++++ locations/Graus.json | 32 ++++++++++++++++++++++++++++++++ locations/Isaba.json | 20 ++++++++++++++++++++ locations/ValledeHecho.json | 16 ++++++++++++++++ src/Configuration.js | 5 +++-- src/ConfigurationHTML.js | 6 ++++++ src/IconSvg.js | 5 +++++ src/ItemHTML.js | 31 +++++++++++++++++++++---------- src/Preferences.js | 1 + src/Styles.js | 31 ++++++++++++++++++++++++------- 12 files changed, 161 insertions(+), 20 deletions(-) create mode 100644 locations/Ansó.json create mode 100644 locations/Formigal.json create mode 100644 locations/Graus.json create mode 100644 locations/Isaba.json create mode 100644 locations/ValledeHecho.json create mode 100644 src/IconSvg.js diff --git a/locations/Ansó.json b/locations/Ansó.json new file mode 100644 index 0000000..90f1383 --- /dev/null +++ b/locations/Ansó.json @@ -0,0 +1,16 @@ +{ + "name": "Ansó", + "altitude": 860, + "bus": true, + "train": false, + "pharmacy": true, + "smoke": true, + "supermarkets": [ + { + "type": "CUSTOM", + "url": "https://goo.gl/maps/sScuQ6BApZzrFZwN9" + } + ], + "pool": false, + "gym": false +} \ No newline at end of file diff --git a/locations/Bielsa.json b/locations/Bielsa.json index 39c1d89..707b7df 100644 --- a/locations/Bielsa.json +++ b/locations/Bielsa.json @@ -3,7 +3,7 @@ "altitude": 1034, "bus": true, "train": false, - "pharmacy": null, + "pharmacy": true, "smoke": true, "supermarkets": [ { diff --git a/locations/Formigal.json b/locations/Formigal.json new file mode 100644 index 0000000..626c0b6 --- /dev/null +++ b/locations/Formigal.json @@ -0,0 +1,16 @@ +{ + "name": "Formigal", + "altitude": 1550, + "bus": true, + "train": false, + "pharmacy": true, + "smoke": true, + "supermarkets": [ + { + "type": "ALCAMPO", + "url": "https://goo.gl/maps/39e37qJLNw2WkZci9" + } + ], + "pool": true, + "gym": true +} \ No newline at end of file diff --git a/locations/Graus.json b/locations/Graus.json new file mode 100644 index 0000000..3a5ecc1 --- /dev/null +++ b/locations/Graus.json @@ -0,0 +1,32 @@ +{ + "name": "Graus", + "altitude": 469, + "bus": true, + "train": false, + "pharmacy": true, + "smoke": true, + "supermarkets": [ + { + "type": "EROSKI", + "url": "https://g.page/eroski-city-graus?share" + }, + { + "type": "BONAREA", + "url": "https://goo.gl/maps/CnPyE9PhpsdKMF5N7" + }, + { + "type": "ALTO_ARAGON", + "url": "https://goo.gl/maps/yZofjAm8awFZnNf37" + }, + { + "type": "CUSTOM", + "url": "https://goo.gl/maps/KadcU8SoTR2Hx3hd6" + }, + { + "type": "CUSTOM", + "url": "https://goo.gl/maps/snEwKUjc49SCbX986" + } + ], + "pool": true, + "gym": true +} \ No newline at end of file diff --git a/locations/Isaba.json b/locations/Isaba.json new file mode 100644 index 0000000..715ed9d --- /dev/null +++ b/locations/Isaba.json @@ -0,0 +1,20 @@ +{ + "name": "Isaba", + "altitude": 816, + "bus": true, + "train": false, + "pharmacy": true, + "smoke": false, + "supermarkets": [ + { + "type": "COVIRAN", + "url": "https://goo.gl/maps/9zA6ywhaMKXbSWF89" + }, + { + "type": "UDACO", + "url": "https://goo.gl/maps/fB5pZ3WENSqEG2Wt5" + } + ], + "pool": true, + "gym": false +} \ No newline at end of file diff --git a/locations/ValledeHecho.json b/locations/ValledeHecho.json new file mode 100644 index 0000000..03a162f --- /dev/null +++ b/locations/ValledeHecho.json @@ -0,0 +1,16 @@ +{ + "name": "Hecho", + "altitude": 953, + "bus": false, + "train": false, + "pharmacy": true, + "smoke": true, + "supermarkets": [ + { + "type": "ALTO_ARAGON", + "url": "https://goo.gl/maps/XRmwSrE5HcQzJbdF6" + } + ], + "pool": true, + "gym": false +} \ No newline at end of file diff --git a/src/Configuration.js b/src/Configuration.js index 77ea501..b68c558 100644 --- a/src/Configuration.js +++ b/src/Configuration.js @@ -43,6 +43,9 @@ export default class Configuration { return { enabled: container.querySelector('#enabled').checked, darkMode: container.querySelector('#darkMode').checked, + currentMoney: container.querySelector('#currentMoney').value, + 'max-price': container.querySelector('#max-price').value, + 'max-price-per-meter': container.querySelector('#max-price-per-meter').value, percentages: container.querySelector('#percentages').checked, percentages_20: container.querySelector('#percentages_20').checked, percentages_30: container.querySelector('#percentages_30').checked, @@ -50,8 +53,6 @@ export default class Configuration { garage: container.querySelector('#garage').checked, exterior: container.querySelector('#exterior').checked, lift: container.querySelector('#lift').checked, - 'max-price': container.querySelector('#max-price').value, - 'max-price-per-meter': container.querySelector('#max-price-per-meter').value, bus: container.querySelector('#bus').checked, train: container.querySelector('#train').checked, supermarket: container.querySelector('#supermarket').checked, diff --git a/src/ConfigurationHTML.js b/src/ConfigurationHTML.js index c890c5b..6f08d81 100644 --- a/src/ConfigurationHTML.js +++ b/src/ConfigurationHTML.js @@ -39,6 +39,12 @@ export default class ConfigurationHTML {

Precios

+ + +