-36
@@ -86,24 +86,12 @@ function App() {
|
||||
const [onePerPage, setOnePerPage] = useState(false);
|
||||
const [primaryColor, setPrimaryColor] = useState("#536766");
|
||||
const [colorUserChoice, setColorUserChoice] = useState(false);
|
||||
const [hideModelSelections, setHideModelSelections] = useState(false);
|
||||
const uploadRef = useRef();
|
||||
|
||||
const throttledSetPrimaryColor = useRef(
|
||||
throttle((color) => setPrimaryColor(color), 50),
|
||||
).current;
|
||||
|
||||
const toggleHideModelSelections = (hide) => {
|
||||
const checkboxes = document.querySelectorAll(
|
||||
'input[type="checkbox"].hide-model-selection',
|
||||
);
|
||||
checkboxes.forEach((checkbox) => {
|
||||
if (checkbox.checked !== hide) {
|
||||
checkbox.click();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
async function handleFileSelect(event) {
|
||||
const files = event?.target?.files;
|
||||
|
||||
@@ -431,30 +419,6 @@ function App() {
|
||||
One Datacard per Page when Printing
|
||||
</span>
|
||||
</label>
|
||||
{
|
||||
// only show when 10th or 11th edition
|
||||
(edition === 10 || edition === 11) && (
|
||||
<label
|
||||
style={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
gap: 4,
|
||||
minHeight: 26,
|
||||
}}
|
||||
>
|
||||
<input
|
||||
type="checkbox"
|
||||
value={hideModelSelections}
|
||||
onChange={(e) => {
|
||||
setHideModelSelections(e.target.checked);
|
||||
toggleHideModelSelections(e.target.checked);
|
||||
}}
|
||||
className="hide-model-selection"
|
||||
/>
|
||||
<span className="select-none">Hide all Unit Compositions</span>
|
||||
</label>
|
||||
)
|
||||
}
|
||||
<div style={{ display: "flex", alignItems: "center", gap: 4 }}>
|
||||
<label style={{ display: "flex", alignItems: "center", gap: 4 }}>
|
||||
<input
|
||||
|
||||
Reference in New Issue
Block a user