diff --git a/client/index.html b/client/index.html index 36dfac8..2f97e29 100644 --- a/client/index.html +++ b/client/index.html @@ -2,11 +2,16 @@ - + + Flami diff --git a/client/package-lock.json b/client/package-lock.json index b59dee9..b1f81e4 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -8,6 +8,7 @@ "name": "client", "version": "0.0.0", "dependencies": { + "@dotmind/react-use-pwa": "^1.0.4", "@types/react-leaflet-markercluster": "^3.0.4", "class-variance-authority": "^0.7.0", "formik": "^2.4.5", @@ -16,9 +17,12 @@ "react": "^18.2.0", "react-cookie": "^7.0.2", "react-dom": "^18.2.0", + "react-geolocated": "^4.1.2", "react-hot-toast": "^2.4.1", "react-leaflet": "^4.2.1", "react-line-awesome": "^1.4.1", + "react-qr-code": "^2.0.12", + "react-qr-reader-es6": "^2.2.1-2", "react-router": "^6.21.3", "react-router-dom": "^6.22.1", "yup": "^1.3.3" @@ -245,9 +249,9 @@ } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz", - "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.0.tgz", + "integrity": "sha512-9cUznXMG0+FxRuJfvL82QlTqIzhVW9sL0KjMPHhAOOvpQGL8QtdxnBKILjBqxlHyliz0yCa1G903ZXI/FuHy2w==", "dev": true, "engines": { "node": ">=6.9.0" @@ -435,6 +439,11 @@ "node": ">=6.9.0" } }, + "node_modules/@dotmind/react-use-pwa": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@dotmind/react-use-pwa/-/react-use-pwa-1.0.4.tgz", + "integrity": "sha512-qZauJLQu9hbdy6eAIm49YfI+8Dxty9tr8Zmv99M4rV37zwT7LVSdohXlGmFXXo19v5YV/Ig0Mnn5hRGPCxWDrA==" + }, "node_modules/@emotion/is-prop-valid": { "version": "0.8.8", "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-0.8.8.tgz", @@ -1023,14 +1032,14 @@ } }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", - "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", "dev": true, "dependencies": { - "@jridgewell/set-array": "^1.0.1", + "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/trace-mapping": "^0.3.24" }, "engines": { "node": ">=6.0.0" @@ -1046,9 +1055,9 @@ } }, "node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", "dev": true, "engines": { "node": ">=6.0.0" @@ -1061,9 +1070,9 @@ "dev": true }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.22", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.22.tgz", - "integrity": "sha512-Wf963MzWtA2sjrNt+g18IAln9lKnlRp+K2eH4jjIoF1wYeq3aMREpG09xhlhdzS0EjwU7qmUJYangWa+151vZw==", + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", "dev": true, "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", @@ -1554,17 +1563,6 @@ "@types/leaflet": "*" } }, - "node_modules/@types/node": { - "version": "20.11.25", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.25.tgz", - "integrity": "sha512-TBHyJxk2b7HceLVGFcpAUjsa5zIdsPWlR6XHfyGzd0SFu+/NFgQgMAl96MSDZgQDvJAvV6BKsFOrt6zIL09JDw==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "undici-types": "~5.26.4" - } - }, "node_modules/@types/prop-types": { "version": "15.7.11", "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.11.tgz", @@ -2051,13 +2049,16 @@ } }, "node_modules/array-buffer-byte-length": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", - "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", + "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "is-array-buffer": "^3.0.1" + "call-bind": "^1.0.5", + "is-array-buffer": "^3.0.4" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -2125,10 +2126,13 @@ } }, "node_modules/available-typed-arrays": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", - "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", "dev": true, + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, "engines": { "node": ">= 0.4" }, @@ -2214,14 +2218,19 @@ } }, "node_modules/call-bind": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz", - "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", "dev": true, "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.1", - "set-function-length": "^1.1.1" + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -2561,17 +2570,20 @@ } }, "node_modules/define-data-property": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz", - "integrity": "sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", "dev": true, "dependencies": { - "get-intrinsic": "^1.2.1", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.0" + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" }, "engines": { "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/define-properties": { @@ -2681,6 +2693,27 @@ "url": "https://github.com/fb55/entities?sponsor=1" } }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/es-get-iterator": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.3.tgz", @@ -3342,16 +3375,20 @@ } }, "node_modules/get-intrinsic": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.2.tgz", - "integrity": "sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", "dev": true, "dependencies": { + "es-errors": "^1.3.0", "function-bind": "^1.1.2", "has-proto": "^1.0.1", "has-symbols": "^1.0.3", "hasown": "^2.0.0" }, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -3496,21 +3533,21 @@ } }, "node_modules/has-property-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz", - "integrity": "sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", "dev": true, "dependencies": { - "get-intrinsic": "^1.2.2" + "es-define-property": "^1.0.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/has-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", - "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", "dev": true, "engines": { "node": ">= 0.4" @@ -3532,12 +3569,12 @@ } }, "node_modules/has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", "dev": true, "dependencies": { - "has-symbols": "^1.0.2" + "has-symbols": "^1.0.3" }, "engines": { "node": ">= 0.4" @@ -3547,9 +3584,9 @@ } }, "node_modules/hasown": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", - "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", "dev": true, "dependencies": { "function-bind": "^1.1.2" @@ -3681,12 +3718,12 @@ "dev": true }, "node_modules/internal-slot": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.6.tgz", - "integrity": "sha512-Xj6dv+PsbtwyPpEflsejS+oIZxmMlV44zAhG479uYu89MsjcYOhCFnNyKrkJrihbsiasQyY0afoCl/9BLR65bg==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", + "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", "dev": true, "dependencies": { - "get-intrinsic": "^1.2.2", + "es-errors": "^1.3.0", "hasown": "^2.0.0", "side-channel": "^1.0.4" }, @@ -3711,14 +3748,16 @@ } }, "node_modules/is-array-buffer": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", - "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", + "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.0", - "is-typed-array": "^1.1.10" + "get-intrinsic": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -3907,12 +3946,15 @@ } }, "node_modules/is-shared-array-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", - "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", + "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2" + "call-bind": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -3960,21 +4002,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-typed-array": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz", - "integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==", - "dev": true, - "dependencies": { - "which-typed-array": "^1.1.11" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/is-weakmap": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.1.tgz", @@ -4141,6 +4168,11 @@ "integrity": "sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA==", "dev": true }, + "node_modules/jsqr-es6": { + "version": "1.4.0-1", + "resolved": "https://registry.npmjs.org/jsqr-es6/-/jsqr-es6-1.4.0-1.tgz", + "integrity": "sha512-LPWZJLI+3LLOy9k3/s/MeXlkfNOs3bYBX5O+fp4N0XuxbgO8H7Uc/nYZeNwo13nSZXRW9xWFKmZdy9591+PyAg==" + }, "node_modules/keyv": { "version": "4.5.4", "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", @@ -4479,7 +4511,6 @@ "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -4769,6 +4800,15 @@ "pathe": "^1.1.0" } }, + "node_modules/possible-typed-array-names": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", + "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/postcss": { "version": "8.4.33", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.33.tgz", @@ -4950,6 +4990,21 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/prop-types": { + "version": "15.8.1", + "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", + "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", + "dependencies": { + "loose-envify": "^1.4.0", + "object-assign": "^4.1.1", + "react-is": "^16.13.1" + } + }, + "node_modules/prop-types/node_modules/react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" + }, "node_modules/property-expr": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/property-expr/-/property-expr-2.0.6.tgz", @@ -4970,6 +5025,11 @@ "node": ">=6" } }, + "node_modules/qr.js": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/qr.js/-/qr.js-0.0.0.tgz", + "integrity": "sha512-c4iYnWb+k2E+vYpRimHqSu575b1/wKl4XFeJGpFmrJQz5I88v9aY2czh7s0w36srfCM1sXgC/xpoJz5dJfq+OQ==" + }, "node_modules/querystringify": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", @@ -5037,6 +5097,14 @@ "resolved": "https://registry.npmjs.org/react-fast-compare/-/react-fast-compare-2.0.4.tgz", "integrity": "sha512-suNP+J1VU1MWFKcyt7RtjiSWUjvidmQSlqu+eHslq+342xCbGTYmC0mEhPCOHxlW0CywylOC1u2DFAT+bv4dBw==" }, + "node_modules/react-geolocated": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/react-geolocated/-/react-geolocated-4.1.2.tgz", + "integrity": "sha512-/Ec26Wb1h06bB/axHYclBxrG0Yqob0T0W9awRi87cyedC3rMnpOR+Aqb7Q26FAEF+dNWXIpVDGNw1YZtlPUAEw==", + "peerDependencies": { + "react": ">= 16.8.0 < 19.0.0" + } + }, "node_modules/react-hot-toast": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/react-hot-toast/-/react-hot-toast-2.4.1.tgz", @@ -5080,6 +5148,37 @@ "react-dom": ">=16.8.6" } }, + "node_modules/react-qr-code": { + "version": "2.0.12", + "resolved": "https://registry.npmjs.org/react-qr-code/-/react-qr-code-2.0.12.tgz", + "integrity": "sha512-k+pzP5CKLEGBRwZsDPp98/CAJeXlsYRHM2iZn1Sd5Th/HnKhIZCSg27PXO58zk8z02RaEryg+60xa4vyywMJwg==", + "dependencies": { + "prop-types": "^15.8.1", + "qr.js": "0.0.0" + }, + "peerDependencies": { + "react": "^16.x || ^17.x || ^18.x", + "react-native-svg": "*" + }, + "peerDependenciesMeta": { + "react-native-svg": { + "optional": true + } + } + }, + "node_modules/react-qr-reader-es6": { + "version": "2.2.1-2", + "resolved": "https://registry.npmjs.org/react-qr-reader-es6/-/react-qr-reader-es6-2.2.1-2.tgz", + "integrity": "sha512-pDNH8FoR3fOBBCgh4ImKHlX+pv/D3P8JmE+vjjcw3+YTEUgBqUAZbIkD/WUE3HzhVhN2zx7ZLBhO9vJngnjJxw==", + "dependencies": { + "jsqr-es6": "^1.4.0-1", + "prop-types": "^15.7.2" + }, + "peerDependencies": { + "react": ">=16", + "react-dom": ">=16" + } + }, "node_modules/react-refresh": { "version": "0.14.0", "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.14.0.tgz", @@ -5147,14 +5246,15 @@ "dev": true }, "node_modules/regexp.prototype.flags": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz", - "integrity": "sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==", + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", + "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "set-function-name": "^2.0.0" + "call-bind": "^1.0.6", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "set-function-name": "^2.0.1" }, "engines": { "node": ">= 0.4" @@ -5341,16 +5441,17 @@ "dev": true }, "node_modules/set-function-length": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.0.tgz", - "integrity": "sha512-4DBHDoyHlM1IRPGYcoxexgh67y4ueR53FKV1yyxwFMY7aCqcN/38M1+SwZ/qJQ8iLv7+ck385ot4CcisOAPT9w==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", "dev": true, "dependencies": { - "define-data-property": "^1.1.1", + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.2", + "get-intrinsic": "^1.2.4", "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.1" + "has-property-descriptors": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -5891,14 +5992,6 @@ "integrity": "sha512-o+ORpgGwaYQXgqGDwd+hkS4PuZ3QnmqMMxRuajK/a38L6fTpcE5GPIfrf+L/KemFzfUpeUQc1rRS1iDBozvnFA==", "dev": true }, - "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", - "dev": true, - "optional": true, - "peer": true - }, "node_modules/universal-cookie": { "version": "7.0.2", "resolved": "https://registry.npmjs.org/universal-cookie/-/universal-cookie-7.0.2.tgz", @@ -6217,16 +6310,16 @@ } }, "node_modules/which-typed-array": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.13.tgz", - "integrity": "sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow==", + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", + "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", "dev": true, "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.4", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", "for-each": "^0.3.3", "gopd": "^1.0.1", - "has-tostringtag": "^1.0.0" + "has-tostringtag": "^1.0.2" }, "engines": { "node": ">= 0.4" diff --git a/client/package.json b/client/package.json index 70f27e9..283c356 100644 --- a/client/package.json +++ b/client/package.json @@ -11,6 +11,7 @@ "test": "vitest" }, "dependencies": { + "@dotmind/react-use-pwa": "^1.0.4", "@types/react-leaflet-markercluster": "^3.0.4", "class-variance-authority": "^0.7.0", "formik": "^2.4.5", @@ -19,9 +20,12 @@ "react": "^18.2.0", "react-cookie": "^7.0.2", "react-dom": "^18.2.0", + "react-geolocated": "^4.1.2", "react-hot-toast": "^2.4.1", "react-leaflet": "^4.2.1", "react-line-awesome": "^1.4.1", + "react-qr-code": "^2.0.12", + "react-qr-reader-es6": "^2.2.1-2", "react-router": "^6.21.3", "react-router-dom": "^6.22.1", "yup": "^1.3.3" diff --git a/client/public/assets/img/animations/IdleAnim.gif b/client/public/assets/img/animations/IdleAnim.gif new file mode 100644 index 0000000..2bd2177 Binary files /dev/null and b/client/public/assets/img/animations/IdleAnim.gif differ diff --git a/client/public/assets/img/badges/Aquitaine/medaille-07.svg b/client/public/assets/img/badges/Aquitaine/medaille-07.svg deleted file mode 100644 index a136d4e..0000000 --- a/client/public/assets/img/badges/Aquitaine/medaille-07.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/client/public/assets/img/badges/Aquitaine/medaille-08.svg b/client/public/assets/img/badges/Aquitaine/medaille-08.svg deleted file mode 100644 index 6d6e876..0000000 --- a/client/public/assets/img/badges/Aquitaine/medaille-08.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/client/public/assets/img/badges/Aquitaine/medaille-09.svg b/client/public/assets/img/badges/Aquitaine/medaille-09.svg deleted file mode 100644 index f42d0df..0000000 --- a/client/public/assets/img/badges/Aquitaine/medaille-09.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/client/public/assets/img/badges/Aquitaine/medaille-10.svg b/client/public/assets/img/badges/Aquitaine/medaille-10.svg deleted file mode 100644 index 30a8229..0000000 --- a/client/public/assets/img/badges/Aquitaine/medaille-10.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/client/public/assets/img/badges/Aquitaine/medaille-11.svg b/client/public/assets/img/badges/Aquitaine/medaille-11.svg deleted file mode 100644 index bf133cf..0000000 --- a/client/public/assets/img/badges/Aquitaine/medaille-11.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/client/public/assets/img/badges/Aquitaine/medaille-12.svg b/client/public/assets/img/badges/Aquitaine/medaille-12.svg deleted file mode 100644 index eb3e02a..0000000 --- a/client/public/assets/img/badges/Aquitaine/medaille-12.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git "a/client/public/assets/img/badges/Aquitaine/medaille_M\303\251daille Aquitaine (7-12).svg" "b/client/public/assets/img/badges/Aquitaine/medaille_M\303\251daille Aquitaine (7-12).svg" deleted file mode 100644 index 9e19d5b..0000000 --- "a/client/public/assets/img/badges/Aquitaine/medaille_M\303\251daille Aquitaine (7-12).svg" +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/client/public/assets/img/badges/Ile de France/medaille-14.svg b/client/public/assets/img/badges/Ile de France/medaille-14.svg deleted file mode 100644 index 12f46b1..0000000 --- a/client/public/assets/img/badges/Ile de France/medaille-14.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/client/public/assets/img/badges/Ile de France/medaille-15.svg b/client/public/assets/img/badges/Ile de France/medaille-15.svg deleted file mode 100644 index 75da290..0000000 --- a/client/public/assets/img/badges/Ile de France/medaille-15.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/client/public/assets/img/badges/Ile de France/medaille-16.svg b/client/public/assets/img/badges/Ile de France/medaille-16.svg deleted file mode 100644 index edfbf32..0000000 --- a/client/public/assets/img/badges/Ile de France/medaille-16.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/client/public/assets/img/badges/Ile de France/medaille-17.svg b/client/public/assets/img/badges/Ile de France/medaille-17.svg deleted file mode 100644 index 640b567..0000000 --- a/client/public/assets/img/badges/Ile de France/medaille-17.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/client/public/assets/img/badges/Ile de France/medaille-18.svg b/client/public/assets/img/badges/Ile de France/medaille-18.svg deleted file mode 100644 index 13690d1..0000000 --- a/client/public/assets/img/badges/Ile de France/medaille-18.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/client/public/assets/img/badges/Ile de France/medaille-19.svg b/client/public/assets/img/badges/Ile de France/medaille-19.svg deleted file mode 100644 index f6a329f..0000000 --- a/client/public/assets/img/badges/Ile de France/medaille-19.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/client/public/assets/img/badges/Ile de France/medaille-20.svg b/client/public/assets/img/badges/Ile de France/medaille-20.svg deleted file mode 100644 index 640a0fd..0000000 --- a/client/public/assets/img/badges/Ile de France/medaille-20.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/client/public/assets/img/badges/Ile de France/medaille-21.svg b/client/public/assets/img/badges/Ile de France/medaille-21.svg deleted file mode 100644 index d04890c..0000000 --- a/client/public/assets/img/badges/Ile de France/medaille-21.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/client/public/assets/img/badges/Ile de France/medaille-22.svg b/client/public/assets/img/badges/Ile de France/medaille-22.svg deleted file mode 100644 index af96474..0000000 --- a/client/public/assets/img/badges/Ile de France/medaille-22.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git "a/client/public/assets/img/badges/Ile de France/medaille_M\303\251daille Ile de France (14-22).svg" "b/client/public/assets/img/badges/Ile de France/medaille_M\303\251daille Ile de France (14-22).svg" deleted file mode 100644 index 1f98957..0000000 --- "a/client/public/assets/img/badges/Ile de France/medaille_M\303\251daille Ile de France (14-22).svg" +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/client/public/assets/img/badges/Normandie/medaille-03.svg b/client/public/assets/img/badges/Normandie/medaille-03.svg deleted file mode 100644 index a7de45e..0000000 --- a/client/public/assets/img/badges/Normandie/medaille-03.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/client/public/assets/img/badges/Normandie/medaille-04.svg b/client/public/assets/img/badges/Normandie/medaille-04.svg deleted file mode 100644 index e7600c3..0000000 --- a/client/public/assets/img/badges/Normandie/medaille-04.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/client/public/assets/img/badges/Normandie/medaille-05.svg b/client/public/assets/img/badges/Normandie/medaille-05.svg deleted file mode 100644 index 4d0eec0..0000000 --- a/client/public/assets/img/badges/Normandie/medaille-05.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git "a/client/public/assets/img/badges/Normandie/medaille_M\303\251daille Normandie (3-5).svg" "b/client/public/assets/img/badges/Normandie/medaille_M\303\251daille Normandie (3-5).svg" deleted file mode 100644 index abc5205..0000000 --- "a/client/public/assets/img/badges/Normandie/medaille_M\303\251daille Normandie (3-5).svg" +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/client/public/assets/img/badges/Occitanie/medaille-24.svg b/client/public/assets/img/badges/Occitanie/medaille-24.svg deleted file mode 100644 index f6f5bcc..0000000 --- a/client/public/assets/img/badges/Occitanie/medaille-24.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/client/public/assets/img/badges/Occitanie/medaille-25.svg b/client/public/assets/img/badges/Occitanie/medaille-25.svg deleted file mode 100644 index 470f2cd..0000000 --- a/client/public/assets/img/badges/Occitanie/medaille-25.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/client/public/assets/img/badges/Occitanie/medaille-26.svg b/client/public/assets/img/badges/Occitanie/medaille-26.svg deleted file mode 100644 index 95b9ceb..0000000 --- a/client/public/assets/img/badges/Occitanie/medaille-26.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/client/public/assets/img/badges/Occitanie/medaille-27.svg b/client/public/assets/img/badges/Occitanie/medaille-27.svg deleted file mode 100644 index f1849f4..0000000 --- a/client/public/assets/img/badges/Occitanie/medaille-27.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/client/public/assets/img/badges/Occitanie/medaille-28.svg b/client/public/assets/img/badges/Occitanie/medaille-28.svg deleted file mode 100644 index 3c66e9d..0000000 --- a/client/public/assets/img/badges/Occitanie/medaille-28.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/client/public/assets/img/badges/Occitanie/medaille-29.svg b/client/public/assets/img/badges/Occitanie/medaille-29.svg deleted file mode 100644 index 0043913..0000000 --- a/client/public/assets/img/badges/Occitanie/medaille-29.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git "a/client/public/assets/img/badges/Occitanie/medaille_M\303\251daille Occitanie (24-29).svg" "b/client/public/assets/img/badges/Occitanie/medaille_M\303\251daille Occitanie (24-29).svg" deleted file mode 100644 index 4684670..0000000 --- "a/client/public/assets/img/badges/Occitanie/medaille_M\303\251daille Occitanie (24-29).svg" +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/client/public/assets/img/badges/Outre-Mer/medaille-43.svg b/client/public/assets/img/badges/Outre-Mer/medaille-43.svg deleted file mode 100644 index 026a3b0..0000000 --- a/client/public/assets/img/badges/Outre-Mer/medaille-43.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/client/public/assets/img/badges/Outre-Mer/medaille-44.svg b/client/public/assets/img/badges/Outre-Mer/medaille-44.svg deleted file mode 100644 index c9f6071..0000000 --- a/client/public/assets/img/badges/Outre-Mer/medaille-44.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/client/public/assets/img/badges/Outre-Mer/medaille-45.svg b/client/public/assets/img/badges/Outre-Mer/medaille-45.svg deleted file mode 100644 index f2f8982..0000000 --- a/client/public/assets/img/badges/Outre-Mer/medaille-45.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/client/public/assets/img/badges/Outre-Mer/medaille-46.svg b/client/public/assets/img/badges/Outre-Mer/medaille-46.svg deleted file mode 100644 index 3ecacb0..0000000 --- a/client/public/assets/img/badges/Outre-Mer/medaille-46.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/client/public/assets/img/badges/Outre-Mer/medaille-47.svg b/client/public/assets/img/badges/Outre-Mer/medaille-47.svg deleted file mode 100644 index 4d5aae4..0000000 --- a/client/public/assets/img/badges/Outre-Mer/medaille-47.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git "a/client/public/assets/img/badges/Outre-Mer/medaille_M\303\251daille Outre-Mer (43-47).svg" "b/client/public/assets/img/badges/Outre-Mer/medaille_M\303\251daille Outre-Mer (43-47).svg" deleted file mode 100644 index b298041..0000000 --- "a/client/public/assets/img/badges/Outre-Mer/medaille_M\303\251daille Outre-Mer (43-47).svg" +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/client/public/assets/img/badges/PACA/medaille-36.svg b/client/public/assets/img/badges/PACA/medaille-36.svg deleted file mode 100644 index f0c9435..0000000 --- a/client/public/assets/img/badges/PACA/medaille-36.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/client/public/assets/img/badges/PACA/medaille-37.svg b/client/public/assets/img/badges/PACA/medaille-37.svg deleted file mode 100644 index bbc1bfc..0000000 --- a/client/public/assets/img/badges/PACA/medaille-37.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/client/public/assets/img/badges/PACA/medaille-38.svg b/client/public/assets/img/badges/PACA/medaille-38.svg deleted file mode 100644 index ed434c9..0000000 --- a/client/public/assets/img/badges/PACA/medaille-38.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/client/public/assets/img/badges/PACA/medaille-39.svg b/client/public/assets/img/badges/PACA/medaille-39.svg deleted file mode 100644 index 5d6a1e5..0000000 --- a/client/public/assets/img/badges/PACA/medaille-39.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/client/public/assets/img/badges/PACA/medaille-40.svg b/client/public/assets/img/badges/PACA/medaille-40.svg deleted file mode 100644 index 7c4ff74..0000000 --- a/client/public/assets/img/badges/PACA/medaille-40.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/client/public/assets/img/badges/PACA/medaille-41.svg b/client/public/assets/img/badges/PACA/medaille-41.svg deleted file mode 100644 index 0d796dc..0000000 --- a/client/public/assets/img/badges/PACA/medaille-41.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git "a/client/public/assets/img/badges/PACA/medaille_M\303\251daille PACA (36-41).svg" "b/client/public/assets/img/badges/PACA/medaille_M\303\251daille PACA (36-41).svg" deleted file mode 100644 index 01980cc..0000000 --- "a/client/public/assets/img/badges/PACA/medaille_M\303\251daille PACA (36-41).svg" +++ /dev/null @@ -1,52 +0,0 @@ - - medaille_Médaille PACA (36-41)-svg - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/client/public/assets/img/badges/Pays de la Loire/medaille-31.svg b/client/public/assets/img/badges/Pays de la Loire/medaille-31.svg deleted file mode 100644 index c792af2..0000000 --- a/client/public/assets/img/badges/Pays de la Loire/medaille-31.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/client/public/assets/img/badges/Pays de la Loire/medaille-32.svg b/client/public/assets/img/badges/Pays de la Loire/medaille-32.svg deleted file mode 100644 index e91bf80..0000000 --- a/client/public/assets/img/badges/Pays de la Loire/medaille-32.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/client/public/assets/img/badges/Pays de la Loire/medaille-33.svg b/client/public/assets/img/badges/Pays de la Loire/medaille-33.svg deleted file mode 100644 index aac7f0f..0000000 --- a/client/public/assets/img/badges/Pays de la Loire/medaille-33.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/client/public/assets/img/badges/Pays de la Loire/medaille-34.svg b/client/public/assets/img/badges/Pays de la Loire/medaille-34.svg deleted file mode 100644 index 84154c1..0000000 --- a/client/public/assets/img/badges/Pays de la Loire/medaille-34.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git "a/client/public/assets/img/badges/Pays de la Loire/medaille_M\303\251daille Pays de la Loire (31-34).svg" "b/client/public/assets/img/badges/Pays de la Loire/medaille_M\303\251daille Pays de la Loire (31-34).svg" deleted file mode 100644 index 9795e79..0000000 --- "a/client/public/assets/img/badges/Pays de la Loire/medaille_M\303\251daille Pays de la Loire (31-34).svg" +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/client/public/assets/img/badges/angers_blason.png b/client/public/assets/img/badges/angers_blason.png new file mode 100644 index 0000000..5f18c07 Binary files /dev/null and b/client/public/assets/img/badges/angers_blason.png differ diff --git a/client/public/assets/img/badges/angers_blason.svg b/client/public/assets/img/badges/angers_blason.svg new file mode 100644 index 0000000..8e490a6 --- /dev/null +++ b/client/public/assets/img/badges/angers_blason.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/client/public/assets/img/badges/angouleme_blason.png b/client/public/assets/img/badges/angouleme_blason.png new file mode 100644 index 0000000..081f9ca Binary files /dev/null and b/client/public/assets/img/badges/angouleme_blason.png differ diff --git a/client/public/assets/img/badges/angouleme_blason.svg b/client/public/assets/img/badges/angouleme_blason.svg new file mode 100644 index 0000000..4a51acb --- /dev/null +++ b/client/public/assets/img/badges/angouleme_blason.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/client/public/assets/img/badges/aquitaine_cover.png b/client/public/assets/img/badges/aquitaine_cover.png new file mode 100644 index 0000000..0c0763d Binary files /dev/null and b/client/public/assets/img/badges/aquitaine_cover.png differ diff --git a/client/public/assets/img/badges/aquitaine_cover.svg b/client/public/assets/img/badges/aquitaine_cover.svg new file mode 100644 index 0000000..8195627 --- /dev/null +++ b/client/public/assets/img/badges/aquitaine_cover.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/client/public/assets/img/badges/arles_blason.png b/client/public/assets/img/badges/arles_blason.png new file mode 100644 index 0000000..702ca79 Binary files /dev/null and b/client/public/assets/img/badges/arles_blason.png differ diff --git a/client/public/assets/img/badges/arles_blason.svg b/client/public/assets/img/badges/arles_blason.svg new file mode 100644 index 0000000..5a2e107 --- /dev/null +++ b/client/public/assets/img/badges/arles_blason.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/client/public/assets/img/badges/auch_blason.png b/client/public/assets/img/badges/auch_blason.png new file mode 100644 index 0000000..1177d02 Binary files /dev/null and b/client/public/assets/img/badges/auch_blason.png differ diff --git a/client/public/assets/img/badges/auch_blason.svg b/client/public/assets/img/badges/auch_blason.svg new file mode 100644 index 0000000..9437ec4 --- /dev/null +++ b/client/public/assets/img/badges/auch_blason.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/client/public/assets/img/badges/avignon_blason.png b/client/public/assets/img/badges/avignon_blason.png new file mode 100644 index 0000000..9767ddb Binary files /dev/null and b/client/public/assets/img/badges/avignon_blason.png differ diff --git a/client/public/assets/img/badges/avignon_blason.svg b/client/public/assets/img/badges/avignon_blason.svg new file mode 100644 index 0000000..60b3c49 --- /dev/null +++ b/client/public/assets/img/badges/avignon_blason.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/client/public/assets/img/badges/bordeaux_blason.png b/client/public/assets/img/badges/bordeaux_blason.png new file mode 100644 index 0000000..daa90d5 Binary files /dev/null and b/client/public/assets/img/badges/bordeaux_blason.png differ diff --git a/client/public/assets/img/badges/bordeaux_blason.svg b/client/public/assets/img/badges/bordeaux_blason.svg new file mode 100644 index 0000000..58c1a5c --- /dev/null +++ b/client/public/assets/img/badges/bordeaux_blason.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/client/public/assets/img/badges/caen_blason.png b/client/public/assets/img/badges/caen_blason.png new file mode 100644 index 0000000..583a5a4 Binary files /dev/null and b/client/public/assets/img/badges/caen_blason.png differ diff --git a/client/public/assets/img/badges/caen_blason.svg b/client/public/assets/img/badges/caen_blason.svg new file mode 100644 index 0000000..f7c721a --- /dev/null +++ b/client/public/assets/img/badges/caen_blason.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/client/public/assets/img/badges/carcassonne_blason.png b/client/public/assets/img/badges/carcassonne_blason.png new file mode 100644 index 0000000..3952f7c Binary files /dev/null and b/client/public/assets/img/badges/carcassonne_blason.png differ diff --git a/client/public/assets/img/badges/carcassonne_blason.svg b/client/public/assets/img/badges/carcassonne_blason.svg new file mode 100644 index 0000000..b769e2e --- /dev/null +++ b/client/public/assets/img/badges/carcassonne_blason.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/client/public/assets/img/badges/cayenne_blason.png b/client/public/assets/img/badges/cayenne_blason.png new file mode 100644 index 0000000..2a05388 Binary files /dev/null and b/client/public/assets/img/badges/cayenne_blason.png differ diff --git a/client/public/assets/img/badges/cayenne_blason.svg b/client/public/assets/img/badges/cayenne_blason.svg new file mode 100644 index 0000000..736d736 --- /dev/null +++ b/client/public/assets/img/badges/cayenne_blason.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/client/public/assets/img/badges/creteil_blason.png b/client/public/assets/img/badges/creteil_blason.png new file mode 100644 index 0000000..d8c72a1 Binary files /dev/null and b/client/public/assets/img/badges/creteil_blason.png differ diff --git a/client/public/assets/img/badges/creteil_blason.svg b/client/public/assets/img/badges/creteil_blason.svg new file mode 100644 index 0000000..c1ef814 --- /dev/null +++ b/client/public/assets/img/badges/creteil_blason.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/client/public/assets/img/badges/depart_marseille.svg b/client/public/assets/img/badges/depart_marseille.svg new file mode 100644 index 0000000..56f6f58 --- /dev/null +++ b/client/public/assets/img/badges/depart_marseille.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/client/public/assets/img/badges/evry_blason.png b/client/public/assets/img/badges/evry_blason.png new file mode 100644 index 0000000..5da434a Binary files /dev/null and b/client/public/assets/img/badges/evry_blason.png differ diff --git a/client/public/assets/img/badges/evry_blason.svg b/client/public/assets/img/badges/evry_blason.svg new file mode 100644 index 0000000..1ea9377 --- /dev/null +++ b/client/public/assets/img/badges/evry_blason.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/client/public/assets/img/badges/guyane_blason.png b/client/public/assets/img/badges/guyane_blason.png new file mode 100644 index 0000000..f0deec3 Binary files /dev/null and b/client/public/assets/img/badges/guyane_blason.png differ diff --git a/client/public/assets/img/badges/guyane_blason.svg b/client/public/assets/img/badges/guyane_blason.svg new file mode 100644 index 0000000..e56886c --- /dev/null +++ b/client/public/assets/img/badges/guyane_blason.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/client/public/assets/img/badges/ile_de_france_cover.png b/client/public/assets/img/badges/ile_de_france_cover.png new file mode 100644 index 0000000..e869a1e Binary files /dev/null and b/client/public/assets/img/badges/ile_de_france_cover.png differ diff --git a/client/public/assets/img/badges/ile_de_france_cover.svg b/client/public/assets/img/badges/ile_de_france_cover.svg new file mode 100644 index 0000000..6f397ba --- /dev/null +++ b/client/public/assets/img/badges/ile_de_france_cover.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/client/public/assets/img/badges/la_baule_blason.png b/client/public/assets/img/badges/la_baule_blason.png new file mode 100644 index 0000000..e2fc3f6 Binary files /dev/null and b/client/public/assets/img/badges/la_baule_blason.png differ diff --git a/client/public/assets/img/badges/la_baule_blason.svg b/client/public/assets/img/badges/la_baule_blason.svg new file mode 100644 index 0000000..9f5237a --- /dev/null +++ b/client/public/assets/img/badges/la_baule_blason.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/client/public/assets/img/badges/la_courneuve_blason.png b/client/public/assets/img/badges/la_courneuve_blason.png new file mode 100644 index 0000000..3535d60 Binary files /dev/null and b/client/public/assets/img/badges/la_courneuve_blason.png differ diff --git a/client/public/assets/img/badges/la_courneuve_blason.svg b/client/public/assets/img/badges/la_courneuve_blason.svg new file mode 100644 index 0000000..1b9fc34 --- /dev/null +++ b/client/public/assets/img/badges/la_courneuve_blason.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/client/public/assets/img/badges/laval_blason.png b/client/public/assets/img/badges/laval_blason.png new file mode 100644 index 0000000..7868dad Binary files /dev/null and b/client/public/assets/img/badges/laval_blason.png differ diff --git a/client/public/assets/img/badges/laval_blason.svg b/client/public/assets/img/badges/laval_blason.svg new file mode 100644 index 0000000..d6cebc5 --- /dev/null +++ b/client/public/assets/img/badges/laval_blason.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/client/public/assets/img/badges/le_havre_blason.png b/client/public/assets/img/badges/le_havre_blason.png new file mode 100644 index 0000000..1c5f959 Binary files /dev/null and b/client/public/assets/img/badges/le_havre_blason.png differ diff --git a/client/public/assets/img/badges/le_havre_blason.svg b/client/public/assets/img/badges/le_havre_blason.svg new file mode 100644 index 0000000..d5d0fc3 --- /dev/null +++ b/client/public/assets/img/badges/le_havre_blason.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/client/public/assets/img/badges/manosque_blason.png b/client/public/assets/img/badges/manosque_blason.png new file mode 100644 index 0000000..e1bf159 Binary files /dev/null and b/client/public/assets/img/badges/manosque_blason.png differ diff --git a/client/public/assets/img/badges/manosque_blason.svg b/client/public/assets/img/badges/manosque_blason.svg new file mode 100644 index 0000000..bdae99c --- /dev/null +++ b/client/public/assets/img/badges/manosque_blason.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/client/public/assets/img/badges/marseille_blason.png b/client/public/assets/img/badges/marseille_blason.png new file mode 100644 index 0000000..8f83617 Binary files /dev/null and b/client/public/assets/img/badges/marseille_blason.png differ diff --git a/client/public/assets/img/badges/marseille_blason.svg b/client/public/assets/img/badges/marseille_blason.svg new file mode 100644 index 0000000..6604450 --- /dev/null +++ b/client/public/assets/img/badges/marseille_blason.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/client/public/assets/img/badges/martinique_blason.png b/client/public/assets/img/badges/martinique_blason.png new file mode 100644 index 0000000..cc1db99 Binary files /dev/null and b/client/public/assets/img/badges/martinique_blason.png differ diff --git a/client/public/assets/img/badges/martinique_blason.svg b/client/public/assets/img/badges/martinique_blason.svg new file mode 100644 index 0000000..e00d3f6 --- /dev/null +++ b/client/public/assets/img/badges/martinique_blason.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/client/public/assets/img/badges/meaux_blason.png b/client/public/assets/img/badges/meaux_blason.png new file mode 100644 index 0000000..c531d24 Binary files /dev/null and b/client/public/assets/img/badges/meaux_blason.png differ diff --git a/client/public/assets/img/badges/meaux_blason.svg b/client/public/assets/img/badges/meaux_blason.svg new file mode 100644 index 0000000..d8cc96a --- /dev/null +++ b/client/public/assets/img/badges/meaux_blason.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/client/public/assets/img/badges/mont_st_michel_blason.png b/client/public/assets/img/badges/mont_st_michel_blason.png new file mode 100644 index 0000000..c7f262e Binary files /dev/null and b/client/public/assets/img/badges/mont_st_michel_blason.png differ diff --git a/client/public/assets/img/badges/mont_st_michel_blason.svg b/client/public/assets/img/badges/mont_st_michel_blason.svg new file mode 100644 index 0000000..02dace3 --- /dev/null +++ b/client/public/assets/img/badges/mont_st_michel_blason.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/client/public/assets/img/badges/montpellier_blason.png b/client/public/assets/img/badges/montpellier_blason.png new file mode 100644 index 0000000..29cff8b Binary files /dev/null and b/client/public/assets/img/badges/montpellier_blason.png differ diff --git a/client/public/assets/img/badges/montpellier_blason.svg b/client/public/assets/img/badges/montpellier_blason.svg new file mode 100644 index 0000000..61aacd4 --- /dev/null +++ b/client/public/assets/img/badges/montpellier_blason.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/client/public/assets/img/badges/nanterre_blason.png b/client/public/assets/img/badges/nanterre_blason.png new file mode 100644 index 0000000..a027384 Binary files /dev/null and b/client/public/assets/img/badges/nanterre_blason.png differ diff --git a/client/public/assets/img/badges/nanterre_blason.svg b/client/public/assets/img/badges/nanterre_blason.svg new file mode 100644 index 0000000..814820b --- /dev/null +++ b/client/public/assets/img/badges/nanterre_blason.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/client/public/assets/img/badges/nice_blason.png b/client/public/assets/img/badges/nice_blason.png new file mode 100644 index 0000000..8b5b4b0 Binary files /dev/null and b/client/public/assets/img/badges/nice_blason.png differ diff --git a/client/public/assets/img/badges/nice_blason.svg b/client/public/assets/img/badges/nice_blason.svg new file mode 100644 index 0000000..0535bbb --- /dev/null +++ b/client/public/assets/img/badges/nice_blason.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/client/public/assets/img/badges/niort_blason.png b/client/public/assets/img/badges/niort_blason.png new file mode 100644 index 0000000..af7416e Binary files /dev/null and b/client/public/assets/img/badges/niort_blason.png differ diff --git a/client/public/assets/img/badges/niort_blason.svg b/client/public/assets/img/badges/niort_blason.svg new file mode 100644 index 0000000..b2a1bdf --- /dev/null +++ b/client/public/assets/img/badges/niort_blason.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/client/public/assets/img/badges/normandie_cover.png b/client/public/assets/img/badges/normandie_cover.png new file mode 100644 index 0000000..afbf548 Binary files /dev/null and b/client/public/assets/img/badges/normandie_cover.png differ diff --git a/client/public/assets/img/badges/normandie_cover.svg b/client/public/assets/img/badges/normandie_cover.svg new file mode 100644 index 0000000..df6742a --- /dev/null +++ b/client/public/assets/img/badges/normandie_cover.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/client/public/assets/img/badges/occitanie_cover.png b/client/public/assets/img/badges/occitanie_cover.png new file mode 100644 index 0000000..67d8909 Binary files /dev/null and b/client/public/assets/img/badges/occitanie_cover.png differ diff --git a/client/public/assets/img/badges/occitanie_cover.svg b/client/public/assets/img/badges/occitanie_cover.svg new file mode 100644 index 0000000..3a3beef --- /dev/null +++ b/client/public/assets/img/badges/occitanie_cover.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/client/public/assets/img/badges/outre_mer_cover.png b/client/public/assets/img/badges/outre_mer_cover.png new file mode 100644 index 0000000..dc7a582 Binary files /dev/null and b/client/public/assets/img/badges/outre_mer_cover.png differ diff --git a/client/public/assets/img/badges/outre_mer_cover.svg b/client/public/assets/img/badges/outre_mer_cover.svg new file mode 100644 index 0000000..7443f1c --- /dev/null +++ b/client/public/assets/img/badges/outre_mer_cover.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/client/public/assets/img/badges/paca_cover.png b/client/public/assets/img/badges/paca_cover.png new file mode 100644 index 0000000..656b96c Binary files /dev/null and b/client/public/assets/img/badges/paca_cover.png differ diff --git a/client/public/assets/img/badges/paca_cover.svg b/client/public/assets/img/badges/paca_cover.svg new file mode 100644 index 0000000..c76984c --- /dev/null +++ b/client/public/assets/img/badges/paca_cover.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/client/public/assets/img/badges/paris_blason.png b/client/public/assets/img/badges/paris_blason.png new file mode 100644 index 0000000..a3ae4fa Binary files /dev/null and b/client/public/assets/img/badges/paris_blason.png differ diff --git a/client/public/assets/img/badges/paris_blason.svg b/client/public/assets/img/badges/paris_blason.svg new file mode 100644 index 0000000..060ee1e --- /dev/null +++ b/client/public/assets/img/badges/paris_blason.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/client/public/assets/img/badges/pau_blason.png b/client/public/assets/img/badges/pau_blason.png new file mode 100644 index 0000000..cafd54a Binary files /dev/null and b/client/public/assets/img/badges/pau_blason.png differ diff --git a/client/public/assets/img/badges/pau_blason.svg b/client/public/assets/img/badges/pau_blason.svg new file mode 100644 index 0000000..02806f4 --- /dev/null +++ b/client/public/assets/img/badges/pau_blason.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/client/public/assets/img/badges/pays_de_la_loire_cover.png b/client/public/assets/img/badges/pays_de_la_loire_cover.png new file mode 100644 index 0000000..8aa7ab2 Binary files /dev/null and b/client/public/assets/img/badges/pays_de_la_loire_cover.png differ diff --git a/client/public/assets/img/badges/pays_de_la_loire_cover.svg b/client/public/assets/img/badges/pays_de_la_loire_cover.svg new file mode 100644 index 0000000..7abcc67 --- /dev/null +++ b/client/public/assets/img/badges/pays_de_la_loire_cover.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/client/public/assets/img/badges/perigueux_blason.png b/client/public/assets/img/badges/perigueux_blason.png new file mode 100644 index 0000000..c90d52c Binary files /dev/null and b/client/public/assets/img/badges/perigueux_blason.png differ diff --git a/client/public/assets/img/badges/perigueux_blason.svg b/client/public/assets/img/badges/perigueux_blason.svg new file mode 100644 index 0000000..8ab6465 --- /dev/null +++ b/client/public/assets/img/badges/perigueux_blason.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/client/public/assets/img/badges/perpignan_blason.png b/client/public/assets/img/badges/perpignan_blason.png new file mode 100644 index 0000000..086a0aa Binary files /dev/null and b/client/public/assets/img/badges/perpignan_blason.png differ diff --git a/client/public/assets/img/badges/perpignan_blason.svg b/client/public/assets/img/badges/perpignan_blason.svg new file mode 100644 index 0000000..2c2b4ab --- /dev/null +++ b/client/public/assets/img/badges/perpignan_blason.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/client/public/assets/img/badges/placeholder.svg b/client/public/assets/img/badges/placeholder.svg new file mode 100644 index 0000000..2917667 --- /dev/null +++ b/client/public/assets/img/badges/placeholder.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/client/public/assets/img/badges/poitiers_blason.png b/client/public/assets/img/badges/poitiers_blason.png new file mode 100644 index 0000000..1a4cd1d Binary files /dev/null and b/client/public/assets/img/badges/poitiers_blason.png differ diff --git a/client/public/assets/img/badges/poitiers_blason.svg b/client/public/assets/img/badges/poitiers_blason.svg new file mode 100644 index 0000000..a088de0 --- /dev/null +++ b/client/public/assets/img/badges/poitiers_blason.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/client/public/assets/img/badges/polynesie_blason.png b/client/public/assets/img/badges/polynesie_blason.png new file mode 100644 index 0000000..c15f211 Binary files /dev/null and b/client/public/assets/img/badges/polynesie_blason.png differ diff --git a/client/public/assets/img/badges/polynesie_blason.svg b/client/public/assets/img/badges/polynesie_blason.svg new file mode 100644 index 0000000..37c0ea4 --- /dev/null +++ b/client/public/assets/img/badges/polynesie_blason.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/client/public/assets/img/badges/reunion_blason.png b/client/public/assets/img/badges/reunion_blason.png new file mode 100644 index 0000000..b22837f Binary files /dev/null and b/client/public/assets/img/badges/reunion_blason.png differ diff --git a/client/public/assets/img/badges/reunion_blason.svg b/client/public/assets/img/badges/reunion_blason.svg new file mode 100644 index 0000000..dd6761a --- /dev/null +++ b/client/public/assets/img/badges/reunion_blason.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/client/public/assets/img/badges/sables_olonne_blason.png b/client/public/assets/img/badges/sables_olonne_blason.png new file mode 100644 index 0000000..d0a6f57 Binary files /dev/null and b/client/public/assets/img/badges/sables_olonne_blason.png differ diff --git a/client/public/assets/img/badges/sables_olonne_blason.svg b/client/public/assets/img/badges/sables_olonne_blason.svg new file mode 100644 index 0000000..407d595 --- /dev/null +++ b/client/public/assets/img/badges/sables_olonne_blason.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/client/public/assets/img/badges/soisy_blason.png b/client/public/assets/img/badges/soisy_blason.png new file mode 100644 index 0000000..bcd1b93 Binary files /dev/null and b/client/public/assets/img/badges/soisy_blason.png differ diff --git a/client/public/assets/img/badges/soisy_blason.svg b/client/public/assets/img/badges/soisy_blason.svg new file mode 100644 index 0000000..74c42f7 --- /dev/null +++ b/client/public/assets/img/badges/soisy_blason.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/client/public/assets/img/badges/st_denis_blason.png b/client/public/assets/img/badges/st_denis_blason.png new file mode 100644 index 0000000..cd92b73 Binary files /dev/null and b/client/public/assets/img/badges/st_denis_blason.png differ diff --git a/client/public/assets/img/badges/st_denis_blason.svg b/client/public/assets/img/badges/st_denis_blason.svg new file mode 100644 index 0000000..43efc75 --- /dev/null +++ b/client/public/assets/img/badges/st_denis_blason.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/client/public/assets/img/badges/tarbes_blason.png b/client/public/assets/img/badges/tarbes_blason.png new file mode 100644 index 0000000..3eab114 Binary files /dev/null and b/client/public/assets/img/badges/tarbes_blason.png differ diff --git a/client/public/assets/img/badges/tarbes_blason.svg b/client/public/assets/img/badges/tarbes_blason.svg new file mode 100644 index 0000000..d2afe08 --- /dev/null +++ b/client/public/assets/img/badges/tarbes_blason.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/client/public/assets/img/badges/toulon_blason.png b/client/public/assets/img/badges/toulon_blason.png new file mode 100644 index 0000000..8f4572b Binary files /dev/null and b/client/public/assets/img/badges/toulon_blason.png differ diff --git a/client/public/assets/img/badges/toulon_blason.svg b/client/public/assets/img/badges/toulon_blason.svg new file mode 100644 index 0000000..428edde --- /dev/null +++ b/client/public/assets/img/badges/toulon_blason.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/client/public/assets/img/badges/toulouse_blason.png b/client/public/assets/img/badges/toulouse_blason.png new file mode 100644 index 0000000..c0a428b Binary files /dev/null and b/client/public/assets/img/badges/toulouse_blason.png differ diff --git a/client/public/assets/img/badges/toulouse_blason.svg b/client/public/assets/img/badges/toulouse_blason.svg new file mode 100644 index 0000000..1034b9c --- /dev/null +++ b/client/public/assets/img/badges/toulouse_blason.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/client/public/assets/img/badges/versailles_blason.png b/client/public/assets/img/badges/versailles_blason.png new file mode 100644 index 0000000..f85f8f6 Binary files /dev/null and b/client/public/assets/img/badges/versailles_blason.png differ diff --git a/client/public/assets/img/badges/versailles_blason.svg b/client/public/assets/img/badges/versailles_blason.svg new file mode 100644 index 0000000..9ac542a --- /dev/null +++ b/client/public/assets/img/badges/versailles_blason.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/client/public/assets/img/cosmetics/altere.png b/client/public/assets/img/cosmetics/altere.png new file mode 100644 index 0000000..1a878f4 Binary files /dev/null and b/client/public/assets/img/cosmetics/altere.png differ diff --git a/client/public/assets/img/cosmetics/basket-ball.png b/client/public/assets/img/cosmetics/basket-ball.png new file mode 100644 index 0000000..b8b18a1 Binary files /dev/null and b/client/public/assets/img/cosmetics/basket-ball.png differ diff --git a/client/public/assets/img/cosmetics/bonnetbain.png b/client/public/assets/img/cosmetics/bonnetbain.png new file mode 100644 index 0000000..ced34a9 Binary files /dev/null and b/client/public/assets/img/cosmetics/bonnetbain.png differ diff --git a/client/public/assets/img/cosmetics/boxes-gloves.png b/client/public/assets/img/cosmetics/boxes-gloves.png new file mode 100644 index 0000000..6de86fd Binary files /dev/null and b/client/public/assets/img/cosmetics/boxes-gloves.png differ diff --git a/client/public/assets/img/cosmetics/turbo-chaussures.png b/client/public/assets/img/cosmetics/turbo-chaussures.png new file mode 100644 index 0000000..c0c880f Binary files /dev/null and b/client/public/assets/img/cosmetics/turbo-chaussures.png differ diff --git a/client/public/assets/img/cosmetics/volley-ball.png b/client/public/assets/img/cosmetics/volley-ball.png new file mode 100644 index 0000000..edbb434 Binary files /dev/null and b/client/public/assets/img/cosmetics/volley-ball.png differ diff --git "a/client/public/assets/img/game/runner/Arriv\303\251eIdle.gif" "b/client/public/assets/img/game/runner/Arriv\303\251eIdle.gif" new file mode 100644 index 0000000..5e71cfd Binary files /dev/null and "b/client/public/assets/img/game/runner/Arriv\303\251eIdle.gif" differ diff --git "a/client/public/assets/img/game/runner/Arriv\303\251eScratch.gif" "b/client/public/assets/img/game/runner/Arriv\303\251eScratch.gif" new file mode 100644 index 0000000..d2bb398 Binary files /dev/null and "b/client/public/assets/img/game/runner/Arriv\303\251eScratch.gif" differ diff --git a/client/public/assets/img/game/runner/CacheCourse.png b/client/public/assets/img/game/runner/CacheCourse.png new file mode 100644 index 0000000..1ce22b4 Binary files /dev/null and b/client/public/assets/img/game/runner/CacheCourse.png differ diff --git "a/client/public/assets/img/game/runner/PisteD\303\251part.png" "b/client/public/assets/img/game/runner/PisteD\303\251part.png" new file mode 100644 index 0000000..2f26996 Binary files /dev/null and "b/client/public/assets/img/game/runner/PisteD\303\251part.png" differ diff --git a/client/public/assets/img/game/runner/PisteNormale.png b/client/public/assets/img/game/runner/PisteNormale.png new file mode 100644 index 0000000..d2b5ef0 Binary files /dev/null and b/client/public/assets/img/game/runner/PisteNormale.png differ diff --git a/client/public/assets/img/game/runner/RunAnim.gif b/client/public/assets/img/game/runner/RunAnim.gif new file mode 100644 index 0000000..327f038 Binary files /dev/null and b/client/public/assets/img/game/runner/RunAnim.gif differ diff --git a/client/public/assets/img/game/runner/RunPrepAnim.gif b/client/public/assets/img/game/runner/RunPrepAnim.gif new file mode 100644 index 0000000..8e04bf0 Binary files /dev/null and b/client/public/assets/img/game/runner/RunPrepAnim.gif differ diff --git a/client/public/assets/img/game/runner/TapSprite.png b/client/public/assets/img/game/runner/TapSprite.png new file mode 100644 index 0000000..2e538b8 Binary files /dev/null and b/client/public/assets/img/game/runner/TapSprite.png differ diff --git a/client/public/assets/img/game/runner/WinAnim.gif b/client/public/assets/img/game/runner/WinAnim.gif new file mode 100644 index 0000000..2835033 Binary files /dev/null and b/client/public/assets/img/game/runner/WinAnim.gif differ diff --git a/client/public/assets/img/icons/competition.svg b/client/public/assets/img/icons/competition.svg new file mode 100644 index 0000000..2241ee1 --- /dev/null +++ b/client/public/assets/img/icons/competition.svg @@ -0,0 +1,4 @@ + + + + diff --git a/client/public/assets/img/icons/dumbbell.svg b/client/public/assets/img/icons/dumbbell.svg new file mode 100644 index 0000000..9ea9fd0 --- /dev/null +++ b/client/public/assets/img/icons/dumbbell.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/client/public/assets/img/icons/flami.png b/client/public/assets/img/icons/flami.png new file mode 100644 index 0000000..13c3df3 Binary files /dev/null and b/client/public/assets/img/icons/flami.png differ diff --git a/client/public/assets/img/icons/flami.svg b/client/public/assets/img/icons/flami.svg new file mode 100644 index 0000000..ec9900c --- /dev/null +++ b/client/public/assets/img/icons/flami.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/client/public/assets/img/icons/sparkling.svg b/client/public/assets/img/icons/sparkling.svg new file mode 100644 index 0000000..49fba67 --- /dev/null +++ b/client/public/assets/img/icons/sparkling.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/client/public/assets/img/logo/flami-logo.png b/client/public/assets/img/logo/flami-logo.png new file mode 100644 index 0000000..a6140d3 Binary files /dev/null and b/client/public/assets/img/logo/flami-logo.png differ diff --git a/client/public/assets/img/logo/flami-logo.svg b/client/public/assets/img/logo/flami-logo.svg new file mode 100644 index 0000000..92ab6fa --- /dev/null +++ b/client/public/assets/img/logo/flami-logo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/client/public/icon-192x192.png b/client/public/icon-192x192.png new file mode 100644 index 0000000..77ba683 Binary files /dev/null and b/client/public/icon-192x192.png differ diff --git a/client/public/icon-256x256.png b/client/public/icon-256x256.png new file mode 100644 index 0000000..d91c7c1 Binary files /dev/null and b/client/public/icon-256x256.png differ diff --git a/client/public/icon-384x384.png b/client/public/icon-384x384.png new file mode 100644 index 0000000..c6285c6 Binary files /dev/null and b/client/public/icon-384x384.png differ diff --git a/client/public/icon-512x512.png b/client/public/icon-512x512.png new file mode 100644 index 0000000..dad12e3 Binary files /dev/null and b/client/public/icon-512x512.png differ diff --git a/client/public/manifest.json b/client/public/manifest.json new file mode 100644 index 0000000..dac5d8a --- /dev/null +++ b/client/public/manifest.json @@ -0,0 +1,32 @@ +{ + "theme_color": "#FF9900", + "background_color": "#FF9900", + "display": "standalone", + "scope": "/", + "start_url": "/", + "name": "Flami", + "short_name": "Flami", + "description": "", + "icons": [ + { + "src": "/icon-192x192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "/icon-256x256.png", + "sizes": "256x256", + "type": "image/png" + }, + { + "src": "/icon-384x384.png", + "sizes": "384x384", + "type": "image/png" + }, + { + "src": "/icon-512x512.png", + "sizes": "512x512", + "type": "image/png" + } + ] +} diff --git a/client/src/App.tsx b/client/src/App.tsx index d767f5e..5fa50c1 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -14,6 +14,10 @@ import AuthRoute from "./utils/routes/AuthRoute"; import ErrorPage from "./pages/error/ErrorPage"; import { useEffect } from "react"; import AccountPage from "./pages/profile/AccountPage"; +import AllBadgesPage from "./pages/profile/AllBadgesPage"; +import SharePage from "./pages/flami/SharePage"; +import ScanPage from "./pages/flami/ScanPage"; +import TrainingPage from "./pages/activities/TrainingPage"; const TOAST_LIMIT = 2; @@ -32,9 +36,13 @@ const App = () => { }> } /> + } /> + } /> } /> } /> } /> + } /> + } /> }> } /> diff --git a/client/src/assets/styles/main.css b/client/src/assets/styles/main.css index 79af2d6..c04d2fc 100644 --- a/client/src/assets/styles/main.css +++ b/client/src/assets/styles/main.css @@ -96,20 +96,29 @@ main .leaflet-popup { } .badge-display { - transition: .21s ease-out; - transform: rotate(0deg); + transition: 1s cubic-bezier(.62,-0.02,0,1.08); + transform: rotateY(0deg); + transform-style: preserve-3d; user-select: none; } -.badge-display .side-cover { - transform: rotateY(180deg); - transition: .21s ease-out; +.badge-display img.side-cover { + transform: rotateY(0deg) translateZ(-1px); } .badge-reverse { transform: rotateY(180deg); } -.badge-reverse .side-cover { - z-index: 7; +.animate-slide { + animation: slide 10s linear; +} + +@keyframes slide { + 0% { + transform: translateX(0%); + } + 100% { + transform: translateX(-300%); + } } \ No newline at end of file diff --git a/client/src/components/game/RunnerGame.tsx b/client/src/components/game/RunnerGame.tsx new file mode 100644 index 0000000..465f8d2 --- /dev/null +++ b/client/src/components/game/RunnerGame.tsx @@ -0,0 +1,147 @@ +import { motion } from "framer-motion"; +import { useState, useEffect } from "react"; +import { APIHandler } from "../../utils/api/api-handler"; +import { useAuth } from "../../hooks/useAuth"; + +interface Click { + x: number; + y: number; +} + +const RunnerGame = () => { + const { token } = useAuth(); + const [clicks, setClicks] = useState([]); + const [isStarting, setIsStarting] = useState(false); + const [gameOver, setGameOver] = useState(false); + const [score, setScore] = useState(0); + const maxClicks = 6; + + const handleClick = (e: React.MouseEvent) => { + setIsStarting(true); + const newClick = { x: e.clientX, y: e.clientY }; + + const newClicks = [...clicks, newClick]; + + if (newClicks.length > maxClicks) { + newClicks.splice(0, newClicks.length - maxClicks); + } + + setClicks(newClicks); + + if (!gameOver) { + setScore((prevScore) => prevScore + 1); + } + + setTimeout(() => { + setClicks((prevClicks) => prevClicks.slice(1)); + }, 3000); + }; + + useEffect(() => { + setTimeout(() => { + setGameOver(true); + APIHandler("/my/flami/training", false, "PATCH", { + worked_stat: "speed" + }, token) + }, 9000); + }, []); + + return ( +
+ {isStarting ? ( +
Start
+ ) : ( +
Pas start
+ )} + {clicks.map((click, index) => ( + + ))} +
+
+ + + + + + +
+ {isStarting && !gameOver ? ( + <> + + + ) : ( + <> + + + )} +
+ {gameOver && ( +
+ Bravo tu as été rapide ! Score : {score} +
+ )} +
+ ); +}; + +export default RunnerGame; diff --git a/client/src/components/map/FlamiLocation.tsx b/client/src/components/map/FlamiLocation.tsx index 0b6a16c..9bf47b4 100644 --- a/client/src/components/map/FlamiLocation.tsx +++ b/client/src/components/map/FlamiLocation.tsx @@ -1,18 +1,22 @@ -const FlamiLocation = () => { +const FlamiLocation = ({ location }: { location: { + ville: string; + dept: string; + region: string; +} | undefined}) => { return ( <>

Position actuelle

-

Lyon

+

{location?.ville}

Département

-

Rhônes-Alpes

+

{location?.dept}

-

Ancienne Position

-

Lyon

+

Région

+

{location?.region}

diff --git a/client/src/components/profile/BadgeDisplay.tsx b/client/src/components/profile/BadgeDisplay.tsx index 93a8aff..33b691d 100644 --- a/client/src/components/profile/BadgeDisplay.tsx +++ b/client/src/components/profile/BadgeDisplay.tsx @@ -2,13 +2,26 @@ import { Badge } from "../../interfaces/badge.interface"; import { useState } from "react"; const BadgeDisplay = ({ badge }: { badge: Badge }) => { - const [side, setSide] = useState(false); - return ( -
setSide(!side)}> - {`Badge - {`Badge + const [side, setSide] = useState(false); + return ( +
setSide(!side)} + > + {`Badge + {`Badge
- ); + ); }; -export default BadgeDisplay; \ No newline at end of file +export default BadgeDisplay; diff --git a/client/src/components/topbar/TopBar.tsx b/client/src/components/topbar/TopBar.tsx index e8e6fc3..27fbd4a 100644 --- a/client/src/components/topbar/TopBar.tsx +++ b/client/src/components/topbar/TopBar.tsx @@ -37,4 +37,4 @@ const TopBar = ({ ); }; -export default TopBar; +export default TopBar; \ No newline at end of file diff --git a/client/src/interfaces/badge.interface.ts b/client/src/interfaces/badge.interface.ts index b6cf489..e8fc0f4 100644 --- a/client/src/interfaces/badge.interface.ts +++ b/client/src/interfaces/badge.interface.ts @@ -1,8 +1,8 @@ export interface Badge { - name: string; - url: string; - url_cover: string; - description: string; - region: string; - } - \ No newline at end of file + name: string; + url: string; + url_cover: string; + description: string; + region: string; + owned?: boolean; +} \ No newline at end of file diff --git a/client/src/interfaces/cosmetic.interface.ts b/client/src/interfaces/cosmetic.interface.ts new file mode 100644 index 0000000..af5c1b2 --- /dev/null +++ b/client/src/interfaces/cosmetic.interface.ts @@ -0,0 +1,6 @@ +export interface Cosmetic { + name: string, + description: string; + url: string; + place: number; +} \ No newline at end of file diff --git a/client/src/interfaces/flami.interface.ts b/client/src/interfaces/flami.interface.ts new file mode 100644 index 0000000..3ceb7ac --- /dev/null +++ b/client/src/interfaces/flami.interface.ts @@ -0,0 +1,21 @@ +import { Cosmetic } from "./cosmetic.interface" + +export interface Flami { + name: string, + owner: string, + cosmetics: Cosmetic[], + stamina: number, + stats: { + strength: number, + speed: number, + dexterity: number + }, + location: { + lat: number, + long: number + }, + last_action: Date, + last_share: string, + shared_flami: Flami | null, + _id: string +} \ No newline at end of file diff --git a/client/src/pages/activities/TrainingPage.tsx b/client/src/pages/activities/TrainingPage.tsx new file mode 100644 index 0000000..e355753 --- /dev/null +++ b/client/src/pages/activities/TrainingPage.tsx @@ -0,0 +1,11 @@ +import RunnerGame from "../../components/game/RunnerGame"; + +const TrainingPage = () => { + return ( + <> + + + ); +}; + +export default TrainingPage; diff --git a/client/src/pages/auth/WelcomePage.tsx b/client/src/pages/auth/WelcomePage.tsx index 823da57..db0b2d4 100644 --- a/client/src/pages/auth/WelcomePage.tsx +++ b/client/src/pages/auth/WelcomePage.tsx @@ -1,7 +1,17 @@ import { Link } from "react-router-dom"; import { Button, LinkComponent } from "../../components/ui"; +import { usePwa } from "@dotmind/react-use-pwa"; +import { useCallback } from "react"; const WelcomePage = () => { + const { installPrompt, isInstalled, canInstall } = usePwa(); + + const handleInstallPrompt = useCallback(() => { + if (canInstall) { + installPrompt(); + } + }, [canInstall, installPrompt]); + return (
@@ -16,7 +26,14 @@ const WelcomePage = () => { Créer son compte - + {canInstall || !isInstalled ? ( + + ) : ( + "" + )} +

Tu as deja un compte ?{" "} { - return

FlamiPage
; -}; + const { token } = useAuth(); + const [flami, setFlami] = useState(); + const navigate = useNavigate(); + + const getFlami = useCallback(() => { + APIHandler("/my/flami", false, "GET", undefined, token).then( + (res) => { + setFlami(res.data); + } + ); + }, [token]); + + useEffect(() => { + getFlami(); + }, [getFlami]); + + console.log(flami?.last_share, new Date().toDateString()); + + return ( +
+ +
+
+
+ Flami + { + flami?.cosmetics.map((cosmetic: Cosmetic) => ({cosmetic.name})) + } +
+ { flami?.shared_flami ? + (
+ {`Flami de ${flami.shared_flami.owner}`} + {`Flami + { + flami.shared_flami.cosmetics.map((cosmetic: Cosmetic) => ({cosmetic.name})) + } +
) + : null } +
+ +
+
+
+

Mes activités

+
+ + + +
+
+
+

Statistiques de Flami

+
+
+ Force +
+ +
+
+
+
+
+ Vitesse +
+ +
+
+
+
+
+ Dexterité +
+ +
+
+
+
+
+
+
+
+ ); +} -export default FlamiPage; +export default FlamiPage; \ No newline at end of file diff --git a/client/src/pages/flami/ScanPage.tsx b/client/src/pages/flami/ScanPage.tsx new file mode 100644 index 0000000..5b6e130 --- /dev/null +++ b/client/src/pages/flami/ScanPage.tsx @@ -0,0 +1,70 @@ +import TopBar from "../../components/topbar/TopBar"; +import { useAuth } from "../../hooks/useAuth"; +import QrReader from "react-qr-reader-es6"; +import { APIHandler } from "../../utils/api/api-handler"; +import { Flami } from "../../interfaces/flami.interface"; +import { useNavigate } from "react-router"; +import toast from "react-hot-toast"; +import { useCallback } from "react"; +import { useGeolocated } from "react-geolocated"; + +const ScanPage = () => { + const { token } = useAuth(); + + const navigate = useNavigate(); + + const { coords } = + useGeolocated({ + positionOptions: { + enableHighAccuracy: false, + }, + userDecisionTimeout: 5000, + }); + + let shareFlami = useCallback((data: string) => { + const { id, location } = JSON.parse(data); + APIHandler("/my/flami/share", false, "POST", { + flami_id: id, + location_shared: location, + location: { + lat: coords?.latitude || null, + long: coords?.longitude || null + } + }, token).then( + (res) => { + console.log(res); + navigate("/"); + toast.success(`${res.data.name} reçu !`, { + style: { + background: "#3D3D3D", + color: "#FAFAFA", + borderRadius: "12px", + }, + }); + } + ).catch(() => { + navigate("/share/scan"); + }); + }, [token]); + + return ( +
+ + { + if (!!result && token) { + shareFlami(result); + shareFlami = () => null; + } + }} + onError={(error) => console.error(error)} + /> + Centrez le QR code de votre ami dans le carré et attendez qu'il soit détecté. +
+ ); +}; + +export default ScanPage; diff --git a/client/src/pages/flami/SharePage.tsx b/client/src/pages/flami/SharePage.tsx new file mode 100644 index 0000000..2280449 --- /dev/null +++ b/client/src/pages/flami/SharePage.tsx @@ -0,0 +1,84 @@ +import { useCallback, useEffect, useState } from "react"; +import TopBar from "../../components/topbar/TopBar"; +import { APIHandler } from "../../utils/api/api-handler"; +import { useAuth } from "../../hooks/useAuth"; +import QRCode from "react-qr-code"; +import { Flami } from "../../interfaces/flami.interface"; +import { useNavigate } from "react-router"; +import { Button } from "../../components/ui"; +import { useGeolocated } from "react-geolocated"; + +const SharePage = () => { + const { token } = useAuth(); + const [flami, setFlami] = useState(); + const navigate = useNavigate(); + + const getFlami = useCallback(() => { + APIHandler("/my/flami", false, "GET", undefined, token).then( + (res) => { + setFlami(res.data); + } + ); + }, [token]); + + useEffect(() => { + getFlami(); + }, [getFlami]); + + const { coords } = + useGeolocated({ + positionOptions: { + enableHighAccuracy: false, + }, + userDecisionTimeout: 5000, + }); + + return ( +
+ +
+ +
+
+ { + flami?.shared_flami ? ( + <> + Relaie le Flami de + {flami?.owner} + + ) : ( +
+ Partage ton Flami +
+ ) + } + En fesant scanner ce QR code à un ami. +
+
+ +
+
+
+ +
+
+
+ ); +}; + +export default SharePage; diff --git a/client/src/pages/map/MapPage.tsx b/client/src/pages/map/MapPage.tsx index 21dd4a6..695fcd0 100644 --- a/client/src/pages/map/MapPage.tsx +++ b/client/src/pages/map/MapPage.tsx @@ -1,16 +1,21 @@ -import { useEffect, useState } from "react"; +import { useCallback, useEffect, useState } from "react"; import "leaflet/dist/leaflet.css"; import { APIHandler } from "../../utils/api/api-handler"; import { Step } from "../../interfaces/step.interface"; import Map from "../../components/map/Map"; import FlameLocation from "../../components/map/FlameLocation"; import FlamiLocation from "../../components/map/FlamiLocation"; +import { useAuth } from "../../hooks/useAuth"; +import { Flami } from "../../interfaces/flami.interface"; const MapPage = () => { const [steps, setSteps] = useState([]); const [currentFlameLocation, setCurrentFlameLocation] = useState(); const [nextFlameLocation, setNextFlameLocation] = useState(); const polylinePath: [number, number][] = []; + const { token } = useAuth(); + + const [flamiLocation, setFlamiLocation] = useState(); const handleSteps = () => { APIHandler("/etapes", true) @@ -33,30 +38,62 @@ const MapPage = () => { setCurrentFlameLocation(res.data); handleNextStep(res.data.etape_numero); }); - } + }; + + const getFlamiLocation = useCallback(() => { + APIHandler("/my/flami", false, "GET", undefined, token).then( + async (res) => { + if(!res.data || !res.data.location || res.data.location.lat === undefined || res.data.location.long === undefined) return setFlamiLocation(null); + await fetch(`https://api-adresse.data.gouv.fr/reverse/?lat=${res.data.location.lat}&lon=${res.data.location.long}`).then(res => res.json().then( + (data) => { + console.log(data); + if(data.features?.length > 0) { + let context = data.features[0]["properties"]["context"].split(", "); + console.log(context); + setFlamiLocation({ + ville: data.features[0]["properties"]["city"], + dept: `${context[1]} (${context[0]})`, + region: context[2] + }); + } else { + setFlamiLocation(null); + } + } + )).catch(() => setFlamiLocation(null)); + } + ); + }, [token]); + + console.log(flamiLocation); useEffect(() => { handleSteps(); handleCurrentStep(); + getFlamiLocation(); }, []); - if(currentFlameLocation) { + if (currentFlameLocation) { steps.forEach((step) => { - if(currentFlameLocation && step.etape_numero > currentFlameLocation.etape_numero) return; + if ( + currentFlameLocation && + step.etape_numero > currentFlameLocation.etape_numero + ) + return; polylinePath.push([ step.geolocalisation.latitude, step.geolocalisation.longitude, ]); }); } - - console.log(currentFlameLocation); - return (

Parcours de la flamme

- +

Où est la flamme

@@ -67,7 +104,9 @@ const MapPage = () => {

Où est mon Flami

- + { + flamiLocation !== null ? () : (

Aucune position trouvé.

) + }
diff --git a/client/src/pages/profile/AllBadgesPage.tsx b/client/src/pages/profile/AllBadgesPage.tsx new file mode 100644 index 0000000..ade5155 --- /dev/null +++ b/client/src/pages/profile/AllBadgesPage.tsx @@ -0,0 +1,71 @@ +import { useCallback, useState, useEffect } from "react"; +import TopBar from "../../components/topbar/TopBar"; +import { APIHandler } from "../../utils/api/api-handler"; +import { useAuth } from "../../hooks/useAuth"; +import { Badge } from "../../interfaces/badge.interface"; +import { CloseIcon } from "react-line-awesome"; +import BadgeDisplay from "../../components/profile/BadgeDisplay"; + +const AllBadgesPage = () => { + const { token } = useAuth(); + const [badges, setBadges] = useState(); + const [infoBadge, setInfoBadge] = useState(); + + const selectBadge = (badge: Badge | null) => { + infoBadge ? setInfoBadge(null) : setInfoBadge(badge); + }; + + const getBadges = useCallback(() => { + APIHandler("/my/badges", false, "GET", undefined, token).then( + (res) => { + setBadges(res.data); + } + ); + }, [token]); + + useEffect(() => { + getBadges(); + }, [getBadges]); + + return ( +
+ + {infoBadge ? ( +
+ selectBadge(null)} + className="text-3xl text-alabaster-50 cursor-pointer px-2 py-1 hover:bg-alabaster-300/20 rounded-xl ease-out duration-100 place-self-end" + /> + +

{infoBadge.name}

+

{infoBadge.description}

+
+ ) : ( +
+

Badges villes étapes

+
+ {badges && + badges.map((badge: Badge) => + badge.owned ? ( + selectBadge(badge)} + className="w-full cursor-pointer" + src={badge.url} + alt={`Badge de ${badge.name}`} + /> + ) : ( + {`Badge + ) + )} +
+
+ )} +
+ ); +}; + +export default AllBadgesPage; diff --git a/client/src/pages/profile/ProfilePage.tsx b/client/src/pages/profile/ProfilePage.tsx index f453bf5..0a9998c 100644 --- a/client/src/pages/profile/ProfilePage.tsx +++ b/client/src/pages/profile/ProfilePage.tsx @@ -6,6 +6,7 @@ import { APIHandler } from "../../utils/api/api-handler"; import { User } from "../../interfaces/user.interface"; import { getReadableDate } from "../../utils/getReadableDate"; import BadgeDisplay from "../../components/profile/BadgeDisplay"; +import { Badge } from "../../interfaces/badge.interface"; const ProfilePage = () => { const { signout, token } = useAuth(); @@ -22,7 +23,6 @@ const ProfilePage = () => { useEffect(() => { getUser(); }, [getUser]); - console.log(user?.badges); return (
@@ -46,13 +46,18 @@ const ProfilePage = () => {

Mes badges

-
+
{user && user.badges?.length !== 0 ? ( - user.badges?.map((badge) => ( - + user.badges?.map((badge: Badge) => ( + // + {`Badge )) ) : ( -

Tu n'as pas de badges !

+

Tu n'as pas de badges !

)}
{ + it("should pass", () => { + expect(true).toBeTruthy(); + }); +}); diff --git a/server/controllers/auth.controller.js b/server/controllers/auth.controller.js index 6d0e37f..8fb2315 100644 --- a/server/controllers/auth.controller.js +++ b/server/controllers/auth.controller.js @@ -120,8 +120,8 @@ const authController = { } } catch (error) { return res - .status(404) - .json({ message: "Une erreur s'est produite.", error: 404 }); + .status(401) + .json({ message: "Une erreur s'est produite.", error: 401 }); } }, }; diff --git a/server/controllers/flami.controller.js b/server/controllers/flami.controller.js index d9a4b38..a9f3557 100644 --- a/server/controllers/flami.controller.js +++ b/server/controllers/flami.controller.js @@ -1,18 +1,154 @@ +import { readFile } from "fs/promises"; +import flamiModel from "../models/flami.model.js"; +import userModel from "../models/user.model.js"; + const flamiController = { - getFlami: (req, res) => { + getFlami: async (req, res) => { + let userdata = res.locals.user; - }, - getCosmetics: (req, res) => { + let flami = await flamiModel.findById(userdata.flami_id); + + let shared_flami = await flamiModel.findById(userdata.shared_flami.id); + let sharer_user; + + if(shared_flami) { + sharer_user = await userModel.findById(shared_flami.owner_id); + } + + let content = await readFile("./data/cosmetics.json", { encoding: "utf8" }); + let json = JSON.parse(content); + return res.status(200).json({ + data: { + name: flami.name, + owner: userdata.name, + cosmetics: flami.cosmetics.map((id) => json[id] || json[0]), + stamina: flami.stamina, + stats: flami.stats, + location: flami.location, + last_action: flami.last_action_time, + last_share: userdata.shared_flami?.shared_date || null, + _id: flami._id, + shared_flami: shared_flami ? { + name: shared_flami.name, + owner: sharer_user.name, + cosmetics: shared_flami.cosmetics.map((id) => json[id] || json[0]), + location: shared_flami.location, + stamina: shared_flami.stamina, + stats: shared_flami.stats, + last_action: shared_flami.last_action_time, + _id: shared_flami._id + } : null + } + }); }, - share: (req, res) => { + share: async (req, res) => { + let userdata = res.locals.user; + const { flami_id, location, location_shared } = req.body; + + let user_flami = await flamiModel.findById(userdata.shared_flami?.id || userdata.flami_id); + let shared_flami = await flamiModel.findById(flami_id); + let sharer_user; + + if(shared_flami) { + sharer_user = await userModel.findById(shared_flami.current_sharer_id || shared_flami.owner_id); + + if(!sharer_user) { + return res.status(404).json({ + message: `Cet utilisateur n'existe pas.`, + error: 404 + }); + } + + if(sharer_user._id == userdata._id) { + return res.status(409).json({ + message: `Ces utilisateurs sont identiques.`, + error: 409 + }); + } + if(user_flami._id == shared_flami._id) { + return res.status(409).json({ + message: `Ce sont les mêmes Flami..?`, + error: 409 + }); + } + + if(user_flami.shared_date == new Date().toDateString()) { + return res.status(409).json({ + message: `Votre Flami a déjà été échangé aujourd'hui.`, + error: 409 + }); + } + + if(shared_flami.shared_date == new Date().toDateString()) { + return res.status(409).json({ + message: `Le ${shared_flami.name} a déjà été échangé aujourd'hui.`, + error: 409 + }); + } + + await userModel.updateOne({ _id: userdata._id }, { + shared_flami: { + id: shared_flami._id, + shared_date: new Date().toDateString() + } + }); + + await userModel.updateOne({ _id: sharer_user._id }, { + shared_flami: { + id: user_flami._id, + shared_date: new Date().toDateString() + } + }); + + await flamiModel.updateOne({ _id: user_flami._id }, { + current_sharer_id: sharer_user._id, + location: { + lat: location_shared.lat, + long: location_shared.long + } + }); + + await flamiModel.updateOne({ _id: shared_flami._id }, { + current_sharer_id: userdata._id, + location: { + lat: location.lat, + long: location.long + } + }); + + return res.status(202).json({ + data: { + name: shared_flami.name, + owner: sharer_user.name, + location: shared_flami.location, + _id: shared_flami._id + } + }); + } else { + return res.status(404).json({ + message: `Ce Flami n'existe pas.`, + error: 404 + }); + } }, competition: (req, res) => { }, - training: (req, res) => { + training: async (req, res) => { + let userdata = res.locals.user; + const { worked_stat } = req.body; + + const f = await flamiModel.findOne({ _id: userdata.flami_id }); + f["stats"][worked_stat]++; + f.save(); + return res.status(202).json({ + data: { + message: `Flami a gagner en ${worked_stat} !` + } + }); } }; diff --git a/server/controllers/misc.controller.js b/server/controllers/misc.controller.js new file mode 100644 index 0000000..a4338b2 --- /dev/null +++ b/server/controllers/misc.controller.js @@ -0,0 +1,4 @@ +import { readFile } from "fs/promises"; + +const miscController = { +} \ No newline at end of file diff --git a/server/controllers/user.controller.js b/server/controllers/user.controller.js index 49ed527..53c850b 100644 --- a/server/controllers/user.controller.js +++ b/server/controllers/user.controller.js @@ -14,7 +14,7 @@ const userController = { email: userdata.email, badges: userdata.badges .slice(Math.max(0, userdata.badges.length - 3)) - .map((id) => json[id] ?? json[0]), + .map((id) => json[id] || json[0]), created_at: new Date(userdata.date).toDateString(), }, }); @@ -24,9 +24,10 @@ const userController = { let content = await readFile("./data/badges.json", { encoding: "utf8" }); let json = JSON.parse(content); return res.status(200).json({ - data: { - badges: userdata.badges.map((id) => json[id] ?? json[0]), - }, + data: json.map((item, id) => { + userdata.badges.includes(id) ? item.owned = true : item.owned = false + return item; + }) }); }, updateAccount: async (req, res) => { @@ -47,7 +48,7 @@ const userController = { await userModel.updateOne({ _id: userdata._id }, patch); - let token = auth.encode({ email: email ?? userdata.email }); + let token = auth.encode({ email: email || userdata.email }); return res.status(200).json({ data: { message: "Informations de compte misent à jour.", diff --git a/server/data/badges.json b/server/data/badges.json index 506500d..076f1cf 100644 --- a/server/data/badges.json +++ b/server/data/badges.json @@ -1,85 +1,85 @@ [ { - "name": "Marseille", - "url": "/assets/img/badges/PACA/medaille-40.svg", - "url_cover": "/assets/img/badges/PACA/medaille_Médaille PACA (36-41).svg", - "description": "START OF PARCOURS", + "name": "Départ de la flamme", + "url": "/assets/img/badges/depart_marseille.svg", + "url_cover": "/assets/img/badges/paca_cover.svg", + "description": "Prologue - Grande arrivée de la flamme à Marseille", "region": "PACA" }, { "name": "Marseille", - "url": "/assets/img/badges/PACA/medaille-40.svg", - "url_cover": "/assets/img/badges/PACA/medaille_Médaille PACA (36-41).svg", - "description": "", + "url": "/assets/img/badges/marseille_blason.svg", + "url_cover": "/assets/img/badges/paca_cover.svg", + "description": "Marseille est bien établie comme une ville capitale du transit méditerranéen de voyageurs et biens marchand. Cela est réellement ancré dans l'histoire de la ville avec son héritage maritime riche qui remonte même jusqu'à l'antiquité,à l'époque nommé Massalia. La ville a toujours été pleine de bien des richesses et cela est toujours visible aujourd'hui, notamment grâce au vieux quartier du panier, qui tient son nom d'une auberge qui arbore un panier comme enseigne, ce quartier existe depuis les premiers fondements de la ville et est aussi embelli qu'il sert de véritable capsule temporelle vers un temps ancien.", "region": "PACA" }, { "name": "Toulon", - "url": "/assets/img/badges/PACA/medaille-39.svg", - "url_cover": "/assets/img/badges/PACA/medaille_Médaille PACA (36-41).svg", - "description": "", + "url": "/assets/img/badges/toulon_blason.svg", + "url_cover": "/assets/img/badges/paca_cover.svg", + "description": "La ville de Toulon cache au sein de ses coutumes culinaires un hommage insolite et secret bien caché. Une des spécialités originaires de la ville est un gâteau nommé le Chanteclair. Cette pâtisserie à base de meringue, d'un mélange de crème chantilly et crème pâtissière glacée, parfumée de praline et de moka, et décoré d'un coq, tient son nom d'une pièce de théâtre créé en 1910 nommée Chantecler. Cette pièce d'Edmond Rostand, auteur de Cyrano de Bergerac, est retenue de par son envergure pour l'époque et les moyens mis en oeuvre pour la réalisé, comportant plus de 70 personnages et 195 costumes complets d'animaux, principalement des volailles. La pièce évoque l'histoire d'un coq de basse-cour et sa vanité, par la suite perdue mais retrouvée par le biais de sacrifices douloureux, histoire qui écho encore aujourd'hui grâce à cette pâtisserie Toulonnaise.", "region": "PACA" }, { "name": "Manosque", - "url": "/assets/img/badges/PACA/medaille-41.svg", - "url_cover": "/assets/img/badges/PACA/medaille_Médaille PACA (36-41).svg", - "description": "", + "url": "/assets/img/badges/manosque_blason.svg", + "url_cover": "/assets/img/badges/paca_cover.svg", + "description": "La ville de Manosque accueille chaque année, depuis 1999, le Festival des correspondances. C'est un festival de littérature qui célèbre les grands auteurs et promeut les nouveaux écrivains, organise des lectures et lectures croisées publiques et cherche à mettre la littérature en relation avec d'autres formes artistiques pour de nouvelles créations originales. C'est un évènement qui attire plus de 16 000 personnes chaque année et qui se déroule pendant plusieurs jours.", "region": "PACA" }, { "name": "Arles", - "url": "/assets/img/badges/PACA/medaille-38.svg", - "url_cover": "/assets/img/badges/PACA/medaille_Médaille PACA (36-41).svg", - "description": "", + "url": "/assets/img/badges/arles_blason.svg", + "url_cover": "/assets/img/badges/paca_cover.svg", + "description": "Au coeur de la ville d'Arles se trouve un amphithéâtre romain, l'un des mieux conservé au monde, et cela est dû au fait qu'il est toujours un lieu très attractif de par son activité. ici, le taureau Camargue est à l'honneur, et de véritable corrida française s'organise régulièrement, où les jeunes gens de la région affrontent les taureaux pour décrocher les cocardes des cornes de la bête. Les taureaux aussi sont récompensés, et les meilleurs sont immortalisés par le biais de titres et de statues commémoratives.", "region": "PACA" }, { "name": "Montpellier", - "url": "/assets/img/badges/Occitanie/medaille-29.svg", - "url_cover": "/assets/img/badges/Occitanie/medaille_Médaille Occitanie (24-29).svg", + "url": "/assets/img/badges/montpellier_blason.svg", + "url_cover": "/assets/img/badges/occitanie_cover.svg", "description": "", "region": "Occitanie" }, { "name": "Bastia", - "url": "/assets/img/badges/", - "url_cover": "/assets/img/badges/", + "url": "/assets/img/badges/placeholder.svg", + "url_cover": "/assets/img/badges/placeholder.svg", "description": "", "region": "Corse" }, { "name": "Perpignan", - "url": "/assets/img/badges/Occitanie/medaille-25.svg", - "url_cover": "/assets/img/badges/Occitanie/medaille_Médaille Occitanie (24-29).svg", + "url": "/assets/img/badges/perpignan_blason.svg", + "url_cover": "/assets/img/badges/occitanie_cover.svg", "description": "", "region": "Occitanie" }, { - "name": "Carcassone", - "url": "/assets/img/badges/Occitanie/medaille-24.svg", - "url_cover": "/assets/img/badges/Occitanie/medaille_Médaille Occitanie (24-29).svg", + "name": "Carcassonne", + "url": "/assets/img/badges/carcassonne_blason.svg", + "url_cover": "/assets/img/badges/occitanie_cover.svg", "description": "", "region": "Occitanie" }, { "name": "Toulouse", - "url": "/assets/img/badges/Occitanie/medaille-26.svg", - "url_cover": "/assets/img/badges/Occitanie/medaille_Médaille Occitanie (24-29).svg", + "url": "/assets/img/badges/toulouse_blason.svg", + "url_cover": "/assets/img/badges/occitanie_cover.svg", "description": "", "region": "Occitanie" }, { "name": "Auch", - "url": "/assets/img/badges/Occitanie/medaille-27.svg", - "url_cover": "/assets/img/badges/Occitanie/medaille_Médaille Occitanie (24-29).svg", + "url": "/assets/img/badges/auch_blason.svg", + "url_cover": "/assets/img/badges/occitanie_cover.svg", "description": "", "region": "Occitanie" }, { "name": "Tarbes", - "url": "/assets/img/badges/Occitanie/medaille-28.svg", - "url_cover": "/assets/img/badges/Occitanie/medaille_Médaille Occitanie (24-29).svg", + "url": "/assets/img/badges/tarbes_blason.svg", + "url_cover": "/assets/img/badges/occitanie_cover.svg", "description": "", "region": "Occitanie" } diff --git a/server/data/cosmetics.json b/server/data/cosmetics.json index b0a65f5..d76f469 100644 --- a/server/data/cosmetics.json +++ b/server/data/cosmetics.json @@ -2,37 +2,37 @@ { "name": "Gants de boxe", "description": "Des gants de boxe d'une grande qualité, donné aux utilisateurs aimant le sport de combat.", - "url": "", + "url": "/assets/img/cosmetics/boxes-gloves.png", "place": 2 }, { "name": "Turbo-Chaussures", "description": "Des baskets qui courts vite, donné aux utilisateurs aimant le sport de course.", - "url": "", + "url": "/assets/img/cosmetics/turbo-chaussures.png", "place": 4 }, { "name": "Bonnet de bain et lunettes de plongé", "description": "Quelle allure ! Donné aux utilisateurs aimant le sport aquatique.", - "url": "", + "url": "/assets/img/cosmetics/bonnetbain.png", "place": 1 }, { "name": "Ballon de basket-ball", "description": "Un ballon de basket-ball bien gonflé, donné aux utilisateurs aimant le sport collectif.", - "url": "", + "url": "/assets/img/cosmetics/basket-ball.png", "place": 3 }, { "name": "Ballon de volley-ball", "description": "Un ballon de volley-ball bien gonflé, donné aux utilisateurs aimant le sport de plage.", - "url": "", + "url": "/assets/img/cosmetics/volley-ball.png", "place": 3 }, { "name": "Altère pesant son poids", "description": "Une altère d'au moins 200kg, donné aux utilisateurs aimant le sport de force.", - "url": "", + "url": "/assets/img/cosmetics/altere.png", "place": 3 } ] \ No newline at end of file diff --git a/server/helpers/authMiddleware.js b/server/helpers/authMiddleware.js index 5ded9a7..32f7e79 100644 --- a/server/helpers/authMiddleware.js +++ b/server/helpers/authMiddleware.js @@ -3,7 +3,7 @@ import userModel from "../models/user.model.js"; const auth = { encode: (data) => { - return jwt.sign(data, process.env.PRIVATE, { expiresIn: 60 * 15 }); + return jwt.sign(data, process.env.PRIVATE, { expiresIn: "15m" }); }, require: async (req, res, next) => { try { @@ -40,8 +40,8 @@ const auth = { return next(); } catch (error) { return res - .status(error.code ?? 401) - .json({ message: "Une erreur s'est produite.", error: error.code ?? 401 }); + .status(401) + .json({ message: "Une erreur s'est produite.", error: 401 }); } }, }; diff --git a/server/mail/IdleAnim.gif b/server/mail/IdleAnim.gif new file mode 100644 index 0000000..2bd2177 Binary files /dev/null and b/server/mail/IdleAnim.gif differ diff --git a/server/mail/mailSender.js b/server/mail/mailSender.js index e73cc72..c57b027 100644 --- a/server/mail/mailSender.js +++ b/server/mail/mailSender.js @@ -19,7 +19,7 @@ export const mailSender = async (email, subject, message) => { html: message, attachments: [{ filename: "flami-logo.png", - path: './mail/flami-logo.png', + path: './mail/IdleAnim.gif', // './mail/flami-logo.png' cid: 'logo-flami@cid' }] }); diff --git a/server/models/flami.model.js b/server/models/flami.model.js index f674522..3022cfc 100644 --- a/server/models/flami.model.js +++ b/server/models/flami.model.js @@ -4,10 +4,10 @@ const flamiShema = new mongoose.Schema({ name: { type: String }, - owner: { + owner_id: { type: mongoose.Types.ObjectId }, - current_friend: { + current_sharer_id: { type: mongoose.Types.ObjectId, }, date: { @@ -25,15 +25,15 @@ const flamiShema = new mongoose.Schema({ stats: { strength: { type: Number, - default: 0 + default: 1 }, speed: { type: Number, - default: 0 + default: 1 }, dexterity: { type: Number, - default: 0 + default: 1 } }, stamina: { diff --git a/server/models/user.model.js b/server/models/user.model.js index 2962b97..961fd7c 100644 --- a/server/models/user.model.js +++ b/server/models/user.model.js @@ -29,11 +29,20 @@ const userSchema = new mongoose.Schema({ required: true, min: 13 }, + owned_cosmetics: { + type: Array, + default: [] + }, flami_id: { type: mongoose.Types.ObjectId }, - friend_flami_id: { - type: mongoose.Types.ObjectId + shared_flami: { + id: { + type: mongoose.Types.ObjectId + }, + shared_date: { + type: String + } }, badges: { type: Array, @@ -64,12 +73,14 @@ const userSchema = new mongoose.Schema({ userSchema.post('validate', async function () { if(await this.constructor.findByEmail(this.email)) return; let sports = { "Sport de combat": 0, "Sport de course": 1, "Sport aquatique": 2, "Sport collectif": 3, "Sport de plage": 4, "Sport de force": 5 } + let givenCosmetics = sports[this.metadata.favorite_sport] !== undefined ? [sports[this.metadata.favorite_sport]] : []; let flami = await flamiModel.create({ name: `Flami de ${this.name}`, - owner: this._id, - cosmetics: sports[this.metadata.favorite_sport] ? [sports[this.metadata.favorite_sport]] : [] + owner_id: this._id, + cosmetics: givenCosmetics }); this.flami_id = flami._id; + this.owned_cosmetics = givenCosmetics; }); export default mongoose.model("User", userSchema); \ No newline at end of file diff --git a/server/routes/flami.routes.js b/server/routes/flami.routes.js index b978c82..ee517cd 100644 --- a/server/routes/flami.routes.js +++ b/server/routes/flami.routes.js @@ -8,6 +8,5 @@ router.patch("/competition", flamiController.competition); router.patch("/training", flamiController.training); router.post("/share", flamiController.share); -router.get("/cosmetics", flamiController.getCosmetics); export default router; \ No newline at end of file diff --git a/server/routes/misc.routes.js b/server/routes/misc.routes.js index fdc48c7..fb1a751 100644 --- a/server/routes/misc.routes.js +++ b/server/routes/misc.routes.js @@ -1,8 +1,7 @@ import Router from "express"; -import userController from "../controllers/user.controller.js"; const router = Router(); -router.get("/map", userController.getProfile); +// router.get("/badges", miscController.getAllBadges); export default router; \ No newline at end of file diff --git a/server/routes/users.routes.js b/server/routes/users.routes.js index fa0dd83..baa5c15 100644 --- a/server/routes/users.routes.js +++ b/server/routes/users.routes.js @@ -4,8 +4,8 @@ import flamiController from "../controllers/flami.controller.js"; const router = Router(); -router.get("/flami", flamiController.getFlami); -router.get("/badges", userController.getBadges); -router.get("/profile", userController.getProfile); +// router.get("/flami", flamiController.getFlami); +// router.get("/badges", userController.getBadges); +// router.get("/profile", userController.getProfile); export default router;