From 08bb276801f72e91c0e4edcaa6ab2afafdbaf571 Mon Sep 17 00:00:00 2001 From: Wouter van der Plas Date: Mon, 20 Nov 2023 10:18:40 +0100 Subject: [PATCH] Update styles and dependencies --- LICENSE.txt | 4 +- package-lock.json | 82 +++++++++++++++++++++-------------- package.json | 13 +++--- src/components/parts/Menu.tsx | 23 +++++----- src/style/main.sass | 12 +++++ utils/collect.ts | 2 +- 6 files changed, 83 insertions(+), 53 deletions(-) diff --git a/LICENSE.txt b/LICENSE.txt index 1481732e..0920214c 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2020 github-actions[bot] +Copyright (c) 2020 wvanderp Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file +SOFTWARE. diff --git a/package-lock.json b/package-lock.json index cd7d5a90..b23a2597 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,24 +20,25 @@ "react-dom": "^18.2.0", "react-hooks-global-state": "2.1.0", "react-leaflet": "^4.2.1", - "react-router": "^6.18.0", - "react-router-dom": "^6.18.0", + "react-router": "^6.19.0", + "react-router-dom": "^6.19.0", "reactstrap": "^9.2.1", "youtube-dl-exec": "^2.4.17" }, "devDependencies": { + "@parcel/transformer-inline-string": "^2.10.3", "@parcel/transformer-sass": "^2.10.3", "@types/leaflet": "^1.9.8", "@types/lodash.chunk": "^4.2.9", "@types/lodash.set": "^4.3.9", - "@types/node": "^20.9.0", + "@types/node": "^20.9.2", "@types/react": "^18.2.37", "@types/react-dom": "^18.2.15", - "@types/react-leaflet": "^2.8.2", + "@types/react-leaflet": "^3.0.0", "@types/react-router-dom": "^5.3.3", "@typescript-eslint/eslint-plugin": "^6.11.0", "@typescript-eslint/parser": "^6.11.0", - "eslint": "^8.53.0", + "eslint": "^8.54.0", "eslint-config-airbnb": "^19.0.4", "eslint-import-resolver-typescript": "^3.6.1", "eslint-nibble": "^8.1.0", @@ -241,9 +242,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.53.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.53.0.tgz", - "integrity": "sha512-Kn7K8dx/5U6+cT1yEhpX1w4PCSg0M+XyRILPgvwcEBjerFWCwQj5sbr3/VmxqV0JGHCBCzyd6LxypEuehypY1w==", + "version": "8.54.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.54.0.tgz", + "integrity": "sha512-ut5V+D+fOoWPgGGNj83GGjnntO39xDy6DWxO0wb7Jp3DcMX0TfIqdzHF85VTQkerdyGmuuMD9AKAo5KiNlf/AQ==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -1619,6 +1620,23 @@ "@parcel/core": "^2.10.3" } }, + "node_modules/@parcel/transformer-inline-string": { + "version": "2.10.3", + "resolved": "https://registry.npmjs.org/@parcel/transformer-inline-string/-/transformer-inline-string-2.10.3.tgz", + "integrity": "sha512-vOxBqLkzouA744b4x1KoaV4+Lo8kQmnz1Y2ahlnt2bEER3TMJpGiEiggFahq3WQKOOFOfhBcVFH0ncBCszCfWg==", + "dev": true, + "dependencies": { + "@parcel/plugin": "2.10.3" + }, + "engines": { + "node": ">= 12.0.0", + "parcel": "^2.10.3" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, "node_modules/@parcel/transformer-js": { "version": "2.10.3", "resolved": "https://registry.npmjs.org/@parcel/transformer-js/-/transformer-js-2.10.3.tgz", @@ -2155,9 +2173,9 @@ } }, "node_modules/@remix-run/router": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.11.0.tgz", - "integrity": "sha512-BHdhcWgeiudl91HvVa2wxqZjSHbheSgIiDvxrF1VjFzBzpTtuDPkOdOi3Iqvc08kXtFkLjhbS+ML9aM8mJS+wQ==", + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.12.0.tgz", + "integrity": "sha512-2hXv036Bux90e1GXTWSMfNzfDDK8LA8JYEWfyHxzvwdp6GyoWEovKc9cotb3KCKmkdwsIBuFGX7ScTWyiHv7Eg==", "engines": { "node": ">=14.0.0" } @@ -2472,9 +2490,9 @@ } }, "node_modules/@types/node": { - "version": "20.9.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.9.0.tgz", - "integrity": "sha512-nekiGu2NDb1BcVofVcEKMIwzlx4NjHlcjhoxxKBNLtz15Y1z7MYf549DFvkHSId02Ax6kGwWntIBPC3l/JZcmw==", + "version": "20.9.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.9.2.tgz", + "integrity": "sha512-WHZXKFCEyIUJzAwh3NyyTHYSR35SevJ6mZ1nWwJafKtiQbqRTIKSRcw3Ma3acqgsent3RRDqeVwpHntMk+9irg==", "dev": true, "dependencies": { "undici-types": "~5.26.4" @@ -2513,13 +2531,13 @@ } }, "node_modules/@types/react-leaflet": { - "version": "2.8.3", - "resolved": "https://registry.npmjs.org/@types/react-leaflet/-/react-leaflet-2.8.3.tgz", - "integrity": "sha512-MeBQnVQe6ikw8dkuZE4F96PvMdQeilZG6/ekk5XxhkSzU3lofedULn3UR/6G0uIHjbRazi4DA8LnLACX0bPhBg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/react-leaflet/-/react-leaflet-3.0.0.tgz", + "integrity": "sha512-p8R9mVKbCDDqOdW+M6GyJJuFn6q+IgDFYavFiOIvaWHuOe5kIHZEtCy1pfM43JIA6JiB3D/aDoby7C51eO+XSg==", + "deprecated": "This is a stub types definition. react-leaflet provides its own type definitions, so you do not need this installed.", "dev": true, "dependencies": { - "@types/leaflet": "*", - "@types/react": "*" + "react-leaflet": "*" } }, "node_modules/@types/react-router": { @@ -4170,15 +4188,15 @@ } }, "node_modules/eslint": { - "version": "8.53.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.53.0.tgz", - "integrity": "sha512-N4VuiPjXDUa4xVeV/GC/RV3hQW9Nw+Y463lkWaKKXKYMvmRiRDAtfpuPFLN+E1/6ZhyR8J2ig+eVREnYgUsiag==", + "version": "8.54.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.54.0.tgz", + "integrity": "sha512-NY0DfAkM8BIZDVl6PgSa1ttZbx3xHgJzSNJKYcQglem6CppHyMhRIQkBVSSMaSRnLhig3jsDbEzOjwCVt4AmmA==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", "@eslint/eslintrc": "^2.1.3", - "@eslint/js": "8.53.0", + "@eslint/js": "8.54.0", "@humanwhocodes/config-array": "^0.11.13", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -7647,11 +7665,11 @@ } }, "node_modules/react-router": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.18.0.tgz", - "integrity": "sha512-vk2y7Dsy8wI02eRRaRmOs9g2o+aE72YCx5q9VasT1N9v+lrdB79tIqrjMfByHiY5+6aYkH2rUa5X839nwWGPDg==", + "version": "6.19.0", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.19.0.tgz", + "integrity": "sha512-0W63PKCZ7+OuQd7Tm+RbkI8kCLmn4GPjDbX61tWljPxWgqTKlEpeQUwPkT1DRjYhF8KSihK0hQpmhU4uxVMcdw==", "dependencies": { - "@remix-run/router": "1.11.0" + "@remix-run/router": "1.12.0" }, "engines": { "node": ">=14.0.0" @@ -7661,12 +7679,12 @@ } }, "node_modules/react-router-dom": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.18.0.tgz", - "integrity": "sha512-Ubrue4+Ercc/BoDkFQfc6og5zRQ4A8YxSO3Knsne+eRbZ+IepAsK249XBH/XaFuOYOYr3L3r13CXTLvYt5JDjw==", + "version": "6.19.0", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.19.0.tgz", + "integrity": "sha512-N6dWlcgL2w0U5HZUUqU2wlmOrSb3ighJmtQ438SWbhB1yuLTXQ8yyTBMK3BSvVjp7gBtKurT554nCtMOgxCZmQ==", "dependencies": { - "@remix-run/router": "1.11.0", - "react-router": "6.18.0" + "@remix-run/router": "1.12.0", + "react-router": "6.19.0" }, "engines": { "node": ">=14.0.0" diff --git a/package.json b/package.json index 9fb7e81e..fc227fb0 100644 --- a/package.json +++ b/package.json @@ -12,18 +12,19 @@ "node": ">=18.0.0" }, "devDependencies": { + "@parcel/transformer-inline-string": "^2.10.3", "@parcel/transformer-sass": "^2.10.3", "@types/leaflet": "^1.9.8", "@types/lodash.chunk": "^4.2.9", "@types/lodash.set": "^4.3.9", - "@types/node": "^20.9.0", + "@types/node": "^20.9.2", "@types/react": "^18.2.37", "@types/react-dom": "^18.2.15", - "@types/react-leaflet": "^2.8.2", + "@types/react-leaflet": "^3.0.0", "@types/react-router-dom": "^5.3.3", "@typescript-eslint/eslint-plugin": "^6.11.0", "@typescript-eslint/parser": "^6.11.0", - "eslint": "^8.53.0", + "eslint": "^8.54.0", "eslint-config-airbnb": "^19.0.4", "eslint-import-resolver-typescript": "^3.6.1", "eslint-nibble": "^8.1.0", @@ -52,15 +53,15 @@ "react-dom": "^18.2.0", "react-hooks-global-state": "2.1.0", "react-leaflet": "^4.2.1", - "react-router": "^6.18.0", - "react-router-dom": "^6.18.0", + "react-router": "^6.19.0", + "react-router-dom": "^6.19.0", "reactstrap": "^9.2.1", "youtube-dl-exec": "^2.4.17" }, "scripts": { "app": "parcel serve src/index.html", "build": "parcel build --no-source-maps --dist-dir ./build src/index.html", - "lint": "npm-run-all -c -s tsc eslint" , + "lint": "npm-run-all -c -s tsc eslint", "eslint": "eslint --ext ts,tsx,js src/ utils/", "tsc": "tsc --noEmit", "collect": "ts-node -P tsconfig.update.json --files utils/collect.ts", diff --git a/src/components/parts/Menu.tsx b/src/components/parts/Menu.tsx index e6907dd4..c4c7ecd7 100644 --- a/src/components/parts/Menu.tsx +++ b/src/components/parts/Menu.tsx @@ -5,6 +5,8 @@ import {Link} from 'react-router-dom'; import webcamIcon from 'url:../../static/icon.svg'; // @ts-expect-error svg files are not compatible with typescript import attribution from 'url:../../static/attribution.svg'; +// @ts-expect-error overpassql files are not compatible with typescript +import query from 'bundle-text:../../../overpassQuery.overpassql'; import useGlobalState from '../../state'; @@ -25,8 +27,8 @@ function Menu() {
-

About

-

+

About

+

This page displays all the webcams known to OpenStreetMap. {' '} Zoom in to see if your local town or city has a webcam. @@ -58,17 +60,14 @@ function Menu() {

Links

-
    +
    • - + The Overpass query used to create the data
    • -
    • - +
    • + The source code is available on GitHub
    • @@ -80,7 +79,7 @@ function Menu() { location.coordinates[0]}/${ location.coordinates[1]}` } - className="text-white" + className="muted-text" > Sitemap
      • - + All webcams
      • - + All places
      • diff --git a/src/style/main.sass b/src/style/main.sass index 3269c978..87f490b1 100644 --- a/src/style/main.sass +++ b/src/style/main.sass @@ -13,3 +13,15 @@ html, body #app width: 100% + +.white-text + color: white + +.muted-text + color: #999 + + a + color: #7a7a7a + + a:hover + color: #525151 diff --git a/utils/collect.ts b/utils/collect.ts index 1b99a7c0..1e6f5080 100644 --- a/utils/collect.ts +++ b/utils/collect.ts @@ -41,7 +41,7 @@ const nominatimCache = getNominatimCache(); const getNominatimUrl = ( lat: number, lon: number -) => `https://nominatim.openstreetmap.org/reverse?lon=${lon}&lat=${lat}&format=json&extratags=1`; +) => `https://nominatim.openstreetmap.org/reverse?lon=${lon}&lat=${lat}&format=json&extratags=1&accept-language=en`; // overpass url const overpassBase = 'https://overpass-api.de/api/interpreter?data=';