Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
walidkayhan committed Dec 19, 2023
1 parent 75578b5 commit 0b38377
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 20 deletions.
2 changes: 1 addition & 1 deletion src/app/store/shortcuts.js
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ export const shortcuts = [
isActive: true,
category: SPINDLE_LASER_CATEGORY,
},
{ // Soft Reset
{
id: 71,
title: 'Mist Coolant',
keys: '',
Expand Down
22 changes: 9 additions & 13 deletions src/app/widgets/JogControl/Keypad.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
*
*/

/* eslint-disable react/self-closing-comp */
import ensureArray from 'ensure-array';
import frac from 'frac';
import _uniqueId from 'lodash/uniqueId';
Expand Down Expand Up @@ -177,10 +176,10 @@ class Keypad extends PureComponent {
return (
<div className={styles.keypad}>
<svg className={styles.hideSVG}>
<clipPath id="bl" clipPathUnits="objectBoundingBox"><path d="M0.565,0.565 C0.565,0.565,0.565,0.9,0.565,0.9 C0.564,0.957,0.535,0.998,0.475,1 C0.45,1,0.432,1,0.41,0.984 C0.379,0.962,0.335,0.854,0.318,0.815 C0.318,0.815,0.207,0.575,0.207,0.575 C0.207,0.575,0.099,0.34,0.099,0.34 C0.099,0.34,0.039,0.21,0.039,0.21 C0.019,0.168,-0.001,0.137,0,0.09 C0.002,0.029,0.048,-0.001,0.105,0 C0.139,0.001,0.179,0.024,0.21,0.039 C0.21,0.039,0.34,0.099,0.34,0.099 C0.34,0.099,0.575,0.207,0.575,0.207 C0.575,0.207,0.815,0.318,0.815,0.318 C0.815,0.318,0.925,0.369,0.925,0.369 C0.945,0.379,0.967,0.387,0.981,0.405 C0.999,0.428,1,0.447,1,0.475 C0.998,0.543,0.95,0.565,0.89,0.565 C0.89,0.565,0.565,0.565,0.565,0.565"></path></clipPath>
<clipPath id="br" clipPathUnits="objectBoundingBox"><path d="M0.435,0.565 C0.435,0.565,0.1,0.565,0.1,0.565 C0.043,0.564,0.002,0.535,0,0.475 C-0.001,0.447,0.001,0.428,0.019,0.405 C0.033,0.387,0.055,0.379,0.075,0.369 C0.075,0.369,0.185,0.318,0.185,0.318 C0.185,0.318,0.425,0.207,0.425,0.207 C0.425,0.207,0.66,0.099,0.66,0.099 C0.66,0.099,0.79,0.039,0.79,0.039 C0.831,0.019,0.863,-0.001,0.91,0 C0.971,0.002,1,0.048,1,0.105 C0.999,0.139,0.976,0.179,0.961,0.21 C0.961,0.21,0.901,0.34,0.901,0.34 C0.901,0.34,0.793,0.575,0.793,0.575 C0.793,0.575,0.682,0.815,0.682,0.815 C0.665,0.854,0.621,0.962,0.59,0.984 C0.568,1,0.55,1,0.525,1 C0.457,0.998,0.435,0.95,0.435,0.89 C0.435,0.89,0.435,0.565,0.435,0.565"></path></clipPath>
<clipPath id="fl" clipPathUnits="objectBoundingBox"><path d="M0.565,0.435 C0.565,0.435,0.565,0.1,0.565,0.1 C0.564,0.043,0.535,0.002,0.475,0 C0.45,-0.001,0.432,0,0.41,0.016 C0.379,0.038,0.335,0.146,0.318,0.185 C0.318,0.185,0.207,0.425,0.207,0.425 C0.207,0.425,0.099,0.66,0.099,0.66 C0.099,0.66,0.039,0.79,0.039,0.79 C0.019,0.831,-0.001,0.863,0,0.91 C0.002,0.971,0.048,1,0.105,1 C0.139,0.999,0.179,0.976,0.21,0.961 C0.21,0.961,0.34,0.901,0.34,0.901 C0.34,0.901,0.575,0.793,0.575,0.793 C0.575,0.793,0.815,0.682,0.815,0.682 C0.815,0.682,0.925,0.631,0.925,0.631 C0.945,0.621,0.967,0.613,0.981,0.594 C0.999,0.572,1,0.553,1,0.525 C0.998,0.457,0.95,0.435,0.89,0.435 C0.89,0.435,0.565,0.435,0.565,0.435"></path></clipPath>
<clipPath id="fr" clipPathUnits="objectBoundingBox"><path d="M0.435,0.435 C0.435,0.435,0.435,0.1,0.435,0.1 C0.436,0.043,0.465,0.002,0.525,0 C0.55,-0.001,0.568,0,0.59,0.016 C0.621,0.038,0.665,0.146,0.682,0.185 C0.682,0.185,0.793,0.425,0.793,0.425 C0.793,0.425,0.901,0.66,0.901,0.66 C0.901,0.66,0.961,0.79,0.961,0.79 C0.981,0.831,1,0.863,1,0.91 C0.998,0.971,0.952,1,0.895,1 C0.861,0.999,0.821,0.976,0.79,0.961 C0.79,0.961,0.66,0.901,0.66,0.901 C0.66,0.901,0.425,0.793,0.425,0.793 C0.425,0.793,0.185,0.682,0.185,0.682 C0.185,0.682,0.075,0.631,0.075,0.631 C0.055,0.621,0.033,0.613,0.019,0.594 C0.001,0.572,-0.001,0.553,0,0.525 C0.002,0.457,0.05,0.435,0.11,0.435 C0.11,0.435,0.435,0.435,0.435,0.435"></path></clipPath>
<clipPath id="bl" clipPathUnits="objectBoundingBox"><path d="M0.565,0.565 C0.565,0.565,0.565,0.9,0.565,0.9 C0.564,0.957,0.535,0.998,0.475,1 C0.45,1,0.432,1,0.41,0.984 C0.379,0.962,0.335,0.854,0.318,0.815 C0.318,0.815,0.207,0.575,0.207,0.575 C0.207,0.575,0.099,0.34,0.099,0.34 C0.099,0.34,0.039,0.21,0.039,0.21 C0.019,0.168,-0.001,0.137,0,0.09 C0.002,0.029,0.048,-0.001,0.105,0 C0.139,0.001,0.179,0.024,0.21,0.039 C0.21,0.039,0.34,0.099,0.34,0.099 C0.34,0.099,0.575,0.207,0.575,0.207 C0.575,0.207,0.815,0.318,0.815,0.318 C0.815,0.318,0.925,0.369,0.925,0.369 C0.945,0.379,0.967,0.387,0.981,0.405 C0.999,0.428,1,0.447,1,0.475 C0.998,0.543,0.95,0.565,0.89,0.565 C0.89,0.565,0.565,0.565,0.565,0.565" /></clipPath>
<clipPath id="br" clipPathUnits="objectBoundingBox"><path d="M0.435,0.565 C0.435,0.565,0.1,0.565,0.1,0.565 C0.043,0.564,0.002,0.535,0,0.475 C-0.001,0.447,0.001,0.428,0.019,0.405 C0.033,0.387,0.055,0.379,0.075,0.369 C0.075,0.369,0.185,0.318,0.185,0.318 C0.185,0.318,0.425,0.207,0.425,0.207 C0.425,0.207,0.66,0.099,0.66,0.099 C0.66,0.099,0.79,0.039,0.79,0.039 C0.831,0.019,0.863,-0.001,0.91,0 C0.971,0.002,1,0.048,1,0.105 C0.999,0.139,0.976,0.179,0.961,0.21 C0.961,0.21,0.901,0.34,0.901,0.34 C0.901,0.34,0.793,0.575,0.793,0.575 C0.793,0.575,0.682,0.815,0.682,0.815 C0.665,0.854,0.621,0.962,0.59,0.984 C0.568,1,0.55,1,0.525,1 C0.457,0.998,0.435,0.95,0.435,0.89 C0.435,0.89,0.435,0.565,0.435,0.565" /></clipPath>
<clipPath id="fl" clipPathUnits="objectBoundingBox"><path d="M0.565,0.435 C0.565,0.435,0.565,0.1,0.565,0.1 C0.564,0.043,0.535,0.002,0.475,0 C0.45,-0.001,0.432,0,0.41,0.016 C0.379,0.038,0.335,0.146,0.318,0.185 C0.318,0.185,0.207,0.425,0.207,0.425 C0.207,0.425,0.099,0.66,0.099,0.66 C0.099,0.66,0.039,0.79,0.039,0.79 C0.019,0.831,-0.001,0.863,0,0.91 C0.002,0.971,0.048,1,0.105,1 C0.139,0.999,0.179,0.976,0.21,0.961 C0.21,0.961,0.34,0.901,0.34,0.901 C0.34,0.901,0.575,0.793,0.575,0.793 C0.575,0.793,0.815,0.682,0.815,0.682 C0.815,0.682,0.925,0.631,0.925,0.631 C0.945,0.621,0.967,0.613,0.981,0.594 C0.999,0.572,1,0.553,1,0.525 C0.998,0.457,0.95,0.435,0.89,0.435 C0.89,0.435,0.565,0.435,0.565,0.435" /></clipPath>
<clipPath id="fr" clipPathUnits="objectBoundingBox"><path d="M0.435,0.435 C0.435,0.435,0.435,0.1,0.435,0.1 C0.436,0.043,0.465,0.002,0.525,0 C0.55,-0.001,0.568,0,0.59,0.016 C0.621,0.038,0.665,0.146,0.682,0.185 C0.682,0.185,0.793,0.425,0.793,0.425 C0.793,0.425,0.901,0.66,0.901,0.66 C0.901,0.66,0.961,0.79,0.961,0.79 C0.981,0.831,1,0.863,1,0.91 C0.998,0.971,0.952,1,0.895,1 C0.861,0.999,0.821,0.976,0.79,0.961 C0.79,0.961,0.66,0.901,0.66,0.901 C0.66,0.901,0.425,0.793,0.425,0.793 C0.425,0.793,0.185,0.682,0.185,0.682 C0.185,0.682,0.075,0.631,0.075,0.631 C0.055,0.621,0.033,0.613,0.019,0.594 C0.001,0.572,-0.001,0.553,0,0.525 C0.002,0.457,0.05,0.435,0.11,0.435 C0.11,0.435,0.435,0.435,0.435,0.435" /></clipPath>
<clipPath id="stopsign"><path d="M5,22L23,4L51,4L69,22L69,50L51,68L23,68L5,50Z" /></clipPath>
</svg>
<div className={styles.keysBody}>
Expand All @@ -191,8 +190,7 @@ class Keypad extends PureComponent {
continuousJog={() => actions.startContinuousJog({ X: -1, Y: 1 }, feedrate)}
stopContinuousJog={() => actions.stopContinuousJog()}
disabled={xyControlsDisabled || rotary && firmwareType === 'Grbl'}
>
</JogControl>
/>
<JogControl
className={styles.btnUp}
jog={() => actions.jog({ Y: xyDistance, F: feedrate })}
Expand All @@ -209,8 +207,8 @@ class Keypad extends PureComponent {
continuousJog={() => actions.startContinuousJog({ X: 1, Y: 1 }, feedrate)}
stopContinuousJog={() => actions.stopContinuousJog()}
disabled={xyControlsDisabled || rotary && firmwareType === 'Grbl'}
>
</JogControl>
/>

<JogControl
className={cx(styles.btnUp, styles.zTopTransform)}
jog={() => actions.jog({ Z: zDistance, F: feedrate })}
Expand Down Expand Up @@ -249,8 +247,7 @@ class Keypad extends PureComponent {
continuousJog={() => actions.startContinuousJog({ X: -1, Y: -1 }, feedrate)}
stopContinuousJog={() => actions.stopContinuousJog()}
disabled={xyControlsDisabled || rotary && firmwareType === 'Grbl'}
>
</JogControl>
/>
<JogControl
className={styles.btnDown}
jog={() => actions.jog({ Y: -xyDistance, F: feedrate })}
Expand All @@ -267,8 +264,7 @@ class Keypad extends PureComponent {
continuousJog={() => actions.startContinuousJog({ X: 1, Y: -1 }, feedrate)}
stopContinuousJog={() => actions.stopContinuousJog()}
disabled={xyControlsDisabled || rotary && firmwareType === 'Grbl'}
>
</JogControl>
/>
<JogControl
className={cx(styles.btnDown, styles.zBottomTransform)}
jog={() => actions.jog({ Z: -zDistance, F: feedrate })}
Expand Down
8 changes: 2 additions & 6 deletions src/app/widgets/NavbarConnection/NavbarConnection.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,9 @@ class NavbarConnection extends PureComponent {
const { scanning } = this.props.state;
const { startedScan, hasScanned } = this.state;
if (scanning) {
this.setState({
startedScan: true
});
this.setState({ startedScan: true });
} else if (startedScan && !hasScanned) {
this.setState({
hasScanned: true
});
this.setState({ hasScanned: true });
}
}

Expand Down

0 comments on commit 0b38377

Please sign in to comment.