formatting, updated packages

This commit is contained in:
Proddy
2022-11-03 22:30:10 +01:00
parent 0bc3a3c34e
commit 4996eb9e3c
5 changed files with 85 additions and 84 deletions

View File

@@ -1,5 +1,5 @@
{ {
"adapter": "react", "adapter": "react",
"baseLocale": "en", "baseLocale": "en",
"$schema": "https://unpkg.com/typesafe-i18n@5.15.0/schema/typesafe-i18n.json" "$schema": "https://unpkg.com/typesafe-i18n@5.16.2/schema/typesafe-i18n.json"
} }

View File

@@ -14,8 +14,8 @@
"@mui/icons-material": "^5.10.9", "@mui/icons-material": "^5.10.9",
"@mui/material": "^5.10.12", "@mui/material": "^5.10.12",
"@table-library/react-table-library": "4.0.23", "@table-library/react-table-library": "4.0.23",
"@types/lodash": "^4.14.186", "@types/lodash": "^4.14.187",
"@types/node": "^18.11.8", "@types/node": "^18.11.9",
"@types/react": "^18.0.24", "@types/react": "^18.0.24",
"@types/react-dom": "^18.0.8", "@types/react-dom": "^18.0.8",
"@types/react-router-dom": "^5.3.3", "@types/react-router-dom": "^5.3.3",
@@ -31,10 +31,10 @@
"react-dom": "^18.2.0", "react-dom": "^18.2.0",
"react-dropzone": "^14.2.3", "react-dropzone": "^14.2.3",
"react-icons": "^4.6.0", "react-icons": "^4.6.0",
"react-router-dom": "^6.4.2", "react-router-dom": "^6.4.3",
"react-scripts": "5.0.1", "react-scripts": "5.0.1",
"sockette": "^2.0.6", "sockette": "^2.0.6",
"typesafe-i18n": "^5.15.0", "typesafe-i18n": "^5.16.2",
"typescript": "^4.8.4" "typescript": "^4.8.4"
}, },
"devDependencies": { "devDependencies": {
@@ -3458,9 +3458,9 @@
} }
}, },
"node_modules/@remix-run/router": { "node_modules/@remix-run/router": {
"version": "1.0.2", "version": "1.0.3",
"resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.0.2.tgz", "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.0.3.tgz",
"integrity": "sha512-GRSOFhJzjGN+d4sKHTMSvNeUPoZiDHWmRnXfzaxrqe7dE/Nzlc8BiMSJdLDESZlndM7jIUrZ/F4yWqVYlI0rwQ==", "integrity": "sha512-ceuyTSs7PZ/tQqi19YZNBc5X7kj1f8p+4DIyrcIYFY9h+hd1OKm4RqtiWldR9eGEvIiJfsqwM4BsuCtRIuEw6Q==",
"engines": { "engines": {
"node": ">=14" "node": ">=14"
} }
@@ -4007,9 +4007,9 @@
"integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==" "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ=="
}, },
"node_modules/@types/lodash": { "node_modules/@types/lodash": {
"version": "4.14.186", "version": "4.14.187",
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.186.tgz", "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.187.tgz",
"integrity": "sha512-eHcVlLXP0c2FlMPm56ITode2AgLMSa6aJ05JTTbYbI+7EMkCEE5qk2E41d5g2lCVTqRe0GnnRFurmlCsDODrPw==" "integrity": "sha512-MrO/xLXCaUgZy3y96C/iOsaIqZSeupyTImKClHunL5GrmaiII2VwvWmLBu2hwa0Kp0sV19CsyjtrTc/Fx8rg/A=="
}, },
"node_modules/@types/mime": { "node_modules/@types/mime": {
"version": "3.0.1", "version": "3.0.1",
@@ -4017,9 +4017,9 @@
"integrity": "sha512-Y4XFY5VJAuw0FgAqPNd6NNoV44jbq9Bz2L7Rh/J6jLTiHBSBJa9fxqQIvkIld4GsoDOcCbvzOUAbLPsSKKg+uA==" "integrity": "sha512-Y4XFY5VJAuw0FgAqPNd6NNoV44jbq9Bz2L7Rh/J6jLTiHBSBJa9fxqQIvkIld4GsoDOcCbvzOUAbLPsSKKg+uA=="
}, },
"node_modules/@types/node": { "node_modules/@types/node": {
"version": "18.11.8", "version": "18.11.9",
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.8.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.9.tgz",
"integrity": "sha512-uGwPWlE0Hj972KkHtCDVwZ8O39GmyjfMane1Z3GUBGGnkZ2USDq7SxLpVIiIHpweY9DS0QTDH0Nw7RNBsAAZ5A==" "integrity": "sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg=="
}, },
"node_modules/@types/parse-json": { "node_modules/@types/parse-json": {
"version": "4.0.0", "version": "4.0.0",
@@ -14535,11 +14535,11 @@
} }
}, },
"node_modules/react-router": { "node_modules/react-router": {
"version": "6.4.2", "version": "6.4.3",
"resolved": "https://registry.npmjs.org/react-router/-/react-router-6.4.2.tgz", "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.4.3.tgz",
"integrity": "sha512-Rb0BAX9KHhVzT1OKhMvCDMw776aTYM0DtkxqUBP8dNBom3mPXlfNs76JNGK8wKJ1IZEY1+WGj+cvZxHVk/GiKw==", "integrity": "sha512-BT6DoGn6aV1FVP5yfODMOiieakp3z46P1Fk0RNzJMACzE7C339sFuHebfvWtnB4pzBvXXkHP2vscJzWRuUjTtA==",
"dependencies": { "dependencies": {
"@remix-run/router": "1.0.2" "@remix-run/router": "1.0.3"
}, },
"engines": { "engines": {
"node": ">=14" "node": ">=14"
@@ -14549,12 +14549,12 @@
} }
}, },
"node_modules/react-router-dom": { "node_modules/react-router-dom": {
"version": "6.4.2", "version": "6.4.3",
"resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.4.2.tgz", "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.4.3.tgz",
"integrity": "sha512-yM1kjoTkpfjgczPrcyWrp+OuQMyB1WleICiiGfstnQYo/S8hPEEnVjr/RdmlH6yKK4Tnj1UGXFSa7uwAtmDoLQ==", "integrity": "sha512-MiaYQU8CwVCaOfJdYvt84KQNjT78VF0TJrA17SIQgNHRvLnXDJO6qsFqq8F/zzB1BWZjCFIrQpu4QxcshitziQ==",
"dependencies": { "dependencies": {
"@remix-run/router": "1.0.2", "@remix-run/router": "1.0.3",
"react-router": "6.4.2" "react-router": "6.4.3"
}, },
"engines": { "engines": {
"node": ">=14" "node": ">=14"
@@ -16398,9 +16398,9 @@
} }
}, },
"node_modules/typesafe-i18n": { "node_modules/typesafe-i18n": {
"version": "5.15.0", "version": "5.16.2",
"resolved": "https://registry.npmjs.org/typesafe-i18n/-/typesafe-i18n-5.15.0.tgz", "resolved": "https://registry.npmjs.org/typesafe-i18n/-/typesafe-i18n-5.16.2.tgz",
"integrity": "sha512-P5cmXOErZnXfHzuMeXF3AEFyvmT+kaUPzgcJPnlB/TdXSpzFz/Fj5DwwcjkbnVQgqFG7Sn4tRhmj4Axz/ArfWw==", "integrity": "sha512-s1eVQUhq7e0nbVm5Ntb3fLmA1UNi3yEUZN0VCPGGAzVAyS2IUdtDP1J9DINGgbFmBUkHwEAZ6DPSRl9Ca1cPaA==",
"bin": { "bin": {
"typesafe-i18n": "cli/typesafe-i18n.mjs" "typesafe-i18n": "cli/typesafe-i18n.mjs"
}, },
@@ -19790,9 +19790,9 @@
"integrity": "sha512-50/17A98tWUfQ176raKiOGXuYpLyyVMkxxG6oylzL3BPOlA6ADGdK7EYunSa4I064xerltq9TGXs8HmOk5E+vw==" "integrity": "sha512-50/17A98tWUfQ176raKiOGXuYpLyyVMkxxG6oylzL3BPOlA6ADGdK7EYunSa4I064xerltq9TGXs8HmOk5E+vw=="
}, },
"@remix-run/router": { "@remix-run/router": {
"version": "1.0.2", "version": "1.0.3",
"resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.0.2.tgz", "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.0.3.tgz",
"integrity": "sha512-GRSOFhJzjGN+d4sKHTMSvNeUPoZiDHWmRnXfzaxrqe7dE/Nzlc8BiMSJdLDESZlndM7jIUrZ/F4yWqVYlI0rwQ==" "integrity": "sha512-ceuyTSs7PZ/tQqi19YZNBc5X7kj1f8p+4DIyrcIYFY9h+hd1OKm4RqtiWldR9eGEvIiJfsqwM4BsuCtRIuEw6Q=="
}, },
"@rollup/plugin-babel": { "@rollup/plugin-babel": {
"version": "5.3.1", "version": "5.3.1",
@@ -20194,9 +20194,9 @@
"integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==" "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ=="
}, },
"@types/lodash": { "@types/lodash": {
"version": "4.14.186", "version": "4.14.187",
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.186.tgz", "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.187.tgz",
"integrity": "sha512-eHcVlLXP0c2FlMPm56ITode2AgLMSa6aJ05JTTbYbI+7EMkCEE5qk2E41d5g2lCVTqRe0GnnRFurmlCsDODrPw==" "integrity": "sha512-MrO/xLXCaUgZy3y96C/iOsaIqZSeupyTImKClHunL5GrmaiII2VwvWmLBu2hwa0Kp0sV19CsyjtrTc/Fx8rg/A=="
}, },
"@types/mime": { "@types/mime": {
"version": "3.0.1", "version": "3.0.1",
@@ -20204,9 +20204,9 @@
"integrity": "sha512-Y4XFY5VJAuw0FgAqPNd6NNoV44jbq9Bz2L7Rh/J6jLTiHBSBJa9fxqQIvkIld4GsoDOcCbvzOUAbLPsSKKg+uA==" "integrity": "sha512-Y4XFY5VJAuw0FgAqPNd6NNoV44jbq9Bz2L7Rh/J6jLTiHBSBJa9fxqQIvkIld4GsoDOcCbvzOUAbLPsSKKg+uA=="
}, },
"@types/node": { "@types/node": {
"version": "18.11.8", "version": "18.11.9",
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.8.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.9.tgz",
"integrity": "sha512-uGwPWlE0Hj972KkHtCDVwZ8O39GmyjfMane1Z3GUBGGnkZ2USDq7SxLpVIiIHpweY9DS0QTDH0Nw7RNBsAAZ5A==" "integrity": "sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg=="
}, },
"@types/parse-json": { "@types/parse-json": {
"version": "4.0.0", "version": "4.0.0",
@@ -27676,20 +27676,20 @@
"integrity": "sha512-F27qZr8uUqwhWZboondsPx8tnC3Ct3SxZA3V5WyEvujRyyNv0VYPhoBg1gZ8/MV5tubQp76Trw8lTv9hzRBa+A==" "integrity": "sha512-F27qZr8uUqwhWZboondsPx8tnC3Ct3SxZA3V5WyEvujRyyNv0VYPhoBg1gZ8/MV5tubQp76Trw8lTv9hzRBa+A=="
}, },
"react-router": { "react-router": {
"version": "6.4.2", "version": "6.4.3",
"resolved": "https://registry.npmjs.org/react-router/-/react-router-6.4.2.tgz", "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.4.3.tgz",
"integrity": "sha512-Rb0BAX9KHhVzT1OKhMvCDMw776aTYM0DtkxqUBP8dNBom3mPXlfNs76JNGK8wKJ1IZEY1+WGj+cvZxHVk/GiKw==", "integrity": "sha512-BT6DoGn6aV1FVP5yfODMOiieakp3z46P1Fk0RNzJMACzE7C339sFuHebfvWtnB4pzBvXXkHP2vscJzWRuUjTtA==",
"requires": { "requires": {
"@remix-run/router": "1.0.2" "@remix-run/router": "1.0.3"
} }
}, },
"react-router-dom": { "react-router-dom": {
"version": "6.4.2", "version": "6.4.3",
"resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.4.2.tgz", "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.4.3.tgz",
"integrity": "sha512-yM1kjoTkpfjgczPrcyWrp+OuQMyB1WleICiiGfstnQYo/S8hPEEnVjr/RdmlH6yKK4Tnj1UGXFSa7uwAtmDoLQ==", "integrity": "sha512-MiaYQU8CwVCaOfJdYvt84KQNjT78VF0TJrA17SIQgNHRvLnXDJO6qsFqq8F/zzB1BWZjCFIrQpu4QxcshitziQ==",
"requires": { "requires": {
"@remix-run/router": "1.0.2", "@remix-run/router": "1.0.3",
"react-router": "6.4.2" "react-router": "6.4.3"
} }
}, },
"react-scripts": { "react-scripts": {
@@ -29064,9 +29064,9 @@
} }
}, },
"typesafe-i18n": { "typesafe-i18n": {
"version": "5.15.0", "version": "5.16.2",
"resolved": "https://registry.npmjs.org/typesafe-i18n/-/typesafe-i18n-5.15.0.tgz", "resolved": "https://registry.npmjs.org/typesafe-i18n/-/typesafe-i18n-5.16.2.tgz",
"integrity": "sha512-P5cmXOErZnXfHzuMeXF3AEFyvmT+kaUPzgcJPnlB/TdXSpzFz/Fj5DwwcjkbnVQgqFG7Sn4tRhmj4Axz/ArfWw==", "integrity": "sha512-s1eVQUhq7e0nbVm5Ntb3fLmA1UNi3yEUZN0VCPGGAzVAyS2IUdtDP1J9DINGgbFmBUkHwEAZ6DPSRl9Ca1cPaA==",
"requires": {} "requires": {}
}, },
"typescript": { "typescript": {

View File

@@ -10,8 +10,8 @@
"@mui/icons-material": "^5.10.9", "@mui/icons-material": "^5.10.9",
"@mui/material": "^5.10.12", "@mui/material": "^5.10.12",
"@table-library/react-table-library": "4.0.23", "@table-library/react-table-library": "4.0.23",
"@types/lodash": "^4.14.186", "@types/lodash": "^4.14.187",
"@types/node": "^18.11.8", "@types/node": "^18.11.9",
"@types/react": "^18.0.24", "@types/react": "^18.0.24",
"@types/react-dom": "^18.0.8", "@types/react-dom": "^18.0.8",
"@types/react-router-dom": "^5.3.3", "@types/react-router-dom": "^5.3.3",
@@ -27,10 +27,10 @@
"react-dom": "^18.2.0", "react-dom": "^18.2.0",
"react-dropzone": "^14.2.3", "react-dropzone": "^14.2.3",
"react-icons": "^4.6.0", "react-icons": "^4.6.0",
"react-router-dom": "^6.4.2", "react-router-dom": "^6.4.3",
"react-scripts": "5.0.1", "react-scripts": "5.0.1",
"sockette": "^2.0.6", "sockette": "^2.0.6",
"typesafe-i18n": "^5.15.0", "typesafe-i18n": "^5.16.2",
"typescript": "^4.8.4" "typescript": "^4.8.4"
}, },
"scripts": { "scripts": {

View File

@@ -10,7 +10,9 @@
font-style: normal; font-style: normal;
font-weight: 400; font-weight: 400;
src: local('Roboto'), local('Roboto-Regular'), url(../fonts/re.woff2) format('woff2'); src: local('Roboto'), local('Roboto-Regular'), url(../fonts/re.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0104-0107, U+0118-0119, U+0131, U+0141-0144, U+0152-0153, U+015A-015B, U+0179-017C, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; unicode-range: U+0000-00FF, U+0104-0107, U+0118-0119, U+0131, U+0141-0144, U+0152-0153, U+015A-015B, U+0179-017C,
U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF,
U+FFFD;
} }
@font-face { @font-face {
@@ -18,5 +20,7 @@
font-style: normal; font-style: normal;
font-weight: 500; font-weight: 500;
src: local('Roboto Medium'), local('Roboto-Medium'), url(../fonts/md.woff2) format('woff2'); src: local('Roboto Medium'), local('Roboto-Medium'), url(../fonts/md.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0104-0107, U+0118-0119, U+0131, U+0141-0144, U+0152-0153, U+015A-015B, U+0179-017C, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; unicode-range: U+0000-00FF, U+0104-0107, U+0118-0119, U+0131, U+0141-0144, U+0152-0153, U+015A-015B, U+0179-017C,
U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF,
U+FFFD;
} }

View File

@@ -545,45 +545,42 @@ const SettingsCustomization: FC = () => {
</Dialog> </Dialog>
); );
const content = () => { const renderContent = () => (
return ( <>
<> <Typography sx={{ pt: 2, pb: 2 }} variant="h6" color="primary">
<Typography sx={{ pt: 2, pb: 2 }} variant="h6" color="primary"> {LL.DEVICE_ENTITIES()}
{LL.DEVICE_ENTITIES()} </Typography>
</Typography> {renderDeviceList()}
{renderDeviceList()} {renderDeviceData()}
{!deviceEntity && renderDeviceData()} <Box display="flex" flexWrap="wrap">
<Box display="flex" flexWrap="wrap"> <Box flexGrow={1}>
<Box flexGrow={1}>
<ButtonRow>
<Button startIcon={<SaveIcon />} variant="outlined" color="primary" onClick={() => saveCustomization()}>
{LL.SAVE()}
</Button>
</ButtonRow>
</Box>
<ButtonRow> <ButtonRow>
<Button <Button startIcon={<SaveIcon />} variant="outlined" color="primary" onClick={() => saveCustomization()}>
startIcon={<SettingsBackupRestoreIcon />} {LL.SAVE()}
variant="outlined"
color="error"
onClick={() => setConfirmReset(true)}
>
{LL.RESET(0)}
</Button> </Button>
</ButtonRow> </ButtonRow>
</Box> </Box>
{renderResetDialog()} <ButtonRow>
</> <Button
); startIcon={<SettingsBackupRestoreIcon />}
}; variant="outlined"
color="error"
onClick={() => setConfirmReset(true)}
>
{LL.RESET(0)}
</Button>
</ButtonRow>
</Box>
{renderResetDialog()}
</>
);
const renderEditEntity = () => { const renderEditDialog = () => {
if (deviceEntity) { if (deviceEntity) {
const de = deviceEntity; const de = deviceEntity;
return ( return (
<Dialog open={!!deviceEntity} onClose={() => setDeviceEntity(undefined)}> <Dialog open={!!deviceEntity} onClose={() => setDeviceEntity(undefined)}>
<DialogTitle>{LL.EDIT() + ' ' + LL.ENTITY() + ' "' + de.id + '"'}</DialogTitle> <DialogTitle>{LL.EDIT() + ' ' + LL.ENTITY() + ' "' + de.id + '"'}</DialogTitle>
<DialogContent dividers> <DialogContent dividers>
<ToggleButtonGroup <ToggleButtonGroup
size="small" size="small"
@@ -692,8 +689,8 @@ const SettingsCustomization: FC = () => {
return ( return (
<SectionContent title={LL.USER_CUSTOMIZATION()} titleGutter> <SectionContent title={LL.USER_CUSTOMIZATION()} titleGutter>
{renderEditEntity()} {renderContent()}
{content()} {renderEditDialog()}
</SectionContent> </SectionContent>
); );
}; };