aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--package-lock.json378
-rw-r--r--package.json23
-rw-r--r--public/favicon.pngbin0 -> 375 bytes
-rw-r--r--public/index.html1
-rw-r--r--src/components/ContentSection/ContentSection.js42
-rw-r--r--src/components/Header/Header.js72
-rw-r--r--src/components/Loading/Loading.js3
-rw-r--r--src/components/SmartList/SmartList.js28
-rw-r--r--src/components/SolutionCard/SolutionCard.js18
-rw-r--r--src/components/Window/Window.js55
-rw-r--r--src/components/Window/WindowSurface/WindowSurface.js33
-rw-r--r--src/index.js34
-rw-r--r--src/pages/Contribute/Contribute.js11
-rw-r--r--src/pages/Profile/Profile.js11
-rw-r--r--src/pages/Profile/Registration/Registration.js6
-rw-r--r--src/pages/Scoreboard/Scoreboard.js6
-rw-r--r--src/pages/Timer/Timer.js13
-rw-r--r--src/pages/Timer/TimerButton/TimerButton.js6
-rw-r--r--src/theme.js24
19 files changed, 336 insertions, 428 deletions
diff --git a/package-lock.json b/package-lock.json
index 3972c8d..4f6aef0 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1231,14 +1231,14 @@
}
},
"@material-ui/core": {
- "version": "4.8.2",
- "resolved": "https://registry.npmjs.org/@material-ui/core/-/core-4.8.2.tgz",
- "integrity": "sha512-4dILME6TVCTyi9enavqbYLU8HueaX5YQxfn2IiCiGwHpqp4pIhJCVUVlBf0ADG6lL2K1tWrsawGs/hePpHxAYw==",
+ "version": "4.9.0",
+ "resolved": "https://registry.npmjs.org/@material-ui/core/-/core-4.9.0.tgz",
+ "integrity": "sha512-zrrr8mPU5DDBYaVil4uJYauW41PjSn5otn7cqGsmWOY0t90fypr9nNgM7rRJaPz2AP6oRSDx1kBQt2igf5uelg==",
"requires": {
"@babel/runtime": "^7.4.4",
- "@material-ui/styles": "^4.8.2",
+ "@material-ui/styles": "^4.9.0",
"@material-ui/system": "^4.7.1",
- "@material-ui/types": "^4.1.1",
+ "@material-ui/types": "^5.0.0",
"@material-ui/utils": "^4.7.1",
"@types/react-transition-group": "^4.2.0",
"clsx": "^1.0.2",
@@ -1260,25 +1260,25 @@
}
},
"@material-ui/styles": {
- "version": "4.8.2",
- "resolved": "https://registry.npmjs.org/@material-ui/styles/-/styles-4.8.2.tgz",
- "integrity": "sha512-r5U+93pkpwQOmHTmwyn2sqTio6PHd873xvSHiKP6fdybAXXX6CZgVvh3W8saZNbYr/QXsS8OHmFv7sYJLt5Yfg==",
+ "version": "4.9.0",
+ "resolved": "https://registry.npmjs.org/@material-ui/styles/-/styles-4.9.0.tgz",
+ "integrity": "sha512-nJHum4RqYBPWsjL/9JET8Z02FZ9gSizlg/7LWVFpIthNzpK6OQ5OSRR4T4x9/p+wK3t1qNn3b1uI4XpnZaPxOA==",
"requires": {
"@babel/runtime": "^7.4.4",
"@emotion/hash": "^0.7.4",
- "@material-ui/types": "^4.1.1",
+ "@material-ui/types": "^5.0.0",
"@material-ui/utils": "^4.7.1",
"clsx": "^1.0.2",
"csstype": "^2.5.2",
"hoist-non-react-statics": "^3.2.1",
- "jss": "^10.0.0",
- "jss-plugin-camel-case": "^10.0.0",
- "jss-plugin-default-unit": "^10.0.0",
- "jss-plugin-global": "^10.0.0",
- "jss-plugin-nested": "^10.0.0",
- "jss-plugin-props-sort": "^10.0.0",
- "jss-plugin-rule-value-function": "^10.0.0",
- "jss-plugin-vendor-prefixer": "^10.0.0",
+ "jss": "^10.0.3",
+ "jss-plugin-camel-case": "^10.0.3",
+ "jss-plugin-default-unit": "^10.0.3",
+ "jss-plugin-global": "^10.0.3",
+ "jss-plugin-nested": "^10.0.3",
+ "jss-plugin-props-sort": "^10.0.3",
+ "jss-plugin-rule-value-function": "^10.0.3",
+ "jss-plugin-vendor-prefixer": "^10.0.3",
"prop-types": "^15.7.2"
}
},
@@ -1293,12 +1293,9 @@
}
},
"@material-ui/types": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/@material-ui/types/-/types-4.1.1.tgz",
- "integrity": "sha512-AN+GZNXytX9yxGi0JOfxHrRTbhFybjUJ05rnsBVjcB+16e466Z0Xe5IxawuOayVZgTBNDxmPKo5j4V6OnMtaSQ==",
- "requires": {
- "@types/react": "*"
- }
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/@material-ui/types/-/types-5.0.0.tgz",
+ "integrity": "sha512-UeH2BuKkwDndtMSS0qgx1kCzSMw+ydtj0xx/XbFtxNSTlXydKwzs5gVW5ZKsFlAkwoOOQ9TIsyoCC8hq18tOwg=="
},
"@material-ui/utils": {
"version": "4.7.1",
@@ -1452,11 +1449,12 @@
}
},
"@testing-library/jest-dom": {
- "version": "4.2.4",
- "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-4.2.4.tgz",
- "integrity": "sha512-j31Bn0rQo12fhCWOUWy9fl7wtqkp7In/YP2p5ZFyRuiiB9Qs3g+hS4gAmDWONbAHcRmVooNJ5eOHQDCOmUFXHg==",
+ "version": "5.0.2",
+ "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-5.0.2.tgz",
+ "integrity": "sha512-Pl3si4eH88+5wlVz6NjecLfeO7PjTbbgWKwVZXUtBfrGuJLjGdUUo+O92XRu/59wft8HAmwvXHeMWpqWTg2Uwg==",
"requires": {
"@babel/runtime": "^7.5.1",
+ "@types/testing-library__jest-dom": "^5.0.0",
"chalk": "^2.4.1",
"css": "^2.2.3",
"css.escape": "^1.5.1",
@@ -1488,9 +1486,9 @@
}
},
"@testing-library/user-event": {
- "version": "7.2.1",
- "resolved": "https://registry.npmjs.org/@testing-library/user-event/-/user-event-7.2.1.tgz",
- "integrity": "sha512-oZ0Ib5I4Z2pUEcoo95cT1cr6slco9WY7yiPpG+RGNkj8YcYgJnM7pXmYmorNOReh8MIGcKSqXyeGjxnr8YiZbA=="
+ "version": "8.0.5",
+ "resolved": "https://registry.npmjs.org/@testing-library/user-event/-/user-event-8.0.5.tgz",
+ "integrity": "sha512-CqD1k385OQ02UnyZ+2SlHT3hCGk7GF5N6A941/g3fbYrVYgdQNEqM89oTm52tCL629NYC9TxCyy5rGQz41YE3g=="
},
"@types/babel__core": {
"version": "7.1.3",
@@ -1529,6 +1527,11 @@
"@babel/types": "^7.3.0"
}
},
+ "@types/color-name": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz",
+ "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ=="
+ },
"@types/eslint-visitor-keys": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz",
@@ -1571,6 +1574,111 @@
"@types/istanbul-lib-report": "*"
}
},
+ "@types/jest": {
+ "version": "25.1.0",
+ "resolved": "https://registry.npmjs.org/@types/jest/-/jest-25.1.0.tgz",
+ "integrity": "sha512-MYX8LpNQboef1NDZQTchM5poL8WITRVG/4/1XLK/Xsamjptsvgb8ELTRoXixBARi+a81mMT4n2hooqaydEOE9A==",
+ "requires": {
+ "jest-diff": "^25.1.0"
+ },
+ "dependencies": {
+ "@jest/types": {
+ "version": "25.1.0",
+ "resolved": "https://registry.npmjs.org/@jest/types/-/types-25.1.0.tgz",
+ "integrity": "sha512-VpOtt7tCrgvamWZh1reVsGADujKigBUFTi19mlRjqEGsE8qH4r3s+skY33dNdXOwyZIvuftZ5tqdF1IgsMejMA==",
+ "requires": {
+ "@types/istanbul-lib-coverage": "^2.0.0",
+ "@types/istanbul-reports": "^1.1.1",
+ "@types/yargs": "^15.0.0",
+ "chalk": "^3.0.0"
+ }
+ },
+ "@types/yargs": {
+ "version": "15.0.2",
+ "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.2.tgz",
+ "integrity": "sha512-hFkuAp58M2xOc1QgJhkFrLMnqa8KWTFRTnzrI1zlEcOfg3DZ0eH3aPAo/N6QlVVu8E4KS4xD1jtEG3rdQYFmIg==",
+ "requires": {
+ "@types/yargs-parser": "*"
+ }
+ },
+ "ansi-styles": {
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz",
+ "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
+ "requires": {
+ "@types/color-name": "^1.1.1",
+ "color-convert": "^2.0.1"
+ }
+ },
+ "chalk": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz",
+ "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==",
+ "requires": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ }
+ },
+ "color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "requires": {
+ "color-name": "~1.1.4"
+ }
+ },
+ "color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
+ },
+ "diff-sequences": {
+ "version": "25.1.0",
+ "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-25.1.0.tgz",
+ "integrity": "sha512-nFIfVk5B/NStCsJ+zaPO4vYuLjlzQ6uFvPxzYyHlejNZ/UGa7G/n7peOXVrVNvRuyfstt+mZQYGpjxg9Z6N8Kw=="
+ },
+ "has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="
+ },
+ "jest-diff": {
+ "version": "25.1.0",
+ "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-25.1.0.tgz",
+ "integrity": "sha512-nepXgajT+h017APJTreSieh4zCqnSHEJ1iT8HDlewu630lSJ4Kjjr9KNzm+kzGwwcpsDE6Snx1GJGzzsefaEHw==",
+ "requires": {
+ "chalk": "^3.0.0",
+ "diff-sequences": "^25.1.0",
+ "jest-get-type": "^25.1.0",
+ "pretty-format": "^25.1.0"
+ }
+ },
+ "jest-get-type": {
+ "version": "25.1.0",
+ "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-25.1.0.tgz",
+ "integrity": "sha512-yWkBnT+5tMr8ANB6V+OjmrIJufHtCAqI5ic2H40v+tRqxDmE0PGnIiTyvRWFOMtmVHYpwRqyazDbTnhpjsGvLw=="
+ },
+ "pretty-format": {
+ "version": "25.1.0",
+ "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-25.1.0.tgz",
+ "integrity": "sha512-46zLRSGLd02Rp+Lhad9zzuNZ+swunitn8zIpfD2B4OPCRLXbM87RJT2aBLBWYOznNUML/2l/ReMyWNC80PJBUQ==",
+ "requires": {
+ "@jest/types": "^25.1.0",
+ "ansi-regex": "^5.0.0",
+ "ansi-styles": "^4.0.0",
+ "react-is": "^16.12.0"
+ }
+ },
+ "supports-color": {
+ "version": "7.1.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz",
+ "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==",
+ "requires": {
+ "has-flag": "^4.0.0"
+ }
+ }
+ }
+ },
"@types/json-schema": {
"version": "7.0.4",
"resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.4.tgz",
@@ -1639,6 +1747,14 @@
"pretty-format": "^24.3.0"
}
},
+ "@types/testing-library__jest-dom": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/@types/testing-library__jest-dom/-/testing-library__jest-dom-5.0.0.tgz",
+ "integrity": "sha512-Pm+2mvqs9sND247oMVJbu3QmPUqMzBuJbY5uHHYQdl9MXq5hwWkTbesw1sPIky52Y0sHksWAZnVvGLbdyFSyrA==",
+ "requires": {
+ "@types/jest": "*"
+ }
+ },
"@types/testing-library__react": {
"version": "9.1.2",
"resolved": "https://registry.npmjs.org/@types/testing-library__react/-/testing-library__react-9.1.2.tgz",
@@ -1662,11 +1778,11 @@
"integrity": "sha512-gCubfBUZ6KxzoibJ+SCUc/57Ms1jz5NjHe4+dI2krNmU5zCPAphyLJYyTOg06ueIyfj+SaCUqmzun7ImlxDcKg=="
},
"@typescript-eslint/eslint-plugin": {
- "version": "2.15.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.15.0.tgz",
- "integrity": "sha512-XRJFznI5v4K1WvIrWmjFjBAdQWaUTz4xJEdqR7+wAFsv6Q9dP3mOlE6BMNT3pdlp9eF1+bC5m5LZTmLMqffCVw==",
+ "version": "2.18.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.18.0.tgz",
+ "integrity": "sha512-kuO8WQjV+RCZvAXVRJfXWiJ8iYEtfHlKgcqqqXg9uUkIolEHuUaMmm8/lcO4xwCOtaw6mY0gStn2Lg4/eUXXYQ==",
"requires": {
- "@typescript-eslint/experimental-utils": "2.15.0",
+ "@typescript-eslint/experimental-utils": "2.18.0",
"eslint-utils": "^1.4.3",
"functional-red-black-tree": "^1.0.1",
"regexpp": "^3.0.0",
@@ -1674,36 +1790,36 @@
}
},
"@typescript-eslint/experimental-utils": {
- "version": "2.15.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.15.0.tgz",
- "integrity": "sha512-Qkxu5zndY5hqlcQkmA88gfLvqQulMpX/TN91XC7OuXsRf4XG5xLGie0sbpX97o/oeccjeZYRMipIsjKk/tjDHA==",
+ "version": "2.18.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.18.0.tgz",
+ "integrity": "sha512-J6MopKPHuJYmQUkANLip7g9I82ZLe1naCbxZZW3O2sIxTiq/9YYoOELEKY7oPg0hJ0V/AQ225h2z0Yp+RRMXhw==",
"requires": {
"@types/json-schema": "^7.0.3",
- "@typescript-eslint/typescript-estree": "2.15.0",
+ "@typescript-eslint/typescript-estree": "2.18.0",
"eslint-scope": "^5.0.0"
}
},
"@typescript-eslint/parser": {
- "version": "2.15.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.15.0.tgz",
- "integrity": "sha512-6iSgQsqAYTaHw59t0tdjzZJluRAjswdGltzKEdLtcJOxR2UVTPHYvZRqkAVGCkaMVb6Fpa60NnuozNCvsSpA9g==",
+ "version": "2.18.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-2.18.0.tgz",
+ "integrity": "sha512-SJJPxFMEYEWkM6pGfcnjLU+NJIPo+Ko1QrCBL+i0+zV30ggLD90huEmMMhKLHBpESWy9lVEeWlQibweNQzyc+A==",
"requires": {
"@types/eslint-visitor-keys": "^1.0.0",
- "@typescript-eslint/experimental-utils": "2.15.0",
- "@typescript-eslint/typescript-estree": "2.15.0",
+ "@typescript-eslint/experimental-utils": "2.18.0",
+ "@typescript-eslint/typescript-estree": "2.18.0",
"eslint-visitor-keys": "^1.1.0"
}
},
"@typescript-eslint/typescript-estree": {
- "version": "2.15.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.15.0.tgz",
- "integrity": "sha512-L6Pog+w3VZzXkAdyqA0VlwybF8WcwZX+mufso86CMxSdWmcizJ38lgBdpqTbc9bo92iyi0rOvmATKiwl+amjxg==",
+ "version": "2.18.0",
+ "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.18.0.tgz",
+ "integrity": "sha512-gVHylf7FDb8VSi2ypFuEL3hOtoC4HkZZ5dOjXvVjoyKdRrvXAOPSzpNRnKMfaUUEiSLP8UF9j9X9EDLxC0lfZg==",
"requires": {
"debug": "^4.1.1",
"eslint-visitor-keys": "^1.1.0",
"glob": "^7.1.6",
"is-glob": "^4.0.1",
- "lodash.unescape": "4.0.1",
+ "lodash": "^4.17.15",
"semver": "^6.3.0",
"tsutils": "^3.17.1"
}
@@ -2219,12 +2335,11 @@
"integrity": "sha512-Uvq6hVe90D0B2WEnUqtdgY1bATGz3mw33nH9Y+dmA+w5DHvUmBgkr5rM/KCHpCsiFNRUfokW/szpPPgMK2hm4A=="
},
"axios": {
- "version": "0.19.0",
- "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.0.tgz",
- "integrity": "sha512-1uvKqKQta3KBxIz14F2v06AEHZ/dIoeKfbTRkK1E5oqjDnuEerLmYTgJB5AiQZHJcljpg1TuRzdjDR06qNk0DQ==",
+ "version": "0.19.2",
+ "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.2.tgz",
+ "integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==",
"requires": {
- "follow-redirects": "1.5.10",
- "is-buffer": "^2.0.2"
+ "follow-redirects": "1.5.10"
},
"dependencies": {
"debug": {
@@ -2243,11 +2358,6 @@
"debug": "=3.1.0"
}
},
- "is-buffer": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz",
- "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A=="
- },
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
@@ -5227,16 +5337,11 @@
}
}
},
- "eslint-plugin-eslint-plugin": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/eslint-plugin-eslint-plugin/-/eslint-plugin-eslint-plugin-2.2.0.tgz",
- "integrity": "sha512-X5+NT9a2GuwWyb3sHJdEEe6aD/30Fhi3/9XCmYHe/OSnWKUhmKOxFTfFM1AXZfJXjAoX7811bnoLI3fZr5AX5Q==",
- "dev": true
- },
"eslint-plugin-flowtype": {
- "version": "3.13.0",
- "resolved": "https://registry.npmjs.org/eslint-plugin-flowtype/-/eslint-plugin-flowtype-3.13.0.tgz",
- "integrity": "sha512-bhewp36P+t7cEV0b6OdmoRWJCBYRiHFlqPZAG1oS3SF+Y0LQkeDvFSM4oxoxvczD1OdONCXMlJfQFiWLcV9urw==",
+ "version": "4.6.0",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-flowtype/-/eslint-plugin-flowtype-4.6.0.tgz",
+ "integrity": "sha512-W5hLjpFfZyZsXfo5anlu7HM970JBDqbEshAJUkeczP6BFCIfJXuiIBQXyberLRtOStT0OGPF8efeTbxlHk4LpQ==",
+ "dev": true,
"requires": {
"lodash": "^4.17.15"
}
@@ -5412,21 +5517,20 @@
}
},
"eslint-plugin-react": {
- "version": "7.17.0",
- "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.17.0.tgz",
- "integrity": "sha512-ODB7yg6lxhBVMeiH1c7E95FLD4E/TwmFjltiU+ethv7KPdCwgiFuOZg9zNRHyufStTDLl/dEFqI2Q1VPmCd78A==",
+ "version": "7.18.0",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.18.0.tgz",
+ "integrity": "sha512-p+PGoGeV4SaZRDsXqdj9OWcOrOpZn8gXoGPcIQTzo2IDMbAKhNDnME9myZWqO3Ic4R3YmwAZ1lDjWl2R2hMUVQ==",
"dev": true,
"requires": {
- "array-includes": "^3.0.3",
+ "array-includes": "^3.1.1",
"doctrine": "^2.1.0",
- "eslint-plugin-eslint-plugin": "^2.1.0",
"has": "^1.0.3",
"jsx-ast-utils": "^2.2.3",
- "object.entries": "^1.1.0",
- "object.fromentries": "^2.0.1",
- "object.values": "^1.1.0",
+ "object.entries": "^1.1.1",
+ "object.fromentries": "^2.0.2",
+ "object.values": "^1.1.1",
"prop-types": "^15.7.2",
- "resolve": "^1.13.1"
+ "resolve": "^1.14.2"
},
"dependencies": {
"doctrine": {
@@ -5439,9 +5543,9 @@
}
},
"resolve": {
- "version": "1.14.2",
- "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.14.2.tgz",
- "integrity": "sha512-EjlOBLBO1kxsUxsKjLt7TAECyKW6fOh1VRkykQkKGzcBbjjPIxBqGh0jf7GJ3k/f5mxMqW3htMD3WdTUVtW8HQ==",
+ "version": "1.15.0",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.0.tgz",
+ "integrity": "sha512-+hTmAldEGE80U2wJJDC1lebb5jWqvTYAfm3YZ1ckk1gBr0MnCqUKlwK1e+anaFljIl+F5tR5IoZcm4ZDA1zMQw==",
"dev": true,
"requires": {
"path-parse": "^1.0.6"
@@ -5450,9 +5554,10 @@
}
},
"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": "2.3.0",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-2.3.0.tgz",
+ "integrity": "sha512-gLKCa52G4ee7uXzdLiorca7JIQZPPXRAQDXV83J4bUEeUuc5pIEyZYAZ45Xnxe5IuupxEqHS+hUhSLIimK1EMw==",
+ "dev": true
},
"eslint-scope": {
"version": "5.0.0",
@@ -6569,9 +6674,9 @@
}
},
"hoist-non-react-statics": {
- "version": "3.3.1",
- "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.1.tgz",
- "integrity": "sha512-wbg3bpgA/ZqWrZuMOeJi8+SKMhr7X9TesL/rXMjTzh0p0JUBo3II8DHboYbuIXWRlttrUFxwcu/5kygrCw8fJw==",
+ "version": "3.3.2",
+ "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz",
+ "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==",
"requires": {
"react-is": "^16.7.0"
}
@@ -8426,9 +8531,9 @@
}
},
"jss": {
- "version": "10.0.2",
- "resolved": "https://registry.npmjs.org/jss/-/jss-10.0.2.tgz",
- "integrity": "sha512-KHvrm43BSKx3D0k7+IOqsG9tsBlMpDdxx2mpleAtJVyAu5smKqaPg0Cg8ieElraYPrJT/d6xd1tYef/E1PvTaQ==",
+ "version": "10.0.3",
+ "resolved": "https://registry.npmjs.org/jss/-/jss-10.0.3.tgz",
+ "integrity": "sha512-AcDvFdOk16If9qvC9KN3oFXsrkHWM9+TaPMpVB9orm3z+nq1Xw3ofHyflRe/mkSucRZnaQtlhZs1hdP3DR9uRw==",
"requires": {
"@babel/runtime": "^7.3.1",
"csstype": "^2.6.5",
@@ -8437,69 +8542,69 @@
}
},
"jss-plugin-camel-case": {
- "version": "10.0.2",
- "resolved": "https://registry.npmjs.org/jss-plugin-camel-case/-/jss-plugin-camel-case-10.0.2.tgz",
- "integrity": "sha512-p7AoRGvW/XC3tvpxYY7oWo2Gkj73fynzNLj7jdLuJ29O13Q+UFjCFTxuDIikR4JCS/K2UJYlN5iBBLkE9Iirvg==",
+ "version": "10.0.3",
+ "resolved": "https://registry.npmjs.org/jss-plugin-camel-case/-/jss-plugin-camel-case-10.0.3.tgz",
+ "integrity": "sha512-rild/oFKFkmRP7AoiX9D6bdDAUfmJv8c7sEBvFoi+JP31dn2W8nw4txMKGnV1LJKlFkYprdZt1X99Uvztl1hug==",
"requires": {
"@babel/runtime": "^7.3.1",
"hyphenate-style-name": "^1.0.3",
- "jss": "10.0.2"
+ "jss": "^10.0.3"
}
},
"jss-plugin-default-unit": {
- "version": "10.0.2",
- "resolved": "https://registry.npmjs.org/jss-plugin-default-unit/-/jss-plugin-default-unit-10.0.2.tgz",
- "integrity": "sha512-9CL34uGxezD3YH07MVhmvN57kp+AlFLqLgwcUKJbYHDCEt7qcDP1cxSM4+jE6xkcAJ4Ba4lbLeDiPwqmDNzu4Q==",
+ "version": "10.0.3",
+ "resolved": "https://registry.npmjs.org/jss-plugin-default-unit/-/jss-plugin-default-unit-10.0.3.tgz",
+ "integrity": "sha512-n+XfVLPF9Qh7IOTdQ8M4oRpjpg6egjr/r0NNytubbCafMgCILJYIVrMTGgOTydH+uvak8onQY3f/F9hasPUx6g==",
"requires": {
"@babel/runtime": "^7.3.1",
- "jss": "10.0.2"
+ "jss": "^10.0.3"
}
},
"jss-plugin-global": {
- "version": "10.0.2",
- "resolved": "https://registry.npmjs.org/jss-plugin-global/-/jss-plugin-global-10.0.2.tgz",
- "integrity": "sha512-SP9l87fixLQbNdhd9Um/gNwcR/f4tTV4O3XeW55PhtQc125HAM3wK2rJiG3Acx0I+gQPizFLR3A6hkAzMuyGyQ==",
+ "version": "10.0.3",
+ "resolved": "https://registry.npmjs.org/jss-plugin-global/-/jss-plugin-global-10.0.3.tgz",
+ "integrity": "sha512-kNotkAciJIXpIGYnmueaIifBne9rdq31O8Xq1nF7KMfKlskNRANTcEX5rVnsGKl2yubTMYfjKBFCeDgcQn6+gA==",
"requires": {
"@babel/runtime": "^7.3.1",
- "jss": "10.0.2"
+ "jss": "^10.0.3"
}
},
"jss-plugin-nested": {
- "version": "10.0.2",
- "resolved": "https://registry.npmjs.org/jss-plugin-nested/-/jss-plugin-nested-10.0.2.tgz",
- "integrity": "sha512-TJkOesqzgBKycFOi7Xa8futjUD+eqbkFP+173o6DXpZ49tWQAvh4QERpnEEC1M1l6lAYrVRMJsyxfGiygG+mzQ==",
+ "version": "10.0.3",
+ "resolved": "https://registry.npmjs.org/jss-plugin-nested/-/jss-plugin-nested-10.0.3.tgz",
+ "integrity": "sha512-OMucRs9YLvWlZ3Ew+VhdgNVMwSS2zZy/2vy+s/etvopnPUzDHgCnJwdY2Wx/SlhLGERJeKKufyih2seH+ui0iw==",
"requires": {
"@babel/runtime": "^7.3.1",
- "jss": "10.0.2",
+ "jss": "^10.0.3",
"tiny-warning": "^1.0.2"
}
},
"jss-plugin-props-sort": {
- "version": "10.0.2",
- "resolved": "https://registry.npmjs.org/jss-plugin-props-sort/-/jss-plugin-props-sort-10.0.2.tgz",
- "integrity": "sha512-QYBcSqiiDINLDtKbtDPNEUVHwZPaOhsjW+vNVWpr0kmddDpvkBe3mOF+/qwxs8j/J5uzivpRwkRpJ0PBNPp6Sw==",
+ "version": "10.0.3",
+ "resolved": "https://registry.npmjs.org/jss-plugin-props-sort/-/jss-plugin-props-sort-10.0.3.tgz",
+ "integrity": "sha512-ufhvdCMnRcDa0tNHoZ12OcVNQQyE10yLMohxo/UIMarLV245rM6n9D19A12epjldRgyiS13SoSyLFCJEobprYg==",
"requires": {
"@babel/runtime": "^7.3.1",
- "jss": "10.0.2"
+ "jss": "^10.0.3"
}
},
"jss-plugin-rule-value-function": {
- "version": "10.0.2",
- "resolved": "https://registry.npmjs.org/jss-plugin-rule-value-function/-/jss-plugin-rule-value-function-10.0.2.tgz",
- "integrity": "sha512-uHVykv5yx7egBSDsX4/MTfuKyK3KKBKjo1kR+UL51rUOSYNhlxV6pmQ/e8PVBDQ6AKn1AP1pGzu+FamGwfhNUg==",
+ "version": "10.0.3",
+ "resolved": "https://registry.npmjs.org/jss-plugin-rule-value-function/-/jss-plugin-rule-value-function-10.0.3.tgz",
+ "integrity": "sha512-RWwIT2UBAIwf3f6DQtt5gyjxHMRJoeO9TQku+ueR8dBMakqSSe8vFwQNfjXEoe0W+Tez5HZCTkZKNMulv3Z+9A==",
"requires": {
"@babel/runtime": "^7.3.1",
- "jss": "10.0.2"
+ "jss": "^10.0.3"
}
},
"jss-plugin-vendor-prefixer": {
- "version": "10.0.2",
- "resolved": "https://registry.npmjs.org/jss-plugin-vendor-prefixer/-/jss-plugin-vendor-prefixer-10.0.2.tgz",
- "integrity": "sha512-H7xUJ4+WVcwIl0a6sAyQ/SKf7ZUkD57NPEMCblxUd2iIHJ+CSNt3bD/P5hSBR+AQ/ulOweJMBj+LnJ1Uwo1xpw==",
+ "version": "10.0.3",
+ "resolved": "https://registry.npmjs.org/jss-plugin-vendor-prefixer/-/jss-plugin-vendor-prefixer-10.0.3.tgz",
+ "integrity": "sha512-zVs6e5z4tFRK/fJ5kuTLzXlTFQbLeFTVwk7lTZiYNufmZwKT0kSmnOJDUukcSe7JLGSRztjWhnHB/6voP174gw==",
"requires": {
"@babel/runtime": "^7.3.1",
"css-vendor": "^2.0.7",
- "jss": "10.0.2"
+ "jss": "^10.0.3"
}
},
"jsx-ast-utils": {
@@ -8703,11 +8808,6 @@
"lodash._reinterpolate": "^3.0.0"
}
},
- "lodash.unescape": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/lodash.unescape/-/lodash.unescape-4.0.1.tgz",
- "integrity": "sha1-vyJJiGzlFM2hEvrpIYzcBlIR/Jw="
- },
"lodash.uniq": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz",
@@ -9982,9 +10082,9 @@
}
},
"popper.js": {
- "version": "1.16.0",
- "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.0.tgz",
- "integrity": "sha512-+G+EkOPoE5S/zChTpmBSSDYmhXJ5PsW8eMhH8cP/CQHMFPBG/kC9Y5IIw6qNYgdJ+/COf0ddY2li28iHaZRSjw=="
+ "version": "1.16.1",
+ "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.1.tgz",
+ "integrity": "sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ=="
},
"portfinder": {
"version": "1.0.25",
@@ -11242,6 +11342,21 @@
"whatwg-fetch": "^3.0.0"
}
},
+ "react-benzin": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/react-benzin/-/react-benzin-1.0.1.tgz",
+ "integrity": "sha512-ZqU/SUYzqYJ8M0ozVv0y089rLXRZGRnsSnoCLYvnQLZFC2oE7fr7PfQd/aeleKvMic6Kx80IPfp2knLBGTgjtA==",
+ "requires": {
+ "@material-ui/core": "^4.9.0",
+ "@material-ui/icons": "^4.5.1",
+ "react": "^16.12.0",
+ "react-dom": "^16.12.0",
+ "react-scripts": "^3.3.0",
+ "react-virtualized-auto-sizer": "^1.0.2",
+ "react-window": "^1.8.5",
+ "typeface-roboto": "0.0.75"
+ }
+ },
"react-dev-utils": {
"version": "10.0.0",
"resolved": "https://registry.npmjs.org/react-dev-utils/-/react-dev-utils-10.0.0.tgz",
@@ -11480,6 +11595,14 @@
"isarray": "^1.0.0"
}
},
+ "eslint-plugin-flowtype": {
+ "version": "3.13.0",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-flowtype/-/eslint-plugin-flowtype-3.13.0.tgz",
+ "integrity": "sha512-bhewp36P+t7cEV0b6OdmoRWJCBYRiHFlqPZAG1oS3SF+Y0LQkeDvFSM4oxoxvczD1OdONCXMlJfQFiWLcV9urw==",
+ "requires": {
+ "lodash": "^4.17.15"
+ }
+ },
"eslint-plugin-import": {
"version": "2.18.2",
"resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.18.2.tgz",
@@ -11524,6 +11647,11 @@
}
}
},
+ "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",
@@ -13511,9 +13639,9 @@
"integrity": "sha512-VrR/IiH00Z1tFP4vDGfwZ1esNqTiDMchBEXYY9kilT6wRGgFoCAlgkEUMHb1E3mB0FsfZhv756IF0+R+SFPfdg=="
},
"typescript": {
- "version": "3.7.4",
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.7.4.tgz",
- "integrity": "sha512-A25xv5XCtarLwXpcDNZzCGvW2D1S3/bACratYBx2sax8PefsFhlYmkQicKHvpYflFS8if4zne5zT5kpJ7pzuvw=="
+ "version": "3.7.5",
+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.7.5.tgz",
+ "integrity": "sha512-/P5lkRXkWHNAbcJIiHPfRoKqyd7bsyCma1hZNUGfn20qm64T6ZBlrzprymeu918H+mB/0rIg2gGK/BXkhhYgBw=="
},
"uglify-js": {
"version": "3.4.10",
diff --git a/package.json b/package.json
index a808511..2fbbac4 100644
--- a/package.json
+++ b/package.json
@@ -4,26 +4,25 @@
"private": true,
"homepage": "https://eug-vs.github.io/chrono-cube",
"dependencies": {
- "@material-ui/core": "^4.8.2",
+ "@material-ui/core": "^4.9.0",
"@material-ui/icons": "^4.5.1",
- "@testing-library/jest-dom": "^4.2.4",
+ "@testing-library/jest-dom": "^5.0.2",
"@testing-library/react": "^9.4.0",
- "@testing-library/user-event": "^7.2.1",
- "axios": "^0.19.0",
+ "@testing-library/user-event": "^8.0.5",
+ "axios": "^0.19.2",
"gh-pages": "^2.2.0",
"react": "^16.12.0",
+ "react-benzin": "^1.0.1",
"react-dom": "^16.12.0",
"react-scripts": "3.3.0",
"react-virtualized-auto-sizer": "^1.0.2",
"react-window": "^1.8.5",
"typeface-roboto": "0.0.75",
- "typescript": "^3.7.4"
+ "typescript": "^3.7.5"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
- "test": "react-scripts test",
- "eject": "react-scripts eject",
"predeploy": "npm run build",
"deploy": "gh-pages -d build"
},
@@ -40,15 +39,15 @@
]
},
"devDependencies": {
- "@typescript-eslint/eslint-plugin": "^2.15.0",
- "@typescript-eslint/parser": "^2.15.0",
+ "@typescript-eslint/eslint-plugin": "^2.18.0",
+ "@typescript-eslint/parser": "^2.18.0",
"babel-eslint": "^10.0.3",
"eslint": "^6.8.0",
"eslint-config-react-app": "^5.1.0",
- "eslint-plugin-flowtype": "^3.13.0",
+ "eslint-plugin-flowtype": "^4.6.0",
"eslint-plugin-import": "^2.20.0",
"eslint-plugin-jsx-a11y": "^6.2.3",
- "eslint-plugin-react": "^7.17.0",
- "eslint-plugin-react-hooks": "^1.7.0"
+ "eslint-plugin-react": "^7.18.0",
+ "eslint-plugin-react-hooks": "^2.3.0"
}
}
diff --git a/public/favicon.png b/public/favicon.png
new file mode 100644
index 0000000..5991e63
--- /dev/null
+++ b/public/favicon.png
Binary files differ
diff --git a/public/index.html b/public/index.html
index f14ab80..0ecf8b9 100644
--- a/public/index.html
+++ b/public/index.html
@@ -1,6 +1,7 @@
<!DOCTYPE html>
<html lang="en">
<head>
+ <link rel="icon" type="image/png" sizes="16x16" href="./favicon.png" />
<title> ChronoCube </title>
</head>
<body>
diff --git a/src/components/ContentSection/ContentSection.js b/src/components/ContentSection/ContentSection.js
deleted file mode 100644
index 5108ce0..0000000
--- a/src/components/ContentSection/ContentSection.js
+++ /dev/null
@@ -1,42 +0,0 @@
-import React from 'react';
-
-import {
- Typography,
- Divider,
- makeStyles
-} from '@material-ui/core';
-
-
-const useStyles = makeStyles(theme => ({
- content: {
- padding: theme.spacing(0, 2, 1, 2),
- marginBottom: theme.spacing(1),
-
- '& a': {
- color: theme.palette.secondary.light,
- },
- '& .MuiButton-root': {
- color: theme.palette.background.paper,
- margin: theme.spacing(1, 2, 2, 0),
- fontWeight: 'bold',
- },
- },
-}));
-
-const ContentSection = ({ sectionName, children }) => {
- const classes = useStyles();
-
- return (
- <>
- <Typography variant="h4">{sectionName}</Typography>
- <Divider variant="middle"/>
- <Typography component="div" className={classes.content}>
- {children}
- </Typography>
- </>
- );
-
-};
-
-
-export default ContentSection;
diff --git a/src/components/Header/Header.js b/src/components/Header/Header.js
deleted file mode 100644
index 1595141..0000000
--- a/src/components/Header/Header.js
+++ /dev/null
@@ -1,72 +0,0 @@
-import React from 'react';
-
-import {
- AppBar,
- Tabs,
- Tab,
- Typography,
- Toolbar,
-} from '@material-ui/core';
-
-import { makeStyles } from '@material-ui/core/styles';
-import TimerIcon from '@material-ui/icons/Timer';
-import AccountCircleIcon from '@material-ui/icons/AccountCircle';
-import AssignmentIcon from '@material-ui/icons/Assignment';
-import GitHubIcon from '@material-ui/icons/GitHub';
-
-
-const useStyles = makeStyles(theme => ({
- logo: {
- color: theme.palette.secondary.main,
- margin: theme.spacing(0, 3, 0, 3),
- },
- tab: {
- '& .MuiTab-wrapper': {
- padding: theme.spacing(2),
- flexDirection: 'row',
- '& svg': {
- marginRight: theme.spacing(1),
- marginBottom: '0 !important',
- }
- }
- }
-}));
-
-
-const Header = ({ page, setPage }) => {
- const classes = useStyles();
-
- const handleChange = (event, newPage) => {
- setPage(newPage);
- };
-
- const icons = {
- app: (<TimerIcon />),
- profile: (<AccountCircleIcon />),
- scoreboard: (<AssignmentIcon />),
- contribute: (<GitHubIcon />),
- };
-
- return (
- <AppBar position="sticky">
- <Toolbar>
- <Typography variant="h4" className={classes.logo}>
- ChronoCube
- </Typography>
- <Tabs onChange={handleChange} value={page}>
- { Object.keys(icons).map(item => (
- <Tab
- label={item}
- icon={icons[item]}
- value={item}
- className={classes.tab}
- key={item}
- />
- ))}
- </Tabs>
- </Toolbar>
- </AppBar>
- );
-};
-
-export default Header;
diff --git a/src/components/Loading/Loading.js b/src/components/Loading/Loading.js
index e8b9701..e8793cc 100644
--- a/src/components/Loading/Loading.js
+++ b/src/components/Loading/Loading.js
@@ -12,6 +12,7 @@ import CircularProgress from '@material-ui/core/CircularProgress';
const useStyles = makeStyles(theme => ({
root: {
padding: theme.spacing(1),
+ background: theme.palette.background.elevation2,
},
}));
@@ -19,7 +20,7 @@ const Loading = () => {
const classes = useStyles();
return (
- <Card elevation={5} className={classes.root}>
+ <Card className={classes.root}>
<CardHeader
avatar={(<CircularProgress color="secondary" />)}
title="Loading"
diff --git a/src/components/SmartList/SmartList.js b/src/components/SmartList/SmartList.js
deleted file mode 100644
index b462c47..0000000
--- a/src/components/SmartList/SmartList.js
+++ /dev/null
@@ -1,28 +0,0 @@
-import React from 'react';
-
-import { FixedSizeList } from 'react-window';
-import AutoSizer from 'react-virtualized-auto-sizer';
-
-
-const SmartList = ({ itemSize, itemCount, renderItem }) => {
-
- return (
- <div style={{ flex: '1 1 auto', overflow: 'hidden' }}>
- <AutoSizer>
- {({ width, height }) => (
- <FixedSizeList
- height={height}
- width={width}
- itemSize={itemSize}
- itemCount={itemCount}
- >
- {renderItem}
- </FixedSizeList>
- )}
- </AutoSizer>
- </div>
- );
-};
-
-
-export default SmartList;
diff --git a/src/components/SolutionCard/SolutionCard.js b/src/components/SolutionCard/SolutionCard.js
index 8252347..fdd4bdf 100644
--- a/src/components/SolutionCard/SolutionCard.js
+++ b/src/components/SolutionCard/SolutionCard.js
@@ -15,6 +15,7 @@ import {
import { makeStyles } from '@material-ui/core/styles';
import TimerIcon from '@material-ui/icons/Timer';
import MoreVertIcon from '@material-ui/icons/MoreVert';
+import DeleteIcon from '@material-ui/icons/Delete';
import { del } from '../../requests';
@@ -30,12 +31,17 @@ const DATE_FORMAT = {
const useStyles = makeStyles(theme => ({
root: {
padding: theme.spacing(1),
+ background: theme.palette.background.elevation2,
'& .MuiTypography-h3': {
- color: theme.palette.secondary.main,
margin: theme.spacing(2),
},
},
+ menu: {
+ '& ul': {
+ background: theme.palette.background.elevation3,
+ }
+ },
}));
const SolutionCard = ({ data, removeThisCard }) => {
@@ -61,7 +67,7 @@ const SolutionCard = ({ data, removeThisCard }) => {
};
return (
- <Card elevation={5} className={classes.root}>
+ <Card className={classes.root}>
<CardHeader
avatar={
author === 'anonymous'?
@@ -82,8 +88,12 @@ const SolutionCard = ({ data, removeThisCard }) => {
open={Boolean(anchorEl)}
keepMounted
onClose={handleClose}
+ className={classes.menu}
>
- <MenuItem onClick={handleDelete}>Delete</MenuItem>
+ <MenuItem onClick={handleDelete}>
+ <DeleteIcon />
+ Delete
+ </MenuItem>
</Menu>
<CardContent>
<Grid container direction="row" justify="center" alignItems="center">
@@ -91,7 +101,7 @@ const SolutionCard = ({ data, removeThisCard }) => {
<TimerIcon/>
</Grid>
<Grid item>
- <Typography variant="h3">
+ <Typography variant="h3" color="primary">
{ data.result }
</Typography>
</Grid>
diff --git a/src/components/Window/Window.js b/src/components/Window/Window.js
deleted file mode 100644
index 0ba2454..0000000
--- a/src/components/Window/Window.js
+++ /dev/null
@@ -1,55 +0,0 @@
-import React from 'react';
-
-import { Typography, Divider, makeStyles } from '@material-ui/core';
-
-import WindowSurface from './WindowSurface/WindowSurface';
-
-
-const useStyles = makeStyles(theme => ({
- header: {
- padding: theme.spacing(1, 0, 1, 2),
- background: theme.palette.background.elevation,
- },
-}));
-
-
-const Window = ({ type, name, children }) => {
- const classes = useStyles();
-
- const size = {
- height: '85vh',
- };
-
- const position = {
- bottom: '3vh',
- };
-
- if (type === 'primary') {
- size.width = '63vw';
- position.left = '2vw';
- } else if (type === 'secondary') {
- size.width = '31vw';
- position.right = '2vw';
- } else if (type === 'mono') {
- position.left = '2vw';
- position.right = '2vw';
- }
-
- return (
- <WindowSurface
- size={size}
- position={position}
- >
- {name &&
- <div>
- <Typography variant="h5" className={classes.header}>{name}</Typography>
- <Divider />
- </div>
- }
- {children}
- </WindowSurface>
- );
-};
-
-
-export default Window;
diff --git a/src/components/Window/WindowSurface/WindowSurface.js b/src/components/Window/WindowSurface/WindowSurface.js
deleted file mode 100644
index 26fea01..0000000
--- a/src/components/Window/WindowSurface/WindowSurface.js
+++ /dev/null
@@ -1,33 +0,0 @@
-import React from 'react';
-
-import { Paper, makeStyles } from '@material-ui/core';
-
-
-const useStyles = makeStyles(theme => ({
- surface: {
- position: 'absolute',
- display: 'flex',
- flexDirection: 'column',
- background: theme.palette.background.elevation,
- overflowY: 'auto',
- scrollbarColor: `${theme.palette.primary.dark} ${theme.palette.primary.light}`,
- }
-}));
-
-
-const WindowSurface = ({ size, position, children }) => {
- const classes = useStyles();
-
- return (
- <Paper
- elevation={3}
- style={{...size, ...position}}
- className={classes.surface}
- >
- {children}
- </Paper>
- )
-};
-
-
-export default WindowSurface; \ No newline at end of file
diff --git a/src/index.js b/src/index.js
index 869ec3d..49c66e7 100644
--- a/src/index.js
+++ b/src/index.js
@@ -1,17 +1,23 @@
import React, { useState, useEffect } from 'react';
import ReactDOM from 'react-dom';
-import CssBaseline from '@material-ui/core/CssBaseline';
-import { ThemeProvider } from '@material-ui/core/styles';
+import {
+ BenzinThemeProvider,
+ Header,
+} from 'react-benzin';
+
import 'typeface-roboto';
-import theme from './theme';
-import Header from './components/Header/Header';
import Timer from './pages/Timer/Timer';
import Scoreboard from './pages/Scoreboard/Scoreboard';
import Contribute from './pages/Contribute/Contribute';
import Profile from './pages/Profile/Profile';
+import TimerIcon from '@material-ui/icons/Timer';
+import AccountCircleIcon from '@material-ui/icons/AccountCircle';
+import AssignmentIcon from '@material-ui/icons/Assignment';
+import GitHubIcon from '@material-ui/icons/GitHub';
+
import { get } from './requests';
@@ -21,6 +27,13 @@ const App = () => {
const [user, setUser] = useState({ username: 'anonymous', id: null });
const [recentSolutions, setRecentSolutions] = useState([]);
+ const headerContents = {
+ app: (<TimerIcon />),
+ profile: (<AccountCircleIcon />),
+ scoreboard: (<AssignmentIcon />),
+ contribute: (<GitHubIcon />),
+ };
+
useEffect(() => {
const userId = +localStorage.getItem('userId');
if (userId) {
@@ -57,11 +70,16 @@ const App = () => {
};
return (
- <ThemeProvider theme={theme}>
- <CssBaseline/>
- <Header page={page} setPage={setPage}/>
+ <BenzinThemeProvider>
+ <Header
+ logo={{
+ title: 'ChronoCube'
+ }}
+ contents={headerContents}
+ page={page}
+ setPage={setPage}/>
<Page page={page} />
- </ThemeProvider>
+ </BenzinThemeProvider>
);
};
diff --git a/src/pages/Contribute/Contribute.js b/src/pages/Contribute/Contribute.js
index d94cc80..aa1c3f7 100644
--- a/src/pages/Contribute/Contribute.js
+++ b/src/pages/Contribute/Contribute.js
@@ -15,8 +15,7 @@ import TrendingUpIcon from '@material-ui/icons/TrendingUp';
import BugReportIcon from '@material-ui/icons/BugReport';
import NewReleasesIcon from '@material-ui/icons/NewReleases';
-import Window from '../../components/Window/Window';
-import ContentSection from '../../components/ContentSection/ContentSection';
+import { Window, ContentSection } from 'react-benzin';
const useStyles = makeStyles(theme => ({
@@ -47,7 +46,7 @@ const Contribute = () => {
</p>
<Button
variant="contained"
- color="secondary"
+ color="primary"
startIcon={<TrendingUpIcon />}
href="https://github.com/users/Eug-VS/projects/3"
>
@@ -94,7 +93,7 @@ const Contribute = () => {
</p>
<Button
variant="contained"
- color="secondary"
+ color="primary"
startIcon={<NewReleasesIcon />}
href="https://github.com/Eug-VS/chrono-cube/issues/new"
>
@@ -102,7 +101,7 @@ const Contribute = () => {
</Button>
<Button
variant="contained"
- color="secondary"
+ color="primary"
startIcon={<BugReportIcon />}
href="https://github.com/Eug-VS/chrono-cube/issues/new"
>
@@ -142,7 +141,7 @@ const Contribute = () => {
</List>
<Button
variant="contained"
- color="secondary"
+ color="primary"
size="large"
href="https://github.com/users/Eug-VS/projects/3"
>
diff --git a/src/pages/Profile/Profile.js b/src/pages/Profile/Profile.js
index 783d497..65c3734 100644
--- a/src/pages/Profile/Profile.js
+++ b/src/pages/Profile/Profile.js
@@ -1,5 +1,4 @@
import React, { useState, useEffect } from 'react';
-import Window from '../../components/Window/Window';
import {
Button,
@@ -7,12 +6,16 @@ import {
} from '@material-ui/core';
import Registration from './Registration/Registration';
-import ContentSection from '../../components/ContentSection/ContentSection';
-import SmartList from '../../components/SmartList/SmartList';
+import {
+ Window,
+ ContentSection,
+ SmartList,
+} from 'react-benzin';
-import { get } from '../../requests';
import SolutionCard from '../../components/SolutionCard/SolutionCard';
+import { get } from '../../requests';
+
const useStyles = makeStyles(theme => ({
primary: {
diff --git a/src/pages/Profile/Registration/Registration.js b/src/pages/Profile/Registration/Registration.js
index af4ec30..b2d5503 100644
--- a/src/pages/Profile/Registration/Registration.js
+++ b/src/pages/Profile/Registration/Registration.js
@@ -8,8 +8,8 @@ import {
Grid,
} from '@material-ui/core';
-import ContentSection from '../../../components/ContentSection/ContentSection';
-import {get, post} from '../../../requests';
+import { ContentSection } from 'react-benzin';
+import { get, post } from '../../../requests';
const Registration = ({ setUser }) => {
@@ -67,7 +67,7 @@ const Registration = ({ setUser }) => {
/>
</Grid>
<Grid item>
- <Button variant="contained" color="secondary" size="large" onClick={handleSubmit}>
+ <Button variant="contained" color="secondary" onClick={handleSubmit}>
Submit!
</Button>
</Grid>
diff --git a/src/pages/Scoreboard/Scoreboard.js b/src/pages/Scoreboard/Scoreboard.js
index 335c06b..47c0899 100644
--- a/src/pages/Scoreboard/Scoreboard.js
+++ b/src/pages/Scoreboard/Scoreboard.js
@@ -2,12 +2,12 @@ import React, { useEffect, useState } from 'react';
import { makeStyles } from '@material-ui/core/styles';
-import { get } from '../../requests';
+import { Window, SmartList } from 'react-benzin';
-import SmartList from '../../components/SmartList/SmartList';
import SolutionCard from '../../components/SolutionCard/SolutionCard';
import Loading from '../../components/Loading/Loading';
-import Window from '../../components/Window/Window';
+
+import { get } from '../../requests';
const useStyles = makeStyles(theme => ({
diff --git a/src/pages/Timer/Timer.js b/src/pages/Timer/Timer.js
index 1323d97..6020c1b 100644
--- a/src/pages/Timer/Timer.js
+++ b/src/pages/Timer/Timer.js
@@ -2,10 +2,13 @@ import React from 'react';
import { post } from '../../requests';
-import Window from '../../components/Window/Window';
-import ContentSection from '../../components/ContentSection/ContentSection';
+import {
+ Window,
+ ContentSection,
+ SmartList,
+} from 'react-benzin';
+
import TimerButton from './TimerButton/TimerButton';
-import SmartList from '../../components/SmartList/SmartList';
import SolutionCard from '../../components/SolutionCard/SolutionCard';
import { Button, makeStyles } from '@material-ui/core';
@@ -63,12 +66,12 @@ const Timer = ({ user, recentSolutions, setRecentSolutions, setPage }) => {
Every speedcuber will benefit
from using it - both amateur and professional!
</p>
- <Button variant="contained" color="secondary" onClick={handleLearnMore}> Learn more </Button>
+ <Button variant="contained" color="primary" onClick={handleLearnMore}> Learn more </Button>
</ContentSection>
{user.id === null &&
<ContentSection sectionName="Log into an account">
<p> Tell us your name so we can track your progress</p>
- <Button variant="contained" color="secondary" onClick={handleLogin} size="large"> Login </Button>
+ <Button variant="contained" color="primary" onClick={handleLogin} size="large"> Login </Button>
</ContentSection>
}
<TimerButton registerResult={registerResult} />
diff --git a/src/pages/Timer/TimerButton/TimerButton.js b/src/pages/Timer/TimerButton/TimerButton.js
index 0f43c5a..fdb6b7c 100644
--- a/src/pages/Timer/TimerButton/TimerButton.js
+++ b/src/pages/Timer/TimerButton/TimerButton.js
@@ -7,7 +7,7 @@ const useStyles = makeStyles(theme => ({
root: {
textAlign: 'center',
padding: theme.spacing(5),
- background: theme.palette.primary.main,
+ background: theme.palette.background.elevation3,
marginTop: theme.spacing(10),
},
}));
@@ -74,7 +74,7 @@ const TimerButton = ({ registerResult }) => {
const composeHelperText = () => {
switch (mode) {
- case 'running': return '_';
+ case 'running': return 'Go fast!';
case 'countdown': return 'Release SPACE to begin';
case 'over': return 'You are too late!';
default: return 'Hold SPACE to start countdown';
@@ -90,7 +90,7 @@ const TimerButton = ({ registerResult }) => {
};
return (
- <Paper elevation={3} className={classes.root}>
+ <Paper className={classes.root}>
<Typography variant="h1"> {time} </Typography>
<Typography variant="h5" color={helperColor()}>
{composeHelperText()}
diff --git a/src/theme.js b/src/theme.js
deleted file mode 100644
index 3c671e6..0000000
--- a/src/theme.js
+++ /dev/null
@@ -1,24 +0,0 @@
-import { createMuiTheme } from '@material-ui/core/styles'
-
-const theme = createMuiTheme({
- palette: {
- type: 'dark',
- primary: {
- main: '#0a0909',
- },
- secondary: {
- main: '#ff7315',
- },
- background: {
- default: '#232020',
- paper: '#0f0e0e',
- elevation: 'rgba(255, 255, 255, 0.04)',
- },
- text: {
- primary: '#f4f4f4',
- secondary: '#6f6666',
- }
- },
-});
-
-export default theme;