Updates!
This commit is contained in:
parent
231adbe93f
commit
d622cb0589
19 changed files with 1819 additions and 107 deletions
5
frontend/.vscode/settings.json
vendored
Normal file
5
frontend/.vscode/settings.json
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"[javascriptreact]": {
|
||||
"editor.tabSize": 2
|
||||
}
|
||||
}
|
||||
674
frontend/package-lock.json
generated
674
frontend/package-lock.json
generated
|
|
@ -1147,6 +1147,35 @@
|
|||
"resolved": "https://registry.npmjs.org/@csstools/normalize.css/-/normalize.css-10.1.0.tgz",
|
||||
"integrity": "sha512-ij4wRiunFfaJxjB0BdrYHIH8FxBJpOwNPhhAcunlmPdXudL1WQV1qoP9un6JsEBAgQH+7UXyyjh0g7jTxXK6tg=="
|
||||
},
|
||||
"@fortawesome/fontawesome-common-types": {
|
||||
"version": "0.2.32",
|
||||
"resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-0.2.32.tgz",
|
||||
"integrity": "sha512-ux2EDjKMpcdHBVLi/eWZynnPxs0BtFVXJkgHIxXRl+9ZFaHPvYamAfCzeeQFqHRjuJtX90wVnMRaMQAAlctz3w=="
|
||||
},
|
||||
"@fortawesome/fontawesome-svg-core": {
|
||||
"version": "1.2.32",
|
||||
"resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-1.2.32.tgz",
|
||||
"integrity": "sha512-XjqyeLCsR/c/usUpdWcOdVtWFVjPbDFBTQkn2fQRrWhhUoxriQohO2RWDxLyUM8XpD+Zzg5xwJ8gqTYGDLeGaQ==",
|
||||
"requires": {
|
||||
"@fortawesome/fontawesome-common-types": "^0.2.32"
|
||||
}
|
||||
},
|
||||
"@fortawesome/free-solid-svg-icons": {
|
||||
"version": "5.15.1",
|
||||
"resolved": "https://registry.npmjs.org/@fortawesome/free-solid-svg-icons/-/free-solid-svg-icons-5.15.1.tgz",
|
||||
"integrity": "sha512-EFMuKtzRMNbvjab/SvJBaOOpaqJfdSap/Nl6hst7CgrJxwfORR1drdTV6q1Ib/JVzq4xObdTDcT6sqTaXMqfdg==",
|
||||
"requires": {
|
||||
"@fortawesome/fontawesome-common-types": "^0.2.32"
|
||||
}
|
||||
},
|
||||
"@fortawesome/react-fontawesome": {
|
||||
"version": "0.1.11",
|
||||
"resolved": "https://registry.npmjs.org/@fortawesome/react-fontawesome/-/react-fontawesome-0.1.11.tgz",
|
||||
"integrity": "sha512-sClfojasRifQKI0OPqTy8Ln8iIhnxR/Pv/hukBhWnBz9kQRmqi6JSH3nghlhAY7SUeIIM7B5/D2G8WjX0iepVg==",
|
||||
"requires": {
|
||||
"prop-types": "^15.7.2"
|
||||
}
|
||||
},
|
||||
"@hapi/address": {
|
||||
"version": "2.1.4",
|
||||
"resolved": "https://registry.npmjs.org/@hapi/address/-/address-2.1.4.tgz",
|
||||
|
|
@ -1386,6 +1415,25 @@
|
|||
"resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz",
|
||||
"integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw=="
|
||||
},
|
||||
"@popperjs/core": {
|
||||
"version": "2.5.3",
|
||||
"resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.5.3.tgz",
|
||||
"integrity": "sha512-RFwCobxsvZ6j7twS7dHIZQZituMIDJJNHS/qY6iuthVebxS3zhRY+jaC2roEKiAYaVuTcGmX6Luc6YBcf6zJVg=="
|
||||
},
|
||||
"@restart/context": {
|
||||
"version": "2.1.4",
|
||||
"resolved": "https://registry.npmjs.org/@restart/context/-/context-2.1.4.tgz",
|
||||
"integrity": "sha512-INJYZQJP7g+IoDUh/475NlGiTeMfwTXUEr3tmRneckHIxNolGOW9CTq83S8cxq0CgJwwcMzMJFchxvlwe7Rk8Q=="
|
||||
},
|
||||
"@restart/hooks": {
|
||||
"version": "0.3.25",
|
||||
"resolved": "https://registry.npmjs.org/@restart/hooks/-/hooks-0.3.25.tgz",
|
||||
"integrity": "sha512-m2v3N5pxTsIiSH74/sb1yW8D9RxkJidGW+5Mfwn/lHb2QzhZNlaU1su7abSyT9EGf0xS/0waLjrf7/XxQHUk7w==",
|
||||
"requires": {
|
||||
"lodash": "^4.17.15",
|
||||
"lodash-es": "^4.17.15"
|
||||
}
|
||||
},
|
||||
"@sheerun/mutationobserver-shim": {
|
||||
"version": "0.3.3",
|
||||
"resolved": "https://registry.npmjs.org/@sheerun/mutationobserver-shim/-/mutationobserver-shim-0.3.3.tgz",
|
||||
|
|
@ -1666,6 +1714,11 @@
|
|||
"@babel/types": "^7.3.0"
|
||||
}
|
||||
},
|
||||
"@types/classnames": {
|
||||
"version": "2.2.10",
|
||||
"resolved": "https://registry.npmjs.org/@types/classnames/-/classnames-2.2.10.tgz",
|
||||
"integrity": "sha512-1UzDldn9GfYYEsWWnn/P4wkTlkZDH7lDb0wBMGbtIQc9zXEQq7FlKBdZUn6OBqD8sKZZ2RQO2mAjGpXiDGoRmQ=="
|
||||
},
|
||||
"@types/eslint-visitor-keys": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz",
|
||||
|
|
@ -1680,6 +1733,11 @@
|
|||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"@types/invariant": {
|
||||
"version": "2.2.34",
|
||||
"resolved": "https://registry.npmjs.org/@types/invariant/-/invariant-2.2.34.tgz",
|
||||
"integrity": "sha512-lYUtmJ9BqUN688fGY1U1HZoWT1/Jrmgigx2loq4ZcJpICECm/Om3V314BxdzypO0u5PORKGMM6x0OXaljV1YFg=="
|
||||
},
|
||||
"@types/istanbul-lib-coverage": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz",
|
||||
|
|
@ -1707,6 +1765,11 @@
|
|||
"resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.6.tgz",
|
||||
"integrity": "sha512-3c+yGKvVP5Y9TYBEibGNR+kLtijnj7mYrXRg+WpFb2X9xm04g/DXYkfg4hmzJQosc9snFNUPkbYIhu+KAm6jJw=="
|
||||
},
|
||||
"@types/json5": {
|
||||
"version": "0.0.29",
|
||||
"resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz",
|
||||
"integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4="
|
||||
},
|
||||
"@types/minimatch": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz",
|
||||
|
|
@ -1749,6 +1812,14 @@
|
|||
"@types/react": "*"
|
||||
}
|
||||
},
|
||||
"@types/react-transition-group": {
|
||||
"version": "4.4.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.0.tgz",
|
||||
"integrity": "sha512-/QfLHGpu+2fQOqQaXh8MG9q03bFENooTb/it4jr5kKaZlDQfWvjqWZg48AwzPVMBHlRuTRAY7hRHCEOXz5kV6w==",
|
||||
"requires": {
|
||||
"@types/react": "*"
|
||||
}
|
||||
},
|
||||
"@types/stack-utils": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-1.0.1.tgz",
|
||||
|
|
@ -1847,6 +1918,11 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"@types/warning": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/warning/-/warning-3.0.0.tgz",
|
||||
"integrity": "sha1-DSUBJorY+ZYrdA04fEZU9fjiPlI="
|
||||
},
|
||||
"@types/yargs": {
|
||||
"version": "13.0.11",
|
||||
"resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.11.tgz",
|
||||
|
|
@ -2270,12 +2346,12 @@
|
|||
}
|
||||
},
|
||||
"aria-query": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/aria-query/-/aria-query-3.0.0.tgz",
|
||||
"integrity": "sha1-ZbP8wcoRVajJrmTW7uKX8V1RM8w=",
|
||||
"version": "4.2.2",
|
||||
"resolved": "https://registry.npmjs.org/aria-query/-/aria-query-4.2.2.tgz",
|
||||
"integrity": "sha512-o/HelwhuKpTj/frsOsbNLNgnNGVIFsVP/SW2BSF14gVl7kAfMOJ6/8wUAUvG1R1NHKrfG+2sHZTu0yauT1qBrA==",
|
||||
"requires": {
|
||||
"ast-types-flow": "0.0.7",
|
||||
"commander": "^2.11.0"
|
||||
"@babel/runtime": "^7.10.2",
|
||||
"@babel/runtime-corejs3": "^7.10.2"
|
||||
}
|
||||
},
|
||||
"arity-n": {
|
||||
|
|
@ -2385,6 +2461,36 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"array.prototype.flatmap": {
|
||||
"version": "1.2.3",
|
||||
"resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.2.3.tgz",
|
||||
"integrity": "sha512-OOEk+lkePcg+ODXIpvuU9PAryCikCJyo7GlDG1upleEpQRx6mzL9puEBkozQ5iAx20KV0l3DbyQwqciJtqe5Pg==",
|
||||
"requires": {
|
||||
"define-properties": "^1.1.3",
|
||||
"es-abstract": "^1.17.0-next.1",
|
||||
"function-bind": "^1.1.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"es-abstract": {
|
||||
"version": "1.17.7",
|
||||
"resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.7.tgz",
|
||||
"integrity": "sha512-VBl/gnfcJ7OercKA9MVaegWsBHFjV492syMudcnQZvt/Dw8ezpcOHYZXa/J96O8vx+g4x65YKhxOwDUh63aS5g==",
|
||||
"requires": {
|
||||
"es-to-primitive": "^1.2.1",
|
||||
"function-bind": "^1.1.1",
|
||||
"has": "^1.0.3",
|
||||
"has-symbols": "^1.0.1",
|
||||
"is-callable": "^1.2.2",
|
||||
"is-regex": "^1.1.1",
|
||||
"object-inspect": "^1.8.0",
|
||||
"object-keys": "^1.1.1",
|
||||
"object.assign": "^4.1.1",
|
||||
"string.prototype.trimend": "^1.0.1",
|
||||
"string.prototype.trimstart": "^1.0.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"arrify": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz",
|
||||
|
|
@ -2501,6 +2607,19 @@
|
|||
"resolved": "https://registry.npmjs.org/aws4/-/aws4-1.10.1.tgz",
|
||||
"integrity": "sha512-zg7Hz2k5lI8kb7U32998pRRFin7zJlkfezGJjUc2heaD4Pw2wObakCDVzkKztTm/Ln7eiVvYsjqak0Ed4LkMDA=="
|
||||
},
|
||||
"axe-core": {
|
||||
"version": "3.5.5",
|
||||
"resolved": "https://registry.npmjs.org/axe-core/-/axe-core-3.5.5.tgz",
|
||||
"integrity": "sha512-5P0QZ6J5xGikH780pghEdbEKijCTrruK9KxtPZCFWUpef0f6GipO+xEZ5GKCb020mmqgbiNO6TcA55CriL784Q=="
|
||||
},
|
||||
"axios": {
|
||||
"version": "0.20.0",
|
||||
"resolved": "https://registry.npmjs.org/axios/-/axios-0.20.0.tgz",
|
||||
"integrity": "sha512-ANA4rr2BDcmmAQLOKft2fufrtuvlqR+cXNNinUmvfeSNCOF98PZL+7M/v1zIdGo7OLjEA9J2gXJL+j4zGsl0bA==",
|
||||
"requires": {
|
||||
"follow-redirects": "^1.10.0"
|
||||
}
|
||||
},
|
||||
"axobject-query": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-2.2.0.tgz",
|
||||
|
|
@ -3071,6 +3190,11 @@
|
|||
"resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz",
|
||||
"integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24="
|
||||
},
|
||||
"bootstrap": {
|
||||
"version": "4.5.3",
|
||||
"resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.5.3.tgz",
|
||||
"integrity": "sha512-o9ppKQioXGqhw8Z7mah6KdTYpNQY//tipnkxppWhPbiSWdD+1raYsnhwEZjkTHYbGee4cVQ0Rx65EhOY/HNLcQ=="
|
||||
},
|
||||
"brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
||||
|
|
@ -3515,6 +3639,11 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"classnames": {
|
||||
"version": "2.2.6",
|
||||
"resolved": "https://registry.npmjs.org/classnames/-/classnames-2.2.6.tgz",
|
||||
"integrity": "sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q=="
|
||||
},
|
||||
"clean-css": {
|
||||
"version": "4.2.3",
|
||||
"resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.3.tgz",
|
||||
|
|
@ -4550,6 +4679,15 @@
|
|||
"utila": "~0.4"
|
||||
}
|
||||
},
|
||||
"dom-helpers": {
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-5.2.0.tgz",
|
||||
"integrity": "sha512-Ru5o9+V8CpunKnz5LGgWXkmrH/20cGKwcHwS4m73zIvs54CN9epEmT/HLqFJW3kXpakAFkEdzgy1hzlJe3E4OQ==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.8.7",
|
||||
"csstype": "^3.0.2"
|
||||
}
|
||||
},
|
||||
"dom-serializer": {
|
||||
"version": "0.2.2",
|
||||
"resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz",
|
||||
|
|
@ -4969,6 +5107,26 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"eslint-config-airbnb": {
|
||||
"version": "18.2.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-config-airbnb/-/eslint-config-airbnb-18.2.0.tgz",
|
||||
"integrity": "sha512-Fz4JIUKkrhO0du2cg5opdyPKQXOI2MvF8KUvN2710nJMT6jaRUpRE2swrJftAjVGL7T1otLM5ieo5RqS1v9Udg==",
|
||||
"requires": {
|
||||
"eslint-config-airbnb-base": "^14.2.0",
|
||||
"object.assign": "^4.1.0",
|
||||
"object.entries": "^1.1.2"
|
||||
}
|
||||
},
|
||||
"eslint-config-airbnb-base": {
|
||||
"version": "14.2.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-14.2.0.tgz",
|
||||
"integrity": "sha512-Snswd5oC6nJaevs3nZoLSTvGJBvzTfnBqOIArkf3cbyTyq9UD79wOk8s+RiL6bhca0p/eRO6veczhf6A/7Jy8Q==",
|
||||
"requires": {
|
||||
"confusing-browser-globals": "^1.0.9",
|
||||
"object.assign": "^4.1.0",
|
||||
"object.entries": "^1.1.2"
|
||||
}
|
||||
},
|
||||
"eslint-config-react-app": {
|
||||
"version": "5.2.1",
|
||||
"resolved": "https://registry.npmjs.org/eslint-config-react-app/-/eslint-config-react-app-5.2.1.tgz",
|
||||
|
|
@ -5083,6 +5241,14 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"eslint-plugin-cypress": {
|
||||
"version": "2.11.2",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-cypress/-/eslint-plugin-cypress-2.11.2.tgz",
|
||||
"integrity": "sha512-1SergF1sGbVhsf7MYfOLiBhdOg6wqyeV9pXUAIDIffYTGMN3dTBQS9nFAzhLsHhO+Bn0GaVM1Ecm71XUidQ7VA==",
|
||||
"requires": {
|
||||
"globals": "^11.12.0"
|
||||
}
|
||||
},
|
||||
"eslint-plugin-flowtype": {
|
||||
"version": "4.6.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-flowtype/-/eslint-plugin-flowtype-4.6.0.tgz",
|
||||
|
|
@ -5092,22 +5258,23 @@
|
|||
}
|
||||
},
|
||||
"eslint-plugin-import": {
|
||||
"version": "2.20.1",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.20.1.tgz",
|
||||
"integrity": "sha512-qQHgFOTjguR+LnYRoToeZWT62XM55MBVXObHM6SKFd1VzDcX/vqT1kAz8ssqigh5eMj8qXcRoXXGZpPP6RfdCw==",
|
||||
"version": "2.22.1",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.22.1.tgz",
|
||||
"integrity": "sha512-8K7JjINHOpH64ozkAhpT3sd+FswIZTfMZTjdx052pnWrgRCVfp8op9tbjpAk3DdUeI/Ba4C8OjdC0r90erHEOw==",
|
||||
"requires": {
|
||||
"array-includes": "^3.0.3",
|
||||
"array.prototype.flat": "^1.2.1",
|
||||
"array-includes": "^3.1.1",
|
||||
"array.prototype.flat": "^1.2.3",
|
||||
"contains-path": "^0.1.0",
|
||||
"debug": "^2.6.9",
|
||||
"doctrine": "1.5.0",
|
||||
"eslint-import-resolver-node": "^0.3.2",
|
||||
"eslint-module-utils": "^2.4.1",
|
||||
"eslint-import-resolver-node": "^0.3.4",
|
||||
"eslint-module-utils": "^2.6.0",
|
||||
"has": "^1.0.3",
|
||||
"minimatch": "^3.0.4",
|
||||
"object.values": "^1.1.0",
|
||||
"object.values": "^1.1.1",
|
||||
"read-pkg-up": "^2.0.0",
|
||||
"resolve": "^1.12.0"
|
||||
"resolve": "^1.17.0",
|
||||
"tsconfig-paths": "^3.9.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"debug": {
|
||||
|
|
@ -5220,49 +5387,58 @@
|
|||
"find-up": "^2.0.0",
|
||||
"read-pkg": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"resolve": {
|
||||
"version": "1.17.0",
|
||||
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz",
|
||||
"integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==",
|
||||
"requires": {
|
||||
"path-parse": "^1.0.6"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"eslint-plugin-jsx-a11y": {
|
||||
"version": "6.2.3",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.2.3.tgz",
|
||||
"integrity": "sha512-CawzfGt9w83tyuVekn0GDPU9ytYtxyxyFZ3aSWROmnRRFQFT2BiPJd7jvRdzNDi6oLWaS2asMeYSNMjWTV4eNg==",
|
||||
"version": "6.3.1",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.3.1.tgz",
|
||||
"integrity": "sha512-i1S+P+c3HOlBJzMFORRbC58tHa65Kbo8b52/TwCwSKLohwvpfT5rm2GjGWzOHTEuq4xxf2aRlHHTtmExDQOP+g==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.4.5",
|
||||
"aria-query": "^3.0.0",
|
||||
"array-includes": "^3.0.3",
|
||||
"@babel/runtime": "^7.10.2",
|
||||
"aria-query": "^4.2.2",
|
||||
"array-includes": "^3.1.1",
|
||||
"ast-types-flow": "^0.0.7",
|
||||
"axobject-query": "^2.0.2",
|
||||
"damerau-levenshtein": "^1.0.4",
|
||||
"emoji-regex": "^7.0.2",
|
||||
"axe-core": "^3.5.4",
|
||||
"axobject-query": "^2.1.2",
|
||||
"damerau-levenshtein": "^1.0.6",
|
||||
"emoji-regex": "^9.0.0",
|
||||
"has": "^1.0.3",
|
||||
"jsx-ast-utils": "^2.2.1"
|
||||
"jsx-ast-utils": "^2.4.1",
|
||||
"language-tags": "^1.0.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"emoji-regex": {
|
||||
"version": "7.0.3",
|
||||
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
|
||||
"integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA=="
|
||||
"version": "9.1.1",
|
||||
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.1.1.tgz",
|
||||
"integrity": "sha512-AaWyDiNO9rbtMIcGl7tdxMcNu8SOLaDLxmQEFT5JhgKufOJzPPkYmgN2QwqTgw4doWMZZQttC6sUWVQjb+1VdA=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"eslint-plugin-react": {
|
||||
"version": "7.19.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.19.0.tgz",
|
||||
"integrity": "sha512-SPT8j72CGuAP+JFbT0sJHOB80TX/pu44gQ4vXH/cq+hQTiY2PuZ6IHkqXJV6x1b28GDdo1lbInjKUrrdUf0LOQ==",
|
||||
"version": "7.21.4",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.21.4.tgz",
|
||||
"integrity": "sha512-uHeQ8A0hg0ltNDXFu3qSfFqTNPXm1XithH6/SY318UX76CMj7Q599qWpgmMhVQyvhq36pm7qvoN3pb6/3jsTFg==",
|
||||
"requires": {
|
||||
"array-includes": "^3.1.1",
|
||||
"array.prototype.flatmap": "^1.2.3",
|
||||
"doctrine": "^2.1.0",
|
||||
"has": "^1.0.3",
|
||||
"jsx-ast-utils": "^2.2.3",
|
||||
"object.entries": "^1.1.1",
|
||||
"jsx-ast-utils": "^2.4.1 || ^3.0.0",
|
||||
"object.entries": "^1.1.2",
|
||||
"object.fromentries": "^2.0.2",
|
||||
"object.values": "^1.1.1",
|
||||
"prop-types": "^15.7.2",
|
||||
"resolve": "^1.15.1",
|
||||
"semver": "^6.3.0",
|
||||
"string.prototype.matchall": "^4.0.2",
|
||||
"xregexp": "^4.3.0"
|
||||
"resolve": "^1.17.0",
|
||||
"string.prototype.matchall": "^4.0.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"doctrine": {
|
||||
|
|
@ -5284,9 +5460,9 @@
|
|||
}
|
||||
},
|
||||
"eslint-plugin-react-hooks": {
|
||||
"version": "1.7.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-1.7.0.tgz",
|
||||
"integrity": "sha512-iXTCFcOmlWvw4+TOE8CLWj6yX1GwzT0Y6cUfHHZqWnSk144VmVIRcVGtUAzrLES7C798lmvnt02C7rxaOX1HNA=="
|
||||
"version": "4.1.2",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.1.2.tgz",
|
||||
"integrity": "sha512-ykUeqkGyUGgwTtk78C0o8UG2fzwmgJ0qxBGPp2WqRKsTwcLuVf01kTDRAtOsd4u6whX2XOC8749n2vPydP82fg=="
|
||||
},
|
||||
"eslint-scope": {
|
||||
"version": "5.1.1",
|
||||
|
|
@ -6326,6 +6502,19 @@
|
|||
"resolved": "https://registry.npmjs.org/hex-color-regex/-/hex-color-regex-1.1.0.tgz",
|
||||
"integrity": "sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ=="
|
||||
},
|
||||
"history": {
|
||||
"version": "4.10.1",
|
||||
"resolved": "https://registry.npmjs.org/history/-/history-4.10.1.tgz",
|
||||
"integrity": "sha512-36nwAD620w12kuzPAsyINPWJqlNbij+hpK1k9XRloDtym8mxzGYl2c17LnV6IAGB2Dmg4tEa7G7DlawS0+qjew==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.1.2",
|
||||
"loose-envify": "^1.2.0",
|
||||
"resolve-pathname": "^3.0.0",
|
||||
"tiny-invariant": "^1.0.2",
|
||||
"tiny-warning": "^1.0.0",
|
||||
"value-equal": "^1.0.1"
|
||||
}
|
||||
},
|
||||
"hmac-drbg": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz",
|
||||
|
|
@ -7796,6 +7985,11 @@
|
|||
"object.assign": "^4.1.0"
|
||||
}
|
||||
},
|
||||
"jwt-decode": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/jwt-decode/-/jwt-decode-3.0.0.tgz",
|
||||
"integrity": "sha512-RBQv2MTm3FNKQkdzhEyQwh5MbdNgMa+FyIJIK5RMWEn6hRgRHr7j55cRxGhRe6vGJDElyi6f6u/yfkP7AoXddA=="
|
||||
},
|
||||
"killable": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/killable/-/killable-1.0.1.tgz",
|
||||
|
|
@ -7814,6 +8008,19 @@
|
|||
"resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz",
|
||||
"integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w=="
|
||||
},
|
||||
"language-subtag-registry": {
|
||||
"version": "0.3.20",
|
||||
"resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.20.tgz",
|
||||
"integrity": "sha512-KPMwROklF4tEx283Xw0pNKtfTj1gZ4UByp4EsIFWLgBavJltF4TiYPc39k06zSTsLzxTVXXDSpbwaQXaFB4Qeg=="
|
||||
},
|
||||
"language-tags": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/language-tags/-/language-tags-1.0.5.tgz",
|
||||
"integrity": "sha1-0yHbxNowuovzAk4ED6XBRmH5GTo=",
|
||||
"requires": {
|
||||
"language-subtag-registry": "~0.3.2"
|
||||
}
|
||||
},
|
||||
"last-call-webpack-plugin": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/last-call-webpack-plugin/-/last-call-webpack-plugin-3.0.0.tgz",
|
||||
|
|
@ -7956,6 +8163,11 @@
|
|||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz",
|
||||
"integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA=="
|
||||
},
|
||||
"lodash-es": {
|
||||
"version": "4.17.15",
|
||||
"resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.15.tgz",
|
||||
"integrity": "sha512-rlrc3yU3+JNOpZ9zj5pQtxnx2THmvRykwL4Xlxoa8I9lHBlVbbyPhgyPMioxVZ4NqyxaVVtaJnzsyOidQIhyyQ=="
|
||||
},
|
||||
"lodash._reinterpolate": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz",
|
||||
|
|
@ -8235,6 +8447,15 @@
|
|||
"resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz",
|
||||
"integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg=="
|
||||
},
|
||||
"mini-create-react-context": {
|
||||
"version": "0.4.0",
|
||||
"resolved": "https://registry.npmjs.org/mini-create-react-context/-/mini-create-react-context-0.4.0.tgz",
|
||||
"integrity": "sha512-b0TytUgFSbgFJGzJqXPKCFCBWigAjpjo+Fl7Vf7ZbKRDptszpppKxXH6DRXEABZ/gcEQczeb0iZ7JvL8e8jjCA==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.5.5",
|
||||
"tiny-warning": "^1.0.3"
|
||||
}
|
||||
},
|
||||
"mini-css-extract-plugin": {
|
||||
"version": "0.9.0",
|
||||
"resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-0.9.0.tgz",
|
||||
|
|
@ -10288,6 +10509,15 @@
|
|||
"react-is": "^16.8.1"
|
||||
}
|
||||
},
|
||||
"prop-types-extra": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/prop-types-extra/-/prop-types-extra-1.1.1.tgz",
|
||||
"integrity": "sha512-59+AHNnHYCdiC+vMwY52WmvP5dM3QLeoumYuEyceQDi9aEhtwN9zIQ2ZNo25sMyXnbh32h+P1ezDsUpUH3JAew==",
|
||||
"requires": {
|
||||
"react-is": "^16.3.2",
|
||||
"warning": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"proxy-addr": {
|
||||
"version": "2.0.6",
|
||||
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.6.tgz",
|
||||
|
|
@ -10467,6 +10697,31 @@
|
|||
"whatwg-fetch": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"react-bootstrap": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/react-bootstrap/-/react-bootstrap-1.3.0.tgz",
|
||||
"integrity": "sha512-GYj0c6FO9mx7DaO8Xyz2zs0IcQ6CGCtM3O6/feIoCaG4N8B0+l4eqL7stlMcLpqO4d8NG2PoMO/AbUOD+MO7mg==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.4.2",
|
||||
"@restart/context": "^2.1.4",
|
||||
"@restart/hooks": "^0.3.21",
|
||||
"@types/classnames": "^2.2.10",
|
||||
"@types/invariant": "^2.2.33",
|
||||
"@types/prop-types": "^15.7.3",
|
||||
"@types/react": "^16.9.35",
|
||||
"@types/react-transition-group": "^4.4.0",
|
||||
"@types/warning": "^3.0.0",
|
||||
"classnames": "^2.2.6",
|
||||
"dom-helpers": "^5.1.2",
|
||||
"invariant": "^2.2.4",
|
||||
"prop-types": "^15.7.2",
|
||||
"prop-types-extra": "^1.1.0",
|
||||
"react-overlays": "^4.1.0",
|
||||
"react-transition-group": "^4.4.1",
|
||||
"uncontrollable": "^7.0.0",
|
||||
"warning": "^4.0.3"
|
||||
}
|
||||
},
|
||||
"react-dev-utils": {
|
||||
"version": "10.2.1",
|
||||
"resolved": "https://registry.npmjs.org/react-dev-utils/-/react-dev-utils-10.2.1.tgz",
|
||||
|
|
@ -10689,6 +10944,26 @@
|
|||
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
|
||||
"integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
|
||||
},
|
||||
"react-lifecycles-compat": {
|
||||
"version": "3.0.4",
|
||||
"resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz",
|
||||
"integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA=="
|
||||
},
|
||||
"react-overlays": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/react-overlays/-/react-overlays-4.1.0.tgz",
|
||||
"integrity": "sha512-vdRpnKe0ckWOOD9uWdqykLUPHLPndIiUV7XfEKsi5008xiyHCfL8bxsx4LbMrfnxW1LzRthLyfy50XYRFNQqqw==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.4.5",
|
||||
"@popperjs/core": "^2.0.0",
|
||||
"@restart/hooks": "^0.3.12",
|
||||
"@types/warning": "^3.0.0",
|
||||
"dom-helpers": "^5.1.0",
|
||||
"prop-types": "^15.7.2",
|
||||
"uncontrollable": "^7.0.0",
|
||||
"warning": "^4.0.3"
|
||||
}
|
||||
},
|
||||
"react-redux": {
|
||||
"version": "7.2.1",
|
||||
"resolved": "https://registry.npmjs.org/react-redux/-/react-redux-7.2.1.tgz",
|
||||
|
|
@ -10701,6 +10976,52 @@
|
|||
"react-is": "^16.9.0"
|
||||
}
|
||||
},
|
||||
"react-router": {
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/react-router/-/react-router-5.2.0.tgz",
|
||||
"integrity": "sha512-smz1DUuFHRKdcJC0jobGo8cVbhO3x50tCL4icacOlcwDOEQPq4TMqwx3sY1TP+DvtTgz4nm3thuo7A+BK2U0Dw==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.1.2",
|
||||
"history": "^4.9.0",
|
||||
"hoist-non-react-statics": "^3.1.0",
|
||||
"loose-envify": "^1.3.1",
|
||||
"mini-create-react-context": "^0.4.0",
|
||||
"path-to-regexp": "^1.7.0",
|
||||
"prop-types": "^15.6.2",
|
||||
"react-is": "^16.6.0",
|
||||
"tiny-invariant": "^1.0.2",
|
||||
"tiny-warning": "^1.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"isarray": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
|
||||
"integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
|
||||
},
|
||||
"path-to-regexp": {
|
||||
"version": "1.8.0",
|
||||
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz",
|
||||
"integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==",
|
||||
"requires": {
|
||||
"isarray": "0.0.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"react-router-dom": {
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-5.2.0.tgz",
|
||||
"integrity": "sha512-gxAmfylo2QUjcwxI63RhQ5G85Qqt4voZpUXSEqCwykV0baaOTQDR1f0PmY8AELqIyVc0NEZUj0Gov5lNGcXgsA==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.1.2",
|
||||
"history": "^4.9.0",
|
||||
"loose-envify": "^1.3.1",
|
||||
"prop-types": "^15.6.2",
|
||||
"react-router": "5.2.0",
|
||||
"tiny-invariant": "^1.0.2",
|
||||
"tiny-warning": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"react-scripts": {
|
||||
"version": "3.4.3",
|
||||
"resolved": "https://registry.npmjs.org/react-scripts/-/react-scripts-3.4.3.tgz",
|
||||
|
|
@ -10759,6 +11080,221 @@
|
|||
"webpack-dev-server": "3.11.0",
|
||||
"webpack-manifest-plugin": "2.2.0",
|
||||
"workbox-webpack-plugin": "4.3.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"aria-query": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/aria-query/-/aria-query-3.0.0.tgz",
|
||||
"integrity": "sha1-ZbP8wcoRVajJrmTW7uKX8V1RM8w=",
|
||||
"requires": {
|
||||
"ast-types-flow": "0.0.7",
|
||||
"commander": "^2.11.0"
|
||||
}
|
||||
},
|
||||
"debug": {
|
||||
"version": "2.6.9",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
||||
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
||||
"requires": {
|
||||
"ms": "2.0.0"
|
||||
}
|
||||
},
|
||||
"doctrine": {
|
||||
"version": "1.5.0",
|
||||
"resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz",
|
||||
"integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=",
|
||||
"requires": {
|
||||
"esutils": "^2.0.2",
|
||||
"isarray": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"emoji-regex": {
|
||||
"version": "7.0.3",
|
||||
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
|
||||
"integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA=="
|
||||
},
|
||||
"eslint-plugin-import": {
|
||||
"version": "2.20.1",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.20.1.tgz",
|
||||
"integrity": "sha512-qQHgFOTjguR+LnYRoToeZWT62XM55MBVXObHM6SKFd1VzDcX/vqT1kAz8ssqigh5eMj8qXcRoXXGZpPP6RfdCw==",
|
||||
"requires": {
|
||||
"array-includes": "^3.0.3",
|
||||
"array.prototype.flat": "^1.2.1",
|
||||
"contains-path": "^0.1.0",
|
||||
"debug": "^2.6.9",
|
||||
"doctrine": "1.5.0",
|
||||
"eslint-import-resolver-node": "^0.3.2",
|
||||
"eslint-module-utils": "^2.4.1",
|
||||
"has": "^1.0.3",
|
||||
"minimatch": "^3.0.4",
|
||||
"object.values": "^1.1.0",
|
||||
"read-pkg-up": "^2.0.0",
|
||||
"resolve": "^1.12.0"
|
||||
}
|
||||
},
|
||||
"eslint-plugin-jsx-a11y": {
|
||||
"version": "6.2.3",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.2.3.tgz",
|
||||
"integrity": "sha512-CawzfGt9w83tyuVekn0GDPU9ytYtxyxyFZ3aSWROmnRRFQFT2BiPJd7jvRdzNDi6oLWaS2asMeYSNMjWTV4eNg==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.4.5",
|
||||
"aria-query": "^3.0.0",
|
||||
"array-includes": "^3.0.3",
|
||||
"ast-types-flow": "^0.0.7",
|
||||
"axobject-query": "^2.0.2",
|
||||
"damerau-levenshtein": "^1.0.4",
|
||||
"emoji-regex": "^7.0.2",
|
||||
"has": "^1.0.3",
|
||||
"jsx-ast-utils": "^2.2.1"
|
||||
}
|
||||
},
|
||||
"eslint-plugin-react": {
|
||||
"version": "7.19.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.19.0.tgz",
|
||||
"integrity": "sha512-SPT8j72CGuAP+JFbT0sJHOB80TX/pu44gQ4vXH/cq+hQTiY2PuZ6IHkqXJV6x1b28GDdo1lbInjKUrrdUf0LOQ==",
|
||||
"requires": {
|
||||
"array-includes": "^3.1.1",
|
||||
"doctrine": "^2.1.0",
|
||||
"has": "^1.0.3",
|
||||
"jsx-ast-utils": "^2.2.3",
|
||||
"object.entries": "^1.1.1",
|
||||
"object.fromentries": "^2.0.2",
|
||||
"object.values": "^1.1.1",
|
||||
"prop-types": "^15.7.2",
|
||||
"resolve": "^1.15.1",
|
||||
"semver": "^6.3.0",
|
||||
"string.prototype.matchall": "^4.0.2",
|
||||
"xregexp": "^4.3.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"doctrine": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz",
|
||||
"integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==",
|
||||
"requires": {
|
||||
"esutils": "^2.0.2"
|
||||
}
|
||||
},
|
||||
"resolve": {
|
||||
"version": "1.17.0",
|
||||
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz",
|
||||
"integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==",
|
||||
"requires": {
|
||||
"path-parse": "^1.0.6"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"eslint-plugin-react-hooks": {
|
||||
"version": "1.7.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-1.7.0.tgz",
|
||||
"integrity": "sha512-iXTCFcOmlWvw4+TOE8CLWj6yX1GwzT0Y6cUfHHZqWnSk144VmVIRcVGtUAzrLES7C798lmvnt02C7rxaOX1HNA=="
|
||||
},
|
||||
"find-up": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz",
|
||||
"integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=",
|
||||
"requires": {
|
||||
"locate-path": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"load-json-file": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz",
|
||||
"integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=",
|
||||
"requires": {
|
||||
"graceful-fs": "^4.1.2",
|
||||
"parse-json": "^2.2.0",
|
||||
"pify": "^2.0.0",
|
||||
"strip-bom": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"locate-path": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz",
|
||||
"integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=",
|
||||
"requires": {
|
||||
"p-locate": "^2.0.0",
|
||||
"path-exists": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"ms": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
||||
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
|
||||
},
|
||||
"p-limit": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz",
|
||||
"integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==",
|
||||
"requires": {
|
||||
"p-try": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"p-locate": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz",
|
||||
"integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=",
|
||||
"requires": {
|
||||
"p-limit": "^1.1.0"
|
||||
}
|
||||
},
|
||||
"p-try": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz",
|
||||
"integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M="
|
||||
},
|
||||
"parse-json": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz",
|
||||
"integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=",
|
||||
"requires": {
|
||||
"error-ex": "^1.2.0"
|
||||
}
|
||||
},
|
||||
"path-type": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz",
|
||||
"integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=",
|
||||
"requires": {
|
||||
"pify": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"pify": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
|
||||
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw="
|
||||
},
|
||||
"read-pkg": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz",
|
||||
"integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=",
|
||||
"requires": {
|
||||
"load-json-file": "^2.0.0",
|
||||
"normalize-package-data": "^2.3.2",
|
||||
"path-type": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"read-pkg-up": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz",
|
||||
"integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=",
|
||||
"requires": {
|
||||
"find-up": "^2.0.0",
|
||||
"read-pkg": "^2.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"react-transition-group": {
|
||||
"version": "4.4.1",
|
||||
"resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.1.tgz",
|
||||
"integrity": "sha512-Djqr7OQ2aPUiYurhPalTrVy9ddmFCCzwhqQmtN+J3+3DzLO209Fdr70QrN8Z3DsglWql6iY1lDWAfpFiBtuKGw==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.5.5",
|
||||
"dom-helpers": "^5.0.1",
|
||||
"loose-envify": "^1.4.0",
|
||||
"prop-types": "^15.6.2"
|
||||
}
|
||||
},
|
||||
"read-pkg": {
|
||||
|
|
@ -11092,6 +11628,11 @@
|
|||
"resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz",
|
||||
"integrity": "sha1-six699nWiBvItuZTM17rywoYh0g="
|
||||
},
|
||||
"resolve-pathname": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/resolve-pathname/-/resolve-pathname-3.0.0.tgz",
|
||||
"integrity": "sha512-C7rARubxI8bXFNB/hqcp/4iUeIXJhJZvFPFPiSPRnhU5UPxzMFIl+2E6yY6c4k9giDJAhtV+enfA+G89N6Csng=="
|
||||
},
|
||||
"resolve-url": {
|
||||
"version": "0.2.1",
|
||||
"resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz",
|
||||
|
|
@ -12595,6 +13136,16 @@
|
|||
"resolved": "https://registry.npmjs.org/timsort/-/timsort-0.3.0.tgz",
|
||||
"integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q="
|
||||
},
|
||||
"tiny-invariant": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.1.0.tgz",
|
||||
"integrity": "sha512-ytxQvrb1cPc9WBEI/HSeYYoGD0kWnGEOR8RY6KomWLBVhqz0RgTwVO9dLrGz7dC+nN9llyI7OKAgRq8Vq4ZBSw=="
|
||||
},
|
||||
"tiny-warning": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.3.tgz",
|
||||
"integrity": "sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA=="
|
||||
},
|
||||
"tmp": {
|
||||
"version": "0.0.33",
|
||||
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz",
|
||||
|
|
@ -12673,6 +13224,27 @@
|
|||
"resolved": "https://registry.npmjs.org/ts-pnp/-/ts-pnp-1.1.6.tgz",
|
||||
"integrity": "sha512-CrG5GqAAzMT7144Cl+UIFP7mz/iIhiy+xQ6GGcnjTezhALT02uPMRw7tgDSESgB5MsfKt55+GPWw4ir1kVtMIQ=="
|
||||
},
|
||||
"tsconfig-paths": {
|
||||
"version": "3.9.0",
|
||||
"resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.9.0.tgz",
|
||||
"integrity": "sha512-dRcuzokWhajtZWkQsDVKbWyY+jgcLC5sqJhg2PSgf4ZkH2aHPvaOY8YWGhmjb68b5qqTfasSsDO9k7RUiEmZAw==",
|
||||
"requires": {
|
||||
"@types/json5": "^0.0.29",
|
||||
"json5": "^1.0.1",
|
||||
"minimist": "^1.2.0",
|
||||
"strip-bom": "^3.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"json5": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz",
|
||||
"integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==",
|
||||
"requires": {
|
||||
"minimist": "^1.2.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tslib": {
|
||||
"version": "1.14.1",
|
||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
|
||||
|
|
@ -12736,6 +13308,17 @@
|
|||
"resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
|
||||
"integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c="
|
||||
},
|
||||
"uncontrollable": {
|
||||
"version": "7.1.1",
|
||||
"resolved": "https://registry.npmjs.org/uncontrollable/-/uncontrollable-7.1.1.tgz",
|
||||
"integrity": "sha512-EcPYhot3uWTS3w00R32R2+vS8Vr53tttrvMj/yA1uYRhf8hbTG2GyugGqWDY0qIskxn0uTTojVd6wPYW9ZEf8Q==",
|
||||
"requires": {
|
||||
"@babel/runtime": "^7.6.3",
|
||||
"@types/react": "^16.9.11",
|
||||
"invariant": "^2.2.4",
|
||||
"react-lifecycles-compat": "^3.0.4"
|
||||
}
|
||||
},
|
||||
"unicode-canonical-property-names-ecmascript": {
|
||||
"version": "1.0.4",
|
||||
"resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz",
|
||||
|
|
@ -12986,6 +13569,11 @@
|
|||
"spdx-expression-parse": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"value-equal": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/value-equal/-/value-equal-1.0.1.tgz",
|
||||
"integrity": "sha512-NOJ6JZCAWr0zlxZt+xqCHNTEKOsrks2HQd4MqhP1qy4z1SkbEP467eNx6TgDKXMvUOb+OENfJCZwM+16n7fRfw=="
|
||||
},
|
||||
"vary": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
|
||||
|
|
@ -13042,6 +13630,14 @@
|
|||
"makeerror": "1.0.x"
|
||||
}
|
||||
},
|
||||
"warning": {
|
||||
"version": "4.0.3",
|
||||
"resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz",
|
||||
"integrity": "sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==",
|
||||
"requires": {
|
||||
"loose-envify": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"watchpack": {
|
||||
"version": "1.7.4",
|
||||
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.7.4.tgz",
|
||||
|
|
|
|||
|
|
@ -4,10 +4,10 @@ import ReactDOM from 'react-dom';
|
|||
import { Provider } from 'react-redux';
|
||||
import { BrowserRouter as Router, Route } from 'react-router-dom';
|
||||
import LoadAuth from './auth/load';
|
||||
import RequiresAuth from './components/modules/Auth';
|
||||
import NavBar from './components/modules/NavBar';
|
||||
import Dashboard from './components/view/Dashboard';
|
||||
import Posts from './components/view/Posts';
|
||||
import ConfigCreate from './components/view/ConfigCreate';
|
||||
import Login from './components/view/Login';
|
||||
import Register from './components/view/Register';
|
||||
import store from './redux/store';
|
||||
|
||||
export default () => {
|
||||
|
|
@ -18,8 +18,9 @@ export default () => {
|
|||
<Router>
|
||||
<NavBar />
|
||||
<div style={{ paddingTop: `${3.5}em` }} />
|
||||
<Route exact path="/" component={Posts} />
|
||||
<RequiresAuth exact path="/manage" component={Dashboard} />
|
||||
<Route exact path="/" component={ConfigCreate} />
|
||||
<Route exact path="/login" component={Login} />
|
||||
<Route exact path="/register" component={Register} />
|
||||
</Router>
|
||||
</Provider>,
|
||||
document.getElementById('root'),
|
||||
|
|
|
|||
|
|
@ -5,5 +5,5 @@ export default () => {
|
|||
localStorage.removeItem('auth-token');
|
||||
setAuthToken(null);
|
||||
store.dispatch({ type: 'CLEAR_USER' });
|
||||
window.location.reload();
|
||||
window.location.href = '/';
|
||||
};
|
||||
|
|
|
|||
6
frontend/src/axios/Generate.js
Normal file
6
frontend/src/axios/Generate.js
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
import axios from 'axios';
|
||||
|
||||
export default (data) => {
|
||||
console.log(data);
|
||||
axios.post('/api/configs', data);
|
||||
};
|
||||
20
frontend/src/axios/Register.js
Normal file
20
frontend/src/axios/Register.js
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
/* eslint-disable no-underscore-dangle */
|
||||
import axios from 'axios';
|
||||
import jwtDecode from 'jwt-decode';
|
||||
import store from '../redux/store';
|
||||
import setAuthToken from './AuthToken';
|
||||
|
||||
export default (data) => {
|
||||
const path = '/api/users/register';
|
||||
|
||||
return axios.post(path, data)
|
||||
.then((resp) => {
|
||||
const token = resp.data;
|
||||
localStorage.setItem('auth-token', token);
|
||||
|
||||
const user = jwtDecode(token);
|
||||
store.dispatch({ type: 'SET_USER', user: user._doc });
|
||||
|
||||
setAuthToken(token);
|
||||
});
|
||||
};
|
||||
21
frontend/src/components/modules/Auth.jsx
Normal file
21
frontend/src/components/modules/Auth.jsx
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
import React from 'react';
|
||||
import { Route } from 'react-router-dom';
|
||||
import { CSSTransition } from 'react-transition-group';
|
||||
import LoginPage from '../view/Login';
|
||||
import store from '../../redux/store';
|
||||
|
||||
export default ({ children, ...rest }) => {
|
||||
const state = store.getState();
|
||||
|
||||
if (state.isAuthenticated === undefined) {
|
||||
return (
|
||||
<CSSTransition classNames="react-router" appear in timeout={300}>
|
||||
<div className="v-center"><h1>Loading...</h1></div>
|
||||
</CSSTransition>
|
||||
);
|
||||
}
|
||||
|
||||
return (state.isAuthenticated && !!state.user)
|
||||
? (<Route {...rest} />)
|
||||
: (<Route {...rest} component={LoginPage} />);
|
||||
};
|
||||
100
frontend/src/components/modules/Config/ExtendableBiomeInput.jsx
Normal file
100
frontend/src/components/modules/Config/ExtendableBiomeInput.jsx
Normal file
|
|
@ -0,0 +1,100 @@
|
|||
import React, { useState } from 'react';
|
||||
import {
|
||||
Button, Form, InputGroup, OverlayTrigger, Tooltip,
|
||||
} from 'react-bootstrap';
|
||||
import { faMinus, faPlus } from '@fortawesome/free-solid-svg-icons';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
|
||||
export default ({
|
||||
onChangeSuper,
|
||||
}) => {
|
||||
const [entries, setEntries] = useState([true]);
|
||||
const [biomes, setBiomes] = useState([null]);
|
||||
const [isWhitelist, setWlMode] = useState(false);
|
||||
|
||||
const addEntry = () => {
|
||||
const newBiomes = [...biomes, null];
|
||||
setBiomes(newBiomes);
|
||||
setEntries([...entries, true]);
|
||||
onChangeSuper({
|
||||
isWhitelist,
|
||||
biomes: newBiomes,
|
||||
});
|
||||
};
|
||||
|
||||
const removeEntry = (targetIdx) => {
|
||||
const newEntries = [...entries];
|
||||
newEntries[targetIdx] = false;
|
||||
setEntries(newEntries);
|
||||
onChangeSuper({
|
||||
isWhitelist,
|
||||
biomes: biomes.filter((_, i) => entries[i] === true),
|
||||
});
|
||||
};
|
||||
|
||||
const onChange = (idx, value) => {
|
||||
const newBiomes = [...biomes];
|
||||
newBiomes[idx] = value;
|
||||
setBiomes(newBiomes);
|
||||
onChangeSuper({
|
||||
isWhitelist,
|
||||
biomes: newBiomes,
|
||||
});
|
||||
};
|
||||
|
||||
const onWlChange = (value) => {
|
||||
setWlMode(value);
|
||||
onChangeSuper({
|
||||
isWhitelist: value,
|
||||
biomes,
|
||||
});
|
||||
};
|
||||
|
||||
return entries.map((enabled, idx) => enabled && (
|
||||
<Form.Group>
|
||||
<InputGroup>
|
||||
<OverlayTrigger
|
||||
placement="top"
|
||||
overlay={(
|
||||
<Tooltip id={`biome-input-${idx}`}>
|
||||
{'Format: <modid:biome> OR '}
|
||||
|
||||
<a rel="noreferrer noopener" href="https://oitsjustjo.se/u/GelX-uC1s" target="_blank">
|
||||
Biome Type
|
||||
</a>
|
||||
</Tooltip>
|
||||
)}
|
||||
>
|
||||
<Form.Control
|
||||
required
|
||||
type="text"
|
||||
onChange={(evt) => onChange(idx, evt.target.value)}
|
||||
/>
|
||||
</OverlayTrigger>
|
||||
|
||||
{idx === 0 && (
|
||||
<InputGroup.Append>
|
||||
<InputGroup.Text>
|
||||
Whitelist?
|
||||
</InputGroup.Text>
|
||||
<InputGroup.Checkbox
|
||||
onChange={(evt) => onWlChange(evt.target.checked)}
|
||||
aria-label="Checkbox for following text input"
|
||||
/>
|
||||
</InputGroup.Append>
|
||||
)}
|
||||
<InputGroup.Append>
|
||||
<Button variant="success" onClick={addEntry}>
|
||||
<FontAwesomeIcon icon={faPlus} />
|
||||
</Button>
|
||||
|
||||
{idx !== 0 && (
|
||||
<Button variant="danger" onClick={() => removeEntry(idx)}>
|
||||
<FontAwesomeIcon icon={faMinus} />
|
||||
</Button>
|
||||
)}
|
||||
</InputGroup.Append>
|
||||
</InputGroup>
|
||||
</Form.Group>
|
||||
));
|
||||
};
|
||||
67
frontend/src/components/modules/Config/ExtendableInput.jsx
Normal file
67
frontend/src/components/modules/Config/ExtendableInput.jsx
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
import React, { useState } from 'react';
|
||||
import {
|
||||
Button, Form, InputGroup, OverlayTrigger, Tooltip,
|
||||
} from 'react-bootstrap';
|
||||
import { faMinus, faPlus } from '@fortawesome/free-solid-svg-icons';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
|
||||
export default ({
|
||||
type, tooltipText, onChangeSuper,
|
||||
}) => {
|
||||
const [entries, setEntries] = useState([true]);
|
||||
const [state, setState] = useState([null]);
|
||||
|
||||
const addEntry = () => {
|
||||
const newState = [...state, null];
|
||||
setState(newState);
|
||||
onChangeSuper(newState);
|
||||
setEntries([...entries, true]);
|
||||
};
|
||||
|
||||
const removeEntry = (targetIdx) => {
|
||||
const newEntries = [...entries];
|
||||
newEntries[targetIdx] = false;
|
||||
onChangeSuper(state.filter((_, i) => entries[i] === true));
|
||||
setEntries(newEntries);
|
||||
};
|
||||
|
||||
const onChange = (idx, value) => {
|
||||
const newState = [...state];
|
||||
newState[idx] = value;
|
||||
setState(newState);
|
||||
onChangeSuper(newState);
|
||||
};
|
||||
|
||||
return entries.map((enabled, idx) => enabled && (
|
||||
<Form.Group>
|
||||
<InputGroup>
|
||||
<OverlayTrigger
|
||||
placement="top"
|
||||
overlay={(
|
||||
<Tooltip id={`${tooltipText}-${idx}`}>
|
||||
{tooltipText}
|
||||
</Tooltip>
|
||||
)}
|
||||
>
|
||||
<Form.Control
|
||||
required
|
||||
type={type}
|
||||
onChange={(evt) => onChange(idx, evt.target.value)}
|
||||
/>
|
||||
</OverlayTrigger>
|
||||
|
||||
<InputGroup.Append>
|
||||
<Button variant="success" onClick={addEntry}>
|
||||
<FontAwesomeIcon icon={faPlus} />
|
||||
</Button>
|
||||
|
||||
{idx !== 0 && (
|
||||
<Button variant="danger" onClick={() => removeEntry(idx)}>
|
||||
<FontAwesomeIcon icon={faMinus} />
|
||||
</Button>
|
||||
)}
|
||||
</InputGroup.Append>
|
||||
</InputGroup>
|
||||
</Form.Group>
|
||||
));
|
||||
};
|
||||
112
frontend/src/components/modules/Config/WeightedTextEntry.jsx
Normal file
112
frontend/src/components/modules/Config/WeightedTextEntry.jsx
Normal file
|
|
@ -0,0 +1,112 @@
|
|||
import { faMinus, faPlus } from '@fortawesome/free-solid-svg-icons';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import React, { useState } from 'react';
|
||||
import {
|
||||
Button, Form, InputGroup, OverlayTrigger, Tooltip,
|
||||
} from 'react-bootstrap';
|
||||
|
||||
export default ({
|
||||
prefix, singular, onChangeSuper,
|
||||
}) => {
|
||||
const [entries, setEntries] = useState([true]);
|
||||
const [state, setState] = useState([{
|
||||
ore: '',
|
||||
chance: 100,
|
||||
}]);
|
||||
|
||||
const changePostEvt = (update) => {
|
||||
onChangeSuper(update.filter((_, i) => entries[i] === true));
|
||||
};
|
||||
|
||||
const addEntry = () => {
|
||||
if (!singular) {
|
||||
const newState = [...state, { ore: '', chance: 100 }];
|
||||
setState(newState);
|
||||
changePostEvt(newState);
|
||||
setEntries([...entries, true]);
|
||||
}
|
||||
};
|
||||
|
||||
const removeEntry = (targetIdx) => {
|
||||
if (!singular) {
|
||||
const newEntries = [...entries];
|
||||
newEntries[targetIdx] = false;
|
||||
changePostEvt(state);
|
||||
setEntries(newEntries);
|
||||
}
|
||||
};
|
||||
|
||||
const onChange = (idx, key, value) => {
|
||||
const newState = [...state];
|
||||
newState[idx] = {
|
||||
...newState[idx],
|
||||
[key]: value,
|
||||
};
|
||||
|
||||
setState(newState);
|
||||
changePostEvt(newState);
|
||||
};
|
||||
|
||||
return (singular ? [entries[0]] : entries).map((enabled, idx) => enabled && (
|
||||
<Form.Group>
|
||||
<InputGroup>
|
||||
<InputGroup.Prepend>
|
||||
<InputGroup.Text>Block and Chance</InputGroup.Text>
|
||||
</InputGroup.Prepend>
|
||||
|
||||
<OverlayTrigger
|
||||
placement="top"
|
||||
overlay={(
|
||||
<Tooltip id={`tooltip-block-${prefix}-${idx}`}>
|
||||
Format: modid:block or modid:block:meta
|
||||
</Tooltip>
|
||||
)}
|
||||
>
|
||||
<Form.Control
|
||||
required
|
||||
type="text"
|
||||
value={state[idx].ore}
|
||||
onChange={(evt) => onChange(idx, 'ore', evt.target.value)}
|
||||
/>
|
||||
</OverlayTrigger>
|
||||
|
||||
<OverlayTrigger
|
||||
placement="top"
|
||||
overlay={(
|
||||
<Tooltip id={`tooltip-chance-${prefix}-${idx}`}>
|
||||
All Chances
|
||||
{' '}
|
||||
<strong>MUST</strong>
|
||||
{' '}
|
||||
Add To 100
|
||||
</Tooltip>
|
||||
)}
|
||||
>
|
||||
<Form.Control
|
||||
required
|
||||
type="number"
|
||||
min="1"
|
||||
max="100"
|
||||
value={(singular && 100) || state[idx].chance}
|
||||
disabled={singular}
|
||||
onChange={(evt) => onChange(idx, 'chance', parseInt(evt.target.value, 10))}
|
||||
/>
|
||||
</OverlayTrigger>
|
||||
|
||||
{!singular && (
|
||||
<InputGroup.Append>
|
||||
<Button variant="success" onClick={addEntry}>
|
||||
<FontAwesomeIcon icon={faPlus} />
|
||||
</Button>
|
||||
|
||||
{idx !== 0 && (
|
||||
<Button variant="danger" onClick={() => removeEntry(idx)}>
|
||||
<FontAwesomeIcon icon={faMinus} />
|
||||
</Button>
|
||||
)}
|
||||
</InputGroup.Append>
|
||||
)}
|
||||
</InputGroup>
|
||||
</Form.Group>
|
||||
));
|
||||
};
|
||||
|
|
@ -1,33 +1,70 @@
|
|||
import { faSignOutAlt } from '@fortawesome/free-solid-svg-icons';
|
||||
import React from 'react';
|
||||
import { Nav, Navbar, NavItem } from 'react-bootstrap';
|
||||
import {
|
||||
faCode, faPlusSquare, faSignInAlt, faSignOutAlt,
|
||||
} from '@fortawesome/free-solid-svg-icons';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import NavLinkItem from './NavLinkItem';
|
||||
import store from '../../redux/store';
|
||||
import {
|
||||
Form, Nav, Navbar, NavItem,
|
||||
} from 'react-bootstrap';
|
||||
import { connect } from 'react-redux';
|
||||
import LogOut from '../../auth/logout';
|
||||
import store from '../../redux/store';
|
||||
import NavLinkItem from './NavLinkItem';
|
||||
|
||||
export default () => (
|
||||
const NavBarComponent = ({
|
||||
mc114Mode,
|
||||
}) => (
|
||||
<Navbar expand="lg" collapseOnSelect bg="dark" variant="dark" fixed="top">
|
||||
<Navbar.Brand>Geolosys Configurator</Navbar.Brand>
|
||||
<Navbar.Brand>
|
||||
<span>
|
||||
<img width="24" src={`${process.env.PUBLIC_URL}/logo.png`} alt="Geolosys Logo" />
|
||||
{' '}
|
||||
Configurator
|
||||
</span>
|
||||
</Navbar.Brand>
|
||||
<Navbar.Toggle aria-controls="responsive-navbar-nav" />
|
||||
<Navbar.Collapse>
|
||||
<Nav className="mr-auto">
|
||||
<NavLinkItem name="Blog" dest="/" icon={faBook} />
|
||||
<NavLinkItem name="Create" dest="/" icon={faPlusSquare} />
|
||||
|
||||
{store.getState().isAuthenticated && (
|
||||
<div>
|
||||
<NavLinkItem name="Your Configs" dest="/manage" icon={faEdit} />
|
||||
<NavItem style={{ cursor: 'pointer' }} onClick={LogOut}>
|
||||
<div className="nav-link nav-sign-out">
|
||||
<span>
|
||||
<FontAwesomeIcon icon={faSignOutAlt} />
|
||||
{' '}
|
||||
Sign Out
|
||||
</span>
|
||||
</div>
|
||||
</NavItem>
|
||||
</div>
|
||||
<NavLinkItem name="Your Configs" dest="/configs" icon={faCode} />
|
||||
)}
|
||||
|
||||
{store.getState().isAuthenticated && (
|
||||
<NavItem style={{ cursor: 'pointer' }} onClick={LogOut}>
|
||||
<div className="nav-link nav-sign-out">
|
||||
<span>
|
||||
<FontAwesomeIcon icon={faSignOutAlt} />
|
||||
{' '}
|
||||
Sign Out
|
||||
</span>
|
||||
</div>
|
||||
</NavItem>
|
||||
)}
|
||||
|
||||
{!store.getState().isAuthenticated && (
|
||||
<NavLinkItem name="Log In" dest="/login" icon={faSignInAlt} />
|
||||
)}
|
||||
|
||||
<NavItem className="switch-nav-item align-bottom mt-2">
|
||||
<Form.Check
|
||||
type="switch"
|
||||
label="For MC 1.14+"
|
||||
id="mc114-switch"
|
||||
checked={mc114Mode === true}
|
||||
onChange={() => {
|
||||
store.dispatch({ type: 'TOGGLE_MC_VER' });
|
||||
}}
|
||||
/>
|
||||
</NavItem>
|
||||
</Nav>
|
||||
</Navbar.Collapse>
|
||||
</Navbar>
|
||||
);
|
||||
|
||||
const mapStateToProps = (state) => ({
|
||||
mc114Mode: state.mc114,
|
||||
});
|
||||
|
||||
export default connect(mapStateToProps)(NavBarComponent);
|
||||
|
|
|
|||
125
frontend/src/components/view/ConfigCreate.jsx
Normal file
125
frontend/src/components/view/ConfigCreate.jsx
Normal file
|
|
@ -0,0 +1,125 @@
|
|||
import React, { useState } from 'react';
|
||||
import { Accordion, Container, Button } from 'react-bootstrap';
|
||||
import { connect } from 'react-redux';
|
||||
import ConfigRenderOre from './ConfigRenderOre';
|
||||
import ConfigRenderStone from './ConfigRenderStone';
|
||||
import PostGenerateJson from '../../axios/Generate';
|
||||
|
||||
const Configurator = ({
|
||||
mc114,
|
||||
}) => {
|
||||
const [oreConfigs, setOreConfigs] = useState([true]);
|
||||
const [stoneConfigs, setStoneConfigs] = useState([true]);
|
||||
const [oreState, setOreState] = useState([{
|
||||
name: '',
|
||||
type: 'dense',
|
||||
oreBlocks: null,
|
||||
sampleBlocks: null,
|
||||
maxY: 1,
|
||||
minY: 0,
|
||||
chance: 0,
|
||||
size: 1,
|
||||
density: 1,
|
||||
dimBlacklist: [],
|
||||
blockStateMatchers: [],
|
||||
}]);
|
||||
const [stoneState, setStoneState] = useState([{
|
||||
block: '',
|
||||
maxY: -1,
|
||||
minY: -1,
|
||||
chance: -1,
|
||||
size: -1,
|
||||
dimBlacklist: [],
|
||||
}]);
|
||||
|
||||
const addOreEntry = () => {
|
||||
setOreConfigs([...oreConfigs, true]);
|
||||
};
|
||||
|
||||
const removeOreEntry = (targetIdx) => {
|
||||
const cp = [...oreConfigs];
|
||||
cp[targetIdx] = false;
|
||||
setOreConfigs(cp);
|
||||
};
|
||||
|
||||
const onOreConfigChange = (idx, oreConfigState) => {
|
||||
const newState = [...oreState];
|
||||
newState[idx] = oreConfigState;
|
||||
console.log('Ore State Change', idx, oreConfigState);
|
||||
console.log(newState);
|
||||
setOreState(newState);
|
||||
};
|
||||
|
||||
const addStoneEntry = () => {
|
||||
setStoneConfigs([...stoneConfigs, true]);
|
||||
};
|
||||
|
||||
const removeStoneEntry = (targetIdx) => {
|
||||
const cp = [...stoneConfigs];
|
||||
cp[targetIdx] = false;
|
||||
setStoneConfigs(cp);
|
||||
};
|
||||
|
||||
const onStoneConfigChange = (idx, stoneConfigState) => {
|
||||
const newState = [...stoneState];
|
||||
newState[idx] = stoneConfigState;
|
||||
console.log('Stone State Change', idx, stoneConfigState);
|
||||
console.log(newState);
|
||||
setStoneState(newState);
|
||||
};
|
||||
|
||||
return (
|
||||
<div>
|
||||
<div className="text-center d-block">
|
||||
<img className="header" src={`${process.env.PUBLIC_URL}/logo.png`} alt="Geolosys Logo" />
|
||||
<h4>Geolosys Deposit Configurator</h4>
|
||||
</div>
|
||||
|
||||
<Container>
|
||||
<h4>Ores</h4>
|
||||
<Accordion defaultActiveKey="0">
|
||||
{oreConfigs.map((enabled, idx) => enabled && (
|
||||
<ConfigRenderOre
|
||||
mc114={mc114}
|
||||
onEntryCreation={addOreEntry}
|
||||
onEntryDeletion={removeOreEntry}
|
||||
onConfigChange={onOreConfigChange}
|
||||
idx={idx}
|
||||
/>
|
||||
))}
|
||||
</Accordion>
|
||||
</Container>
|
||||
|
||||
<Container>
|
||||
<h4>Stones</h4>
|
||||
<Accordion defaultActiveKey="0">
|
||||
{stoneConfigs.map((enabled, idx) => enabled && (
|
||||
<ConfigRenderStone
|
||||
mc114={mc114}
|
||||
onEntryCreation={addStoneEntry}
|
||||
onEntryDeletion={removeStoneEntry}
|
||||
onConfigChange={onStoneConfigChange}
|
||||
idx={idx}
|
||||
/>
|
||||
))}
|
||||
</Accordion>
|
||||
</Container>
|
||||
|
||||
<Button
|
||||
onClick={() => PostGenerateJson({
|
||||
ores: oreState,
|
||||
stones: stoneState,
|
||||
})}
|
||||
className="d-block mx-auto my-4"
|
||||
>
|
||||
Generate!
|
||||
</Button>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
const mapStateToProps = (state) => ({
|
||||
mc114: state.mc114,
|
||||
});
|
||||
|
||||
export default connect(mapStateToProps)(Configurator);
|
||||
304
frontend/src/components/view/ConfigRenderOre.jsx
Normal file
304
frontend/src/components/view/ConfigRenderOre.jsx
Normal file
|
|
@ -0,0 +1,304 @@
|
|||
import React, { useState } from 'react';
|
||||
import { faMinus, faPlus } from '@fortawesome/free-solid-svg-icons';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import {
|
||||
Accordion, Button, ButtonGroup, Card, Form, OverlayTrigger, Tooltip,
|
||||
} from 'react-bootstrap';
|
||||
import WeightedTextEntry from '../modules/Config/WeightedTextEntry';
|
||||
import ExtendableInput from '../modules/Config/ExtendableInput';
|
||||
import ExtendableBiomeInput from '../modules/Config/ExtendableBiomeInput';
|
||||
|
||||
export default ({
|
||||
mc114, idx, onEntryCreation, onEntryDeletion, onConfigChange,
|
||||
}) => {
|
||||
const [state, setState] = useState({
|
||||
name: '',
|
||||
depType: 'deposit',
|
||||
type: 'dense',
|
||||
oreBlocks: null, // string or string[] depending on type
|
||||
sampleBlocks: null, // string or string[] depending on type
|
||||
maxY: 1,
|
||||
minY: 0,
|
||||
chance: 0,
|
||||
size: 1,
|
||||
density: 1,
|
||||
dimBlacklist: [],
|
||||
blockStateMatchers: [], // string[]
|
||||
});
|
||||
|
||||
const setStateWithPropogation = (newState) => {
|
||||
const formatted = { ...newState };
|
||||
if (formatted.oreBlocks) {
|
||||
formatted.oreBlocks = formatted.oreBlocks.map((x) => [x.ore, x.chance]).flat();
|
||||
}
|
||||
if (formatted.sampleBlocks) {
|
||||
formatted.sampleBlocks = formatted.sampleBlocks.map((x) => [x.ore, x.chance]).flat();
|
||||
}
|
||||
delete formatted.depType;
|
||||
setState(newState);
|
||||
onConfigChange(idx, formatted);
|
||||
};
|
||||
|
||||
return (
|
||||
<Card>
|
||||
<Card.Header>
|
||||
<ButtonGroup>
|
||||
<Accordion.Toggle as={Button} variant="outline-secondary" eventKey={`${idx}`}>
|
||||
Config Entry
|
||||
</Accordion.Toggle>
|
||||
|
||||
<Button variant="success" onClick={onEntryCreation}>
|
||||
<FontAwesomeIcon icon={faPlus} />
|
||||
</Button>
|
||||
|
||||
{idx !== 0 && (
|
||||
<Button variant="danger" onClick={() => onEntryDeletion(idx)}>
|
||||
<FontAwesomeIcon icon={faMinus} />
|
||||
</Button>
|
||||
)}
|
||||
</ButtonGroup>
|
||||
</Card.Header>
|
||||
<Accordion.Collapse eventKey={`${idx}`}>
|
||||
<Card.Body>
|
||||
<Form style={{ padding: '12px' }} onSubmit={null}>
|
||||
<Form.Group>
|
||||
<Form.Label>
|
||||
Deposit Name [Optional]
|
||||
</Form.Label>
|
||||
<Form.Control
|
||||
type="text"
|
||||
onChange={(evt) => {
|
||||
setStateWithPropogation(
|
||||
{ ...state, name: evt.target.value },
|
||||
);
|
||||
}}
|
||||
/>
|
||||
</Form.Group>
|
||||
|
||||
<Form.Group>
|
||||
<Form.Label>
|
||||
Deposit Type
|
||||
</Form.Label>
|
||||
|
||||
<Form.Control
|
||||
as="select"
|
||||
value={state.depType}
|
||||
onChange={(evt) => setStateWithPropogation(
|
||||
{ ...state, depType: evt.target.value },
|
||||
)}
|
||||
>
|
||||
<option value="deposit">Normal</option>
|
||||
<option value="depositMulti">Multi-Ore</option>
|
||||
<option value="depositBiome">Biome Specific</option>
|
||||
<option value="depositBiomeMulti">Multi-Ore & Biome Specific</option>
|
||||
</Form.Control>
|
||||
</Form.Group>
|
||||
|
||||
{mc114 && (
|
||||
<Form.Group>
|
||||
<Form.Label>
|
||||
Deposit Structure Type (
|
||||
<b>1.14+ Only</b>
|
||||
)
|
||||
</Form.Label>
|
||||
|
||||
<Form.Control
|
||||
as="select"
|
||||
value={state.type}
|
||||
onChange={(evt) => setStateWithPropogation(
|
||||
{ ...state, type: evt.target.value },
|
||||
)}
|
||||
>
|
||||
<option value="dense">Dense</option>
|
||||
<option value="sparse">Sparse</option>
|
||||
<option value="dike">Dike</option>
|
||||
<option value="layer">Layer</option>
|
||||
</Form.Control>
|
||||
</Form.Group>
|
||||
)}
|
||||
|
||||
<Form.Group>
|
||||
<Form.Label>
|
||||
Ore Blocks
|
||||
</Form.Label>
|
||||
|
||||
<WeightedTextEntry
|
||||
singular={!state.depType.toLowerCase().includes('multi')}
|
||||
prefix="ore"
|
||||
onChangeSuper={(oreBlocks) => {
|
||||
setStateWithPropogation({ ...state, oreBlocks });
|
||||
}}
|
||||
/>
|
||||
</Form.Group>
|
||||
|
||||
<Form.Group>
|
||||
<Form.Label>
|
||||
Sample Blocks
|
||||
</Form.Label>
|
||||
|
||||
<WeightedTextEntry
|
||||
singular={!state.depType.toLowerCase().includes('multi')}
|
||||
prefix="sample"
|
||||
onChangeSuper={(sampleBlocks) => {
|
||||
setStateWithPropogation({ ...state, sampleBlocks });
|
||||
}}
|
||||
/>
|
||||
</Form.Group>
|
||||
|
||||
<Form.Group>
|
||||
<Form.Label>
|
||||
Maximum Y-Level
|
||||
</Form.Label>
|
||||
|
||||
<Form.Control
|
||||
required
|
||||
type="number"
|
||||
value={state.maxY}
|
||||
min={1}
|
||||
max={255}
|
||||
onChange={(evt) => {
|
||||
const maxY = (state.maxY < state.minY)
|
||||
? state.minY + 1
|
||||
: parseInt(evt.target.value, 10);
|
||||
setStateWithPropogation({ ...state, maxY });
|
||||
}}
|
||||
/>
|
||||
</Form.Group>
|
||||
|
||||
<Form.Group>
|
||||
<Form.Label>
|
||||
Minimum Y-Level
|
||||
</Form.Label>
|
||||
|
||||
<Form.Control
|
||||
required
|
||||
type="number"
|
||||
value={state.minY}
|
||||
min={0}
|
||||
max={254}
|
||||
onChange={(evt) => {
|
||||
const minY = (state.minY > state.maxY)
|
||||
? state.maxY - 1
|
||||
: parseInt(evt.target.value, 10);
|
||||
setStateWithPropogation({ ...state, minY });
|
||||
}}
|
||||
/>
|
||||
</Form.Group>
|
||||
|
||||
<Form.Group>
|
||||
<Form.Label>
|
||||
Chance (
|
||||
<a rel="noreferrer noopener" target="_blank" href="https://oitsjustjo.se/u/M3NfQxBsZ">Relative To All Chances</a>
|
||||
{' '}
|
||||
)
|
||||
</Form.Label>
|
||||
|
||||
<Form.Control
|
||||
required
|
||||
type="number"
|
||||
value={state.chance}
|
||||
min={0}
|
||||
onChange={(evt) => setStateWithPropogation(
|
||||
{ ...state, chance: parseInt(evt.target.value, 10) },
|
||||
)}
|
||||
/>
|
||||
</Form.Group>
|
||||
|
||||
<Form.Group>
|
||||
<Form.Label>
|
||||
Size
|
||||
</Form.Label>
|
||||
|
||||
<Form.Control
|
||||
required
|
||||
type="number"
|
||||
value={state.size}
|
||||
min={1}
|
||||
onChange={(evt) => setStateWithPropogation(
|
||||
{ ...state, size: parseInt(evt.target.value, 10) },
|
||||
)}
|
||||
/>
|
||||
</Form.Group>
|
||||
|
||||
<Form.Group>
|
||||
<Form.Label>
|
||||
Density
|
||||
</Form.Label>
|
||||
|
||||
<OverlayTrigger
|
||||
placement="top"
|
||||
overlay={(
|
||||
<Tooltip id={`density-${idx}`}>
|
||||
Any Decimal Between 0 and 1
|
||||
</Tooltip>
|
||||
)}
|
||||
>
|
||||
<Form.Control
|
||||
required
|
||||
type="number"
|
||||
value={state.density}
|
||||
onChange={(evt) => {
|
||||
if (evt.target.value > 1) {
|
||||
setStateWithPropogation(
|
||||
{ ...state, density: 1 },
|
||||
);
|
||||
} else if (evt.target.value < 0) {
|
||||
setStateWithPropogation(
|
||||
{ ...state, density: 0 },
|
||||
);
|
||||
} else {
|
||||
setStateWithPropogation(
|
||||
{ ...state, density: Number(evt.target.value) },
|
||||
);
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</OverlayTrigger>
|
||||
</Form.Group>
|
||||
|
||||
{state.depType.toLowerCase().includes('biome') && (
|
||||
<Form.Group>
|
||||
<Form.Label>
|
||||
Biomes To Spawn / Not Spawn
|
||||
</Form.Label>
|
||||
<ExtendableBiomeInput onChangeSuper={(wlState) => setStateWithPropogation({
|
||||
...state,
|
||||
...wlState,
|
||||
})}
|
||||
/>
|
||||
</Form.Group>
|
||||
)}
|
||||
|
||||
<Form.Group>
|
||||
<Form.Label>
|
||||
Dimension Blacklist
|
||||
</Form.Label>
|
||||
|
||||
<ExtendableInput
|
||||
type={mc114 ? 'text' : 'number'}
|
||||
tooltipText={mc114 ? 'Format: <modid:dimension>' : 'Any Dimension ID (e.g. -1, 1)'}
|
||||
onChangeSuper={(dimBlacklist) => setStateWithPropogation(
|
||||
{ ...state, dimBlacklist },
|
||||
)}
|
||||
/>
|
||||
</Form.Group>
|
||||
|
||||
<Form.Group>
|
||||
<Form.Label>
|
||||
Blocks This Deposit May Replace
|
||||
</Form.Label>
|
||||
|
||||
<ExtendableInput
|
||||
type="text"
|
||||
tooltipText="Format: <modid:block> or <modid:block:meta>"
|
||||
onChangeSuper={(blockStateMatchers) => setStateWithPropogation(
|
||||
{ ...state, blockStateMatchers },
|
||||
)}
|
||||
/>
|
||||
</Form.Group>
|
||||
</Form>
|
||||
</Card.Body>
|
||||
</Accordion.Collapse>
|
||||
</Card>
|
||||
);
|
||||
};
|
||||
154
frontend/src/components/view/ConfigRenderStone.jsx
Normal file
154
frontend/src/components/view/ConfigRenderStone.jsx
Normal file
|
|
@ -0,0 +1,154 @@
|
|||
import { faMinus, faPlus } from '@fortawesome/free-solid-svg-icons';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import React, { useState } from 'react';
|
||||
import {
|
||||
Accordion, Button, ButtonGroup, Card, Form,
|
||||
} from 'react-bootstrap';
|
||||
import ExtendableInput from '../modules/Config/ExtendableInput';
|
||||
|
||||
export default ({
|
||||
mc114, idx, onEntryCreation, onEntryDeletion, onConfigChange,
|
||||
}) => {
|
||||
const [state, setState] = useState({
|
||||
block: '',
|
||||
maxY: 1,
|
||||
minY: 0,
|
||||
chance: 0,
|
||||
size: 1,
|
||||
dimBlacklist: [],
|
||||
});
|
||||
|
||||
const setStateWithPropogation = (newState) => {
|
||||
console.log(newState);
|
||||
setState(newState);
|
||||
onConfigChange(idx, newState);
|
||||
};
|
||||
|
||||
return (
|
||||
<Card>
|
||||
<Card.Header>
|
||||
<ButtonGroup>
|
||||
<Accordion.Toggle as={Button} variant="outline-secondary" eventKey={`${idx}`}>
|
||||
Config Entry
|
||||
</Accordion.Toggle>
|
||||
|
||||
<Button variant="success" onClick={onEntryCreation}>
|
||||
<FontAwesomeIcon icon={faPlus} />
|
||||
</Button>
|
||||
|
||||
{idx !== 0 && (
|
||||
<Button variant="danger" onClick={() => onEntryDeletion(idx)}>
|
||||
<FontAwesomeIcon icon={faMinus} />
|
||||
</Button>
|
||||
)}
|
||||
</ButtonGroup>
|
||||
</Card.Header>
|
||||
<Accordion.Collapse eventKey={`${idx}`}>
|
||||
<Card.Body>
|
||||
<Form style={{ padding: '12px' }} onSubmit={null}>
|
||||
<Form.Group>
|
||||
<Form.Label>
|
||||
Stone Block
|
||||
</Form.Label>
|
||||
|
||||
<Form.Control
|
||||
required
|
||||
onChange={(evt) => setStateWithPropogation({ ...state, block: evt.target.value })}
|
||||
type="text"
|
||||
/>
|
||||
</Form.Group>
|
||||
|
||||
<Form.Group>
|
||||
<Form.Label>
|
||||
Maximum Y-Level
|
||||
</Form.Label>
|
||||
|
||||
<Form.Control
|
||||
required
|
||||
type="number"
|
||||
value={state.maxY}
|
||||
min={1}
|
||||
max={255}
|
||||
onChange={(evt) => {
|
||||
const maxY = (state.maxY < state.minY)
|
||||
? state.minY + 1
|
||||
: parseInt(evt.target.value, 10);
|
||||
setStateWithPropogation({ ...state, maxY });
|
||||
}}
|
||||
/>
|
||||
</Form.Group>
|
||||
|
||||
<Form.Group>
|
||||
<Form.Label>
|
||||
Minimum Y-Level
|
||||
</Form.Label>
|
||||
|
||||
<Form.Control
|
||||
required
|
||||
type="number"
|
||||
value={state.minY}
|
||||
min={0}
|
||||
max={254}
|
||||
onChange={(evt) => {
|
||||
const minY = (state.minY > state.maxY)
|
||||
? state.maxY - 1
|
||||
: parseInt(evt.target.value, 10);
|
||||
setStateWithPropogation({ ...state, minY });
|
||||
}}
|
||||
/>
|
||||
</Form.Group>
|
||||
|
||||
<Form.Group>
|
||||
<Form.Label>
|
||||
Chance (
|
||||
<a rel="noreferrer noopener" target="_blank" href="https://oitsjustjo.se/u/M3NfQxBsZ">Relative To All Chances</a>
|
||||
{' '}
|
||||
)
|
||||
</Form.Label>
|
||||
|
||||
<Form.Control
|
||||
required
|
||||
type="number"
|
||||
value={state.chance}
|
||||
min={0}
|
||||
onChange={(evt) => setStateWithPropogation(
|
||||
{ ...state, chance: parseInt(evt.target.value, 10) },
|
||||
)}
|
||||
/>
|
||||
</Form.Group>
|
||||
|
||||
<Form.Group>
|
||||
<Form.Label>
|
||||
Size
|
||||
</Form.Label>
|
||||
|
||||
<Form.Control
|
||||
required
|
||||
type="number"
|
||||
value={state.size}
|
||||
min={1}
|
||||
onChange={(evt) => setStateWithPropogation(
|
||||
{ ...state, size: parseInt(evt.target.value, 10) },
|
||||
)}
|
||||
/>
|
||||
</Form.Group>
|
||||
|
||||
<Form.Group>
|
||||
<Form.Label>
|
||||
Dimension Blacklist
|
||||
</Form.Label>
|
||||
|
||||
<ExtendableInput
|
||||
type={mc114 ? 'text' : 'number'}
|
||||
tooltipText={mc114 ? 'Format: <modid:dimension>' : 'Any Dimension ID (e.g. -1, 1)'}
|
||||
onChangeSuper={(dimBlacklist) => setStateWithPropogation(
|
||||
{ ...state, dimBlacklist },
|
||||
)}
|
||||
/>
|
||||
</Form.Group>
|
||||
</Form>
|
||||
</Card.Body>
|
||||
</Accordion.Collapse>
|
||||
</Card>
|
||||
);
|
||||
};
|
||||
|
|
@ -4,6 +4,7 @@ import { connect } from 'react-redux';
|
|||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import { faSignInAlt } from '@fortawesome/free-solid-svg-icons';
|
||||
import { CSSTransition } from 'react-transition-group';
|
||||
import { NavLink } from 'react-router-dom';
|
||||
import postLogin from '../../axios/Login';
|
||||
import Notification from '../modules/Notification';
|
||||
|
||||
|
|
@ -19,7 +20,7 @@ const LoginComponent = ({
|
|||
|
||||
useEffect(() => {
|
||||
if (isAuthenticated) {
|
||||
window.location.reload();
|
||||
window.location.href = '/';
|
||||
}
|
||||
}, [isAuthenticated]);
|
||||
|
||||
|
|
@ -39,7 +40,7 @@ const LoginComponent = ({
|
|||
className="mx-auto perfect-width"
|
||||
>
|
||||
<h2 className="text-center">
|
||||
Admin Login
|
||||
User Login
|
||||
</h2>
|
||||
<Form onSubmit={submit}>
|
||||
<Form.Group>
|
||||
|
|
@ -47,6 +48,7 @@ const LoginComponent = ({
|
|||
Username
|
||||
</Form.Label>
|
||||
<Form.Control
|
||||
required
|
||||
type="text"
|
||||
onChange={(evt) => { setState({ ...state, username: evt.target.value }); }}
|
||||
/>
|
||||
|
|
@ -56,18 +58,25 @@ const LoginComponent = ({
|
|||
Password
|
||||
</Form.Label>
|
||||
<Form.Control
|
||||
required
|
||||
type="password"
|
||||
onChange={(evt) => { setState({ ...state, password: evt.target.value }); }}
|
||||
/>
|
||||
</Form.Group>
|
||||
|
||||
<Button
|
||||
type="submit"
|
||||
>
|
||||
<FontAwesomeIcon icon={faSignInAlt} />
|
||||
{' '}
|
||||
Log In
|
||||
</Button>
|
||||
<div className="d-flex" style={{ justifyContent: 'space-between' }}>
|
||||
<NavLink to="/register">
|
||||
<Button variant="secondary">
|
||||
Register
|
||||
</Button>
|
||||
</NavLink>
|
||||
|
||||
<Button type="submit">
|
||||
<FontAwesomeIcon icon={faSignInAlt} />
|
||||
{' '}
|
||||
Log In
|
||||
</Button>
|
||||
</div>
|
||||
</Form>
|
||||
</Container>
|
||||
</div>
|
||||
|
|
|
|||
117
frontend/src/components/view/Register.jsx
Normal file
117
frontend/src/components/view/Register.jsx
Normal file
|
|
@ -0,0 +1,117 @@
|
|||
import React, { useEffect, useState } from 'react';
|
||||
import { Button, Container, Form } from 'react-bootstrap';
|
||||
import { connect } from 'react-redux';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import { faSignInAlt } from '@fortawesome/free-solid-svg-icons';
|
||||
import { CSSTransition } from 'react-transition-group';
|
||||
import postRegister from '../../axios/Register';
|
||||
import Notification from '../modules/Notification';
|
||||
|
||||
const LoginComponent = ({
|
||||
isAuthenticated,
|
||||
}) => {
|
||||
const [state, setState] = useState({
|
||||
username: null,
|
||||
password: null,
|
||||
passwordConf: null,
|
||||
usernameDup: false,
|
||||
});
|
||||
|
||||
const [error, setError] = useState(null);
|
||||
|
||||
useEffect(() => {
|
||||
if (isAuthenticated) {
|
||||
window.location.href = '/';
|
||||
}
|
||||
}, [isAuthenticated]);
|
||||
|
||||
const submit = (evt) => {
|
||||
evt.preventDefault();
|
||||
|
||||
if (state.password === state.passwordConf) {
|
||||
const { username, password } = state;
|
||||
|
||||
postRegister({ username, password }).catch((ex) => {
|
||||
if (ex.response && ex.response.data === 'USERNAME ALREADY EXISTS') {
|
||||
setState({ ...state, usernameDup: true });
|
||||
} else {
|
||||
setError(`${ex.response.data}`);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<CSSTransition classNames="react-router" appear in timeout={300}>
|
||||
<div>
|
||||
<div className="v-center">
|
||||
<Container className="mx-auto perfect-width">
|
||||
<h2 className="text-center">
|
||||
New User Registration
|
||||
</h2>
|
||||
|
||||
<Form onSubmit={submit}>
|
||||
<Form.Group>
|
||||
<Form.Label>
|
||||
Username
|
||||
</Form.Label>
|
||||
<Form.Control
|
||||
required
|
||||
type="text"
|
||||
onChange={(evt) => { setState({ ...state, username: evt.target.value }); }}
|
||||
/>
|
||||
{state.usernameDup && (
|
||||
<Form.Text className="text-danger">Username Already Exists</Form.Text>
|
||||
)}
|
||||
</Form.Group>
|
||||
|
||||
<Form.Group>
|
||||
<Form.Label>
|
||||
Password
|
||||
</Form.Label>
|
||||
<Form.Control
|
||||
required
|
||||
type="password"
|
||||
onChange={(evt) => { setState({ ...state, password: evt.target.value }); }}
|
||||
/>
|
||||
</Form.Group>
|
||||
|
||||
<Form.Group>
|
||||
<Form.Label>
|
||||
(Confirm)
|
||||
</Form.Label>
|
||||
<Form.Control
|
||||
required
|
||||
type="password"
|
||||
onChange={(evt) => { setState({ ...state, passwordConf: evt.target.value }); }}
|
||||
/>
|
||||
{state.password !== state.passwordConf && (
|
||||
<Form.Text className="text-danger">Passwords Do Not Match</Form.Text>
|
||||
)}
|
||||
</Form.Group>
|
||||
|
||||
<Button type="submit" disabled={!(!!state.username && !!state.password && state.password === state.passwordConf)}>
|
||||
<FontAwesomeIcon icon={faSignInAlt} />
|
||||
{' '}
|
||||
Register
|
||||
</Button>
|
||||
</Form>
|
||||
</Container>
|
||||
</div>
|
||||
<Notification
|
||||
title="Failed to Register"
|
||||
contents={error}
|
||||
show={!!error}
|
||||
onHide={() => setError(null)}
|
||||
/>
|
||||
</div>
|
||||
</CSSTransition>
|
||||
);
|
||||
};
|
||||
|
||||
const mapStateToProps = (state) => ({
|
||||
isAuthenticated: state.isAuthenticated,
|
||||
user: state.user,
|
||||
});
|
||||
|
||||
export default connect(mapStateToProps)(LoginComponent);
|
||||
40
frontend/src/css/App.css
Normal file
40
frontend/src/css/App.css
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
.perfect-width {
|
||||
max-width: 384px;
|
||||
width: 85%;
|
||||
}
|
||||
|
||||
.v-center {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: calc(100vh - 3.5em);
|
||||
}
|
||||
|
||||
.nav-link, .nav-sign-out {
|
||||
transition: color ease-in-out 150ms;
|
||||
}
|
||||
|
||||
.nav-sign-out:hover {
|
||||
color: #dc3545 !important;
|
||||
}
|
||||
|
||||
.react-router-appear {
|
||||
opacity: 0;
|
||||
transition: opacity ease-in-out 300ms;
|
||||
}
|
||||
|
||||
.react-router-appear-done {
|
||||
opacity: 1;
|
||||
transition: opacity ease-in-out 300ms;
|
||||
}
|
||||
|
||||
img.header {
|
||||
width: 98vw;
|
||||
max-width: 128px;
|
||||
}
|
||||
|
||||
.switch-nav-item, .switch-nav-item * {
|
||||
cursor: pointer !important;
|
||||
color: #fff;
|
||||
}
|
||||
|
|
@ -1,36 +1,34 @@
|
|||
const defaultState = {
|
||||
isAuthenticated: false,
|
||||
user: null,
|
||||
posts: null,
|
||||
editingPost: null,
|
||||
// editingPost: {
|
||||
// id: null,
|
||||
// title: null,
|
||||
// contents: null,
|
||||
// },
|
||||
};
|
||||
|
||||
export default function reducer(
|
||||
state = defaultState,
|
||||
action,
|
||||
) {
|
||||
switch (action.type) {
|
||||
case 'SET_USER':
|
||||
return {
|
||||
...state,
|
||||
user: {
|
||||
...action.user,
|
||||
},
|
||||
isAuthenticated: true,
|
||||
};
|
||||
case 'CLEAR_USER':
|
||||
return {
|
||||
...state,
|
||||
user: null,
|
||||
isAuthenticated: false,
|
||||
};
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
isAuthenticated: false,
|
||||
user: null,
|
||||
mc114: true,
|
||||
};
|
||||
|
||||
export default function reducer(
|
||||
state = defaultState,
|
||||
action,
|
||||
) {
|
||||
switch (action.type) {
|
||||
case 'SET_USER':
|
||||
return {
|
||||
...state,
|
||||
user: {
|
||||
...action.user,
|
||||
},
|
||||
isAuthenticated: true,
|
||||
};
|
||||
case 'CLEAR_USER':
|
||||
return {
|
||||
...state,
|
||||
user: null,
|
||||
isAuthenticated: false,
|
||||
};
|
||||
case 'TOGGLE_MC_VER':
|
||||
return {
|
||||
...state,
|
||||
mc114: !state.mc114,
|
||||
};
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue