From 42a8f84c062a68a26a6e0aeb80dbb6b965f4aa28 Mon Sep 17 00:00:00 2001 From: Darren Swan Date: Sat, 20 Aug 2022 00:53:46 -0500 Subject: [PATCH 1/3] updating packages --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index dc05376..36910c8 100644 --- a/package.json +++ b/package.json @@ -3,8 +3,8 @@ "version": "0.1.0", "private": true, "dependencies": { - "axios": "^0.24.0", - "bootstrap": "^5.1.3", + "axios": "^0.27.2", + "bootstrap": "^5.2.0", "formik": "^2.2.9", "lodash": "^4.17.21", "node-gyp": "^8.4.0", From 9571df52744a6319cf792c798fffc41207e68ac3 Mon Sep 17 00:00:00 2001 From: Darren Swan Date: Sat, 20 Aug 2022 22:29:28 -0500 Subject: [PATCH 2/3] Updating dev dependencies, and white space changes --- package.json | 7 +++--- src/App.scss | 2 +- src/Components/DraggableListGroup.scss | 2 +- src/Components/FormCheck.scss | 2 +- src/Components/Navigation.scss | 24 +++++++++--------- src/Components/Section.scss | 2 +- src/Data/Boards.json | 8 ++++-- src/Data/Buttons.json | 2 +- src/Data/Controllers.json | 2 +- src/Pages/HomePage.js | 6 ++--- src/Pages/LEDConfigPage.js | 14 +++++------ src/Pages/PinMapping.js | 4 +-- src/Pages/PinMappings.scss | 5 ++-- src/Pages/SettingsPage.js | 4 +-- src/Services/WebApi.js | 34 +++++++++++++------------- src/index.scss | 2 +- 16 files changed, 63 insertions(+), 57 deletions(-) diff --git a/package.json b/package.json index 36910c8..49734ec 100644 --- a/package.json +++ b/package.json @@ -44,10 +44,11 @@ ] }, "devDependencies": { - "concurrently": "^6.3.0", + "concurrently": "^6.5.1", "cors": "^2.8.5", - "express": "^4.17.1", + "eslint": "^8.22.0", + "express": "^4.18.1", "node-sass": "^7.0.1", - "nodemon": "^2.0.15" + "nodemon": "^2.0.19" } } diff --git a/src/App.scss b/src/App.scss index 10c129c..b23418e 100644 --- a/src/App.scss +++ b/src/App.scss @@ -5,4 +5,4 @@ margin-top: 56px; flex-direction: column; padding: 10px 20px; -} +} \ No newline at end of file diff --git a/src/Components/DraggableListGroup.scss b/src/Components/DraggableListGroup.scss index 9faea57..1f0b797 100644 --- a/src/Components/DraggableListGroup.scss +++ b/src/Components/DraggableListGroup.scss @@ -22,4 +22,4 @@ .draggable-list { flex-direction: row; -} +} \ No newline at end of file diff --git a/src/Components/FormCheck.scss b/src/Components/FormCheck.scss index 4200350..517ecce 100644 --- a/src/Components/FormCheck.scss +++ b/src/Components/FormCheck.scss @@ -1,3 +1,3 @@ .form-check-input { margin-top: 0; -} +} \ No newline at end of file diff --git a/src/Components/Navigation.scss b/src/Components/Navigation.scss index 8bcb100..26772d6 100644 --- a/src/Components/Navigation.scss +++ b/src/Components/Navigation.scss @@ -3,7 +3,8 @@ margin: -6px 8px 0 12px; } -.nav-link, .nav-item * { +.nav-link, +.nav-item * { font-size: 0.875rem; } @@ -22,16 +23,17 @@ } @media (prefers-reduced-motion: no-preference) { - .title-logo { - animation: clockwise-spin infinite 20s linear; - } + .title-logo { + animation: clockwise-spin infinite 20s linear; + } } @keyframes clockwise-spin { - from { - transform: rotate(0deg); - } - to { - transform: rotate(360deg); - } -} + from { + transform: rotate(0deg); + } + + to { + transform: rotate(360deg); + } +} \ No newline at end of file diff --git a/src/Components/Section.scss b/src/Components/Section.scss index e753334..f84dedf 100644 --- a/src/Components/Section.scss +++ b/src/Components/Section.scss @@ -1,3 +1,3 @@ .card { margin-bottom: 10px; -} +} \ No newline at end of file diff --git a/src/Data/Boards.json b/src/Data/Boards.json index 95e95c8..2b65b24 100644 --- a/src/Data/Boards.json +++ b/src/Data/Boards.json @@ -2,7 +2,11 @@ "pico": { "minPin": 0, "maxPin": 29, - "analogPins": [26, 27, 28], + "analogPins": [ + 26, + 27, + 28 + ], "invalidPins": [] } -} +} \ No newline at end of file diff --git a/src/Data/Buttons.json b/src/Data/Buttons.json index 70c65e6..85ca038 100644 --- a/src/Data/Buttons.json +++ b/src/Data/Buttons.json @@ -131,4 +131,4 @@ "A1": "13", "A2": "14" } -} +} \ No newline at end of file diff --git a/src/Data/Controllers.json b/src/Data/Controllers.json index 5af7b85..149a88a 100644 --- a/src/Data/Controllers.json +++ b/src/Data/Controllers.json @@ -41,4 +41,4 @@ "A1": "28", "A2": "18" } -} +} \ No newline at end of file diff --git a/src/Pages/HomePage.js b/src/Pages/HomePage.js index e036193..7dc97e5 100644 --- a/src/Pages/HomePage.js +++ b/src/Pages/HomePage.js @@ -24,8 +24,8 @@ export default function HomePage() {

Please select a menu option to proceed.

-
Current Version: { currentVersion }
-
Latest Version: { latestVersion }
+
Current Version: {currentVersion}
+
Latest Version: {latestVersion}
{(latestVersion && currentVersion !== latestVersion) ?
- : null} + : null}
diff --git a/src/Pages/LEDConfigPage.js b/src/Pages/LEDConfigPage.js index 691a3f5..22ceca3 100644 --- a/src/Pages/LEDConfigPage.js +++ b/src/Pages/LEDConfigPage.js @@ -36,13 +36,13 @@ const defaultValue = { let usedPins = []; const schema = yup.object().shape({ - brightnessMaximum : yup.number().required().positive().integer().min(0).max(255).label('Max Brightness'), - brightnessSteps : yup.number().required().positive().integer().min(1).max(10).label('Brightness Steps'), + brightnessMaximum: yup.number().required().positive().integer().min(0).max(255).label('Max Brightness'), + brightnessSteps: yup.number().required().positive().integer().min(1).max(10).label('Brightness Steps'), // eslint-disable-next-line no-template-curly-in-string - dataPin : yup.number().required().min(-1).max(29).test('', '${originalValue} is already assigned!', (value) => usedPins.indexOf(value) === -1).label('Data Pin'), - ledFormat : yup.number().required().positive().integer().min(0).max(3).label('LED Format'), - ledLayout : yup.number().required().positive().integer().min(0).max(2).label('LED Layout'), - ledsPerButton : yup.number().required().positive().integer().min(1).label('LEDs Per Pixel'), + dataPin: yup.number().required().min(-1).max(29).test('', '${originalValue} is already assigned!', (value) => usedPins.indexOf(value) === -1).label('Data Pin'), + ledFormat: yup.number().required().positive().integer().min(0).max(3).label('LED Format'), + ledLayout: yup.number().required().positive().integer().min(0).max(2).label('LED Layout'), + ledsPerButton: yup.number().required().positive().integer().min(1).label('LEDs Per Pixel'), }); const getLedButtons = (buttonLabels, map, excludeNulls) => { @@ -162,7 +162,7 @@ export default function LEDConfigPage() { error={errors.ledFormat} isInvalid={errors.ledFormat} onChange={handleChange} - > + > {LED_FORMATS.map((o, i) => )} { - const newMappings = {...buttonMappings}; + const newMappings = { ...buttonMappings }; if (e.target.value) newMappings[prop].pin = parseInt(e.target.value); else @@ -40,7 +40,7 @@ export default function PinMappingPage() { e.preventDefault(); e.stopPropagation(); - let mappings = {...buttonMappings}; + let mappings = { ...buttonMappings }; validateMappings(mappings); if (Object.keys(mappings).filter(p => !!mappings[p].error).length) { diff --git a/src/Pages/PinMappings.scss b/src/Pages/PinMappings.scss index 5cbc72d..c05fc59 100644 --- a/src/Pages/PinMappings.scss +++ b/src/Pages/PinMappings.scss @@ -10,7 +10,7 @@ table.pin-mapping-table { display: inline-block; width: 80px; - + .invalid-feedback { + +.invalid-feedback { display: inline; margin-left: 20px; margin-right: 10px; @@ -30,5 +30,4 @@ table.pin-mapping-table { line-height: 2rem; margin-right: 10px; } -} - +} \ No newline at end of file diff --git a/src/Pages/SettingsPage.js b/src/Pages/SettingsPage.js index eda8062..a547dab 100644 --- a/src/Pages/SettingsPage.js +++ b/src/Pages/SettingsPage.js @@ -24,9 +24,9 @@ const SOCD_MODES = [ ]; const schema = yup.object().shape({ - dpadMode : yup.number().required().oneOf(DPAD_MODES.map(o => o.value)).label('D-Pad Mode'), + dpadMode: yup.number().required().oneOf(DPAD_MODES.map(o => o.value)).label('D-Pad Mode'), inputMode: yup.number().required().oneOf(INPUT_MODES.map(o => o.value)).label('Input Mode'), - socdMode : yup.number().required().oneOf(SOCD_MODES.map(o => o.value)).label('SOCD Mode'), + socdMode: yup.number().required().oneOf(SOCD_MODES.map(o => o.value)).label('SOCD Mode'), }); const FormContext = () => { diff --git a/src/Services/WebApi.js b/src/Services/WebApi.js index aa58052..918af9b 100644 --- a/src/Services/WebApi.js +++ b/src/Services/WebApi.js @@ -3,24 +3,24 @@ import axios from 'axios'; const baseUrl = process.env.NODE_ENV === 'production' ? '' : 'http://localhost:8080'; export const baseButtonMappings = { - Up: { pin: -1, error: null }, - Down: { pin: -1, error: null }, - Left: { pin: -1, error: null }, + Up: { pin: -1, error: null }, + Down: { pin: -1, error: null }, + Left: { pin: -1, error: null }, Right: { pin: -1, error: null }, - B1: { pin: -1, error: null }, - B2: { pin: -1, error: null }, - B3: { pin: -1, error: null }, - B4: { pin: -1, error: null }, - L1: { pin: -1, error: null }, - R1: { pin: -1, error: null }, - L2: { pin: -1, error: null }, - R2: { pin: -1, error: null }, - S1: { pin: -1, error: null }, - S2: { pin: -1, error: null }, - L3: { pin: -1, error: null }, - R3: { pin: -1, error: null }, - A1: { pin: -1, error: null }, - A2: { pin: -1, error: null }, + B1: { pin: -1, error: null }, + B2: { pin: -1, error: null }, + B3: { pin: -1, error: null }, + B4: { pin: -1, error: null }, + L1: { pin: -1, error: null }, + R1: { pin: -1, error: null }, + L2: { pin: -1, error: null }, + R2: { pin: -1, error: null }, + S1: { pin: -1, error: null }, + S2: { pin: -1, error: null }, + L3: { pin: -1, error: null }, + R3: { pin: -1, error: null }, + A1: { pin: -1, error: null }, + A2: { pin: -1, error: null }, }; async function resetSettings() { diff --git a/src/index.scss b/src/index.scss index 4c72427..a04e2f3 100644 --- a/src/index.scss +++ b/src/index.scss @@ -49,4 +49,4 @@ input.form-control { .card-header { background-color: $primary; color: $white; -} +} \ No newline at end of file From b23859307af3c57df8f2e8aa057f00a3ecdf6d66 Mon Sep 17 00:00:00 2001 From: Darren Swan Date: Sat, 20 Aug 2022 22:34:12 -0500 Subject: [PATCH 3/3] package updates --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 49734ec..2221a77 100644 --- a/package.json +++ b/package.json @@ -7,12 +7,12 @@ "bootstrap": "^5.2.0", "formik": "^2.2.9", "lodash": "^4.17.21", - "node-gyp": "^8.4.0", + "node-gyp": "^8.4.1", "react": "^17.0.2", "react-beautiful-dnd": "^13.1.0", - "react-bootstrap": "^2.0.2", + "react-bootstrap": "^2.5.0", "react-dom": "^17.0.2", - "react-router-dom": "^5.3.0", + "react-router-dom": "^5.3.3", "react-scripts": "^5.0.1", "yup": "^0.32.11" },