From 093f025de3e97339750dc3df5be626a0315507dc Mon Sep 17 00:00:00 2001 From: Ben Woodward Date: Thu, 5 Aug 2021 12:12:17 -0700 Subject: Style and code refactor (#166) * Move all settings below card * refactor components; lifting state up * background color * Evergreen components for everything * password error * Tighten card size * Simply hide password to basic toggle, never disable * Hide password label, too * Maximize mobile portrait width * Make wifi tip smaller * Small style tweaks * Copy: update password length error text to include helpful instructions This will need a backfill for other translations * Remove unused css * Use empty string for EncryptionMode=None value * Remove light.min.css * Include logo on wificard * Cleanup after rebase * Clean-up comments on state * Padding for mobile --- package.json | 5 +- public/index.html | 1 - public/light.min.css | 2 - src/App.js | 173 ++++++++++++++++++++-------- src/components/Card.js | 225 ------------------------------------ src/components/Settings.js | 77 +++++++++++++ src/components/WifiCard.js | 148 ++++++++++++++++++++++++ src/components/style.css | 46 ++++---- src/i18n.js | 33 +++++- src/style.css | 7 +- yarn.lock | 280 ++++++++++++++++++++++++++++++++++++++++++--- 11 files changed, 669 insertions(+), 328 deletions(-) delete mode 100644 public/light.min.css delete mode 100644 src/components/Card.js create mode 100644 src/components/Settings.js create mode 100644 src/components/WifiCard.js diff --git a/package.json b/package.json index 9cec5bc..682d3bf 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "@testing-library/jest-dom": "^5.14.1", "@testing-library/react": "^12.0.0", "@testing-library/user-event": "^13.2.1", + "evergreen-ui": "^6.3.0", "i18next": "^20.3.5", "i18next-browser-languagedetector": "^6.1.2", "qrcode.react": "^1.0.1", @@ -15,8 +16,8 @@ "react-scripts": "^4.0.3" }, "devDependencies": { - "prettier": "2.3.2", - "husky": "^7.0.1" + "husky": "^7.0.1", + "prettier": "2.3.2" }, "scripts": { "start": "react-scripts start", diff --git a/public/index.html b/public/index.html index 4882353..4b04eb7 100644 --- a/public/index.html +++ b/public/index.html @@ -9,7 +9,6 @@ content="Print a simple card with your WiFi login details. Tape it to the fridge, keep it in your wallet, etc." /> -