diff --git a/package.json b/package.json
index dc05376..2221a77 100644
--- a/package.json
+++ b/package.json
@@ -3,16 +3,16 @@
"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",
+ "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"
},
@@ -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