From 8d0f3954169dec9ad4c53d29d3b5d2458b9be204 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Mon, 23 May 2022 07:36:43 -0700 Subject: Fix style issues --- modern/src/common/components/ErrorHandler.js | 1 - modern/src/common/theme/index.js | 2 -- modern/src/login/LoginPage.js | 2 -- modern/src/login/RegisterPage.js | 3 --- modern/src/login/ResetPasswordPage.js | 2 -- modern/src/main/MainPage.js | 1 - modern/src/reports/components/ReportFilter.js | 2 -- modern/src/settings/AccumulatorsPage.js | 2 -- modern/src/settings/CalendarPage.js | 1 - modern/src/settings/CommandPage.js | 1 - modern/src/settings/CommandSendPage.js | 1 - modern/src/settings/ComputedAttributePage.js | 3 --- modern/src/settings/DevicePage.js | 13 ------------- modern/src/settings/DriverPage.js | 2 -- modern/src/settings/GeofencePage.js | 1 - modern/src/settings/GroupPage.js | 8 -------- modern/src/settings/MaintenancePage.js | 3 --- modern/src/settings/NotificationPage.js | 3 --- modern/src/settings/ServerPage.js | 7 ------- modern/src/settings/UserPage.js | 22 ---------------------- .../src/settings/components/AddAttributeDialog.js | 1 - modern/src/settings/components/BaseCommandView.js | 2 -- 22 files changed, 83 deletions(-) (limited to 'modern') diff --git a/modern/src/common/components/ErrorHandler.js b/modern/src/common/components/ErrorHandler.js index d6735885..757a78ef 100644 --- a/modern/src/common/components/ErrorHandler.js +++ b/modern/src/common/components/ErrorHandler.js @@ -14,7 +14,6 @@ const ErrorHandler = () => { dispatch(errorsActions.pop())} severity="error" > diff --git a/modern/src/common/theme/index.js b/modern/src/common/theme/index.js index de0a7efd..eb9635db 100644 --- a/modern/src/common/theme/index.js +++ b/modern/src/common/theme/index.js @@ -1,11 +1,9 @@ import { createTheme, adaptV4Theme } from '@mui/material/styles'; import palette from './palette'; -import overrides from './overrides'; import dimensions from './dimensions'; const theme = createTheme(adaptV4Theme({ palette, - //overrides, dimensions, })); diff --git a/modern/src/login/LoginPage.js b/modern/src/login/LoginPage.js index e7a110de..8e5467ac 100644 --- a/modern/src/login/LoginPage.js +++ b/modern/src/login/LoginPage.js @@ -118,7 +118,6 @@ const LoginPage = () => { onChange={(e) => setEmail(e.target.value)} onKeyUp={handleSpecialKey} helperText={failed && 'Invalid username or password'} - /> @@ -134,7 +133,6 @@ const LoginPage = () => { autoFocus={!!email} onChange={(e) => setPassword(e.target.value)} onKeyUp={handleSpecialKey} - /> diff --git a/modern/src/login/RegisterPage.js b/modern/src/login/RegisterPage.js index e0b408f4..986bf894 100644 --- a/modern/src/login/RegisterPage.js +++ b/modern/src/login/RegisterPage.js @@ -81,7 +81,6 @@ const RegisterPage = () => { autoComplete="name" autoFocus onChange={(event) => setName(event.target.value)} - /> @@ -94,7 +93,6 @@ const RegisterPage = () => { value={email} autoComplete="email" onChange={(event) => setEmail(event.target.value)} - /> @@ -107,7 +105,6 @@ const RegisterPage = () => { type="password" autoComplete="current-password" onChange={(event) => setPassword(event.target.value)} - /> diff --git a/modern/src/login/ResetPasswordPage.js b/modern/src/login/ResetPasswordPage.js index c74d3396..c3e91fe6 100644 --- a/modern/src/login/ResetPasswordPage.js +++ b/modern/src/login/ResetPasswordPage.js @@ -94,7 +94,6 @@ const ResetPasswordPage = () => { value={email} autoComplete="email" onChange={(event) => setEmail(event.target.value)} - /> ) @@ -109,7 +108,6 @@ const ResetPasswordPage = () => { type="password" autoComplete="current-password" onChange={(event) => setPassword(event.target.value)} - /> )} diff --git a/modern/src/main/MainPage.js b/modern/src/main/MainPage.js index 2805ecd1..7235d1b4 100644 --- a/modern/src/main/MainPage.js +++ b/modern/src/main/MainPage.js @@ -178,7 +178,6 @@ const MainPage = () => { autoComplete="searchKeyword" onChange={(event) => setSearchKeyword(event.target.value)} placeholder={t('sharedSearchDevices')} - /> { value={item.hours} onChange={(event) => setItem({ ...item, hours: Number(event.target.value) })} label={t('positionHours')} - /> { value={item.totalDistance} onChange={(event) => setItem({ ...item, totalDistance: Number(event.target.value) })} label={t('deviceTotalDistance')} - /> diff --git a/modern/src/settings/CalendarPage.js b/modern/src/settings/CalendarPage.js index f2f2da32..1d967a35 100644 --- a/modern/src/settings/CalendarPage.js +++ b/modern/src/settings/CalendarPage.js @@ -61,7 +61,6 @@ const CalendarPage = () => { value={item.name || ''} onChange={(event) => setItem({ ...item, name: event.target.value })} label={t('sharedName')} - /> { value={item.description || ''} onChange={(event) => setItem({ ...item, description: event.target.value })} label={t('sharedDescription')} - /> diff --git a/modern/src/settings/CommandSendPage.js b/modern/src/settings/CommandSendPage.js index 88519791..29c9df46 100644 --- a/modern/src/settings/CommandSendPage.js +++ b/modern/src/settings/CommandSendPage.js @@ -92,7 +92,6 @@ const CommandSendPage = () => { endpoint={`/api/commands/send?deviceId=${deviceId}`} titleGetter={(it) => it.description} label={t('sharedSavedCommand')} - /> {!savedId && ( diff --git a/modern/src/settings/ComputedAttributePage.js b/modern/src/settings/ComputedAttributePage.js index 826fe422..28b0f41e 100644 --- a/modern/src/settings/ComputedAttributePage.js +++ b/modern/src/settings/ComputedAttributePage.js @@ -73,7 +73,6 @@ const ComputedAttributePage = () => { value={item.description || ''} onChange={(event) => setItem({ ...item, description: event.target.value })} label={t('sharedDescription')} - /> {t('sharedAttribute')} @@ -93,10 +92,8 @@ const ComputedAttributePage = () => { label={t('sharedExpression')} multiline rows={4} - /> { value={item.name || ''} onChange={(event) => setItem({ ...item, name: event.target.value })} label={t('sharedName')} - /> setItem({ ...item, uniqueId: event.target.value })} label={t('deviceIdentifier')} - /> @@ -89,28 +87,24 @@ const DevicePage = () => { onChange={(event) => setItem({ ...item, groupId: Number(event.target.value) })} endpoint="/api/groups" label={t('groupParent')} - /> setItem({ ...item, phone: event.target.value })} label={t('sharedPhone')} - /> setItem({ ...item, model: event.target.value })} label={t('deviceModel')} - /> setItem({ ...item, contact: event.target.value })} label={t('deviceContact')} - /> { name: t(`category${category.replace(/^\w/, (c) => c.toUpperCase())}`), }))} label={t('deviceCategory')} - /> {admin && ( { keyBase="deviceId" keyLink="geofenceId" label={t('sharedGeofences')} - /> { keyLink="notificationId" titleGetter={(it) => t(prefixString('event', it.type))} label={t('sharedNotifications')} - /> { keyBase="deviceId" keyLink="driverId" label={t('sharedDrivers')} - /> { keyLink="attributeId" titleGetter={(it) => it.description} label={t('sharedComputedAttributes')} - /> { keyLink="commandId" titleGetter={(it) => it.description} label={t('sharedSavedCommands')} - /> { keyBase="deviceId" keyLink="maintenanceId" label={t('sharedMaintenance')} - /> diff --git a/modern/src/settings/DriverPage.js b/modern/src/settings/DriverPage.js index c072c52b..707e2977 100644 --- a/modern/src/settings/DriverPage.js +++ b/modern/src/settings/DriverPage.js @@ -47,14 +47,12 @@ const DriverPage = () => { value={item.name || ''} onChange={(event) => setItem({ ...item, name: event.target.value })} label={t('sharedName')} - /> setItem({ ...item, uniqueId: event.target.value })} label={t('deviceIdentifier')} - /> diff --git a/modern/src/settings/GeofencePage.js b/modern/src/settings/GeofencePage.js index 7dd47527..353eb2b8 100644 --- a/modern/src/settings/GeofencePage.js +++ b/modern/src/settings/GeofencePage.js @@ -51,7 +51,6 @@ const GeofencePage = () => { value={item.name || ''} onChange={(event) => setItem({ ...item, name: event.target.value })} label={t('sharedName')} - /> diff --git a/modern/src/settings/GroupPage.js b/modern/src/settings/GroupPage.js index 5cb0474d..3f4cc8d8 100644 --- a/modern/src/settings/GroupPage.js +++ b/modern/src/settings/GroupPage.js @@ -56,7 +56,6 @@ const GroupPage = () => { value={item.name || ''} onChange={(event) => setItem({ ...item, name: event.target.value })} label={t('sharedName')} - /> @@ -73,7 +72,6 @@ const GroupPage = () => { onChange={(event) => setItem({ ...item, groupId: Number(event.target.value) })} endpoint="/api/groups" label={t('groupParent')} - /> @@ -107,7 +105,6 @@ const GroupPage = () => { keyBase="groupId" keyLink="geofenceId" label={t('sharedGeofences')} - /> { keyLink="notificationId" titleGetter={(it) => t(prefixString('event', it.type))} label={t('sharedNotifications')} - /> { keyBase="groupId" keyLink="driverId" label={t('sharedDrivers')} - /> { keyLink="attributeId" titleGetter={(it) => it.description} label={t('sharedComputedAttributes')} - /> { keyLink="commandId" titleGetter={(it) => it.description} label={t('sharedSavedCommands')} - /> { keyBase="groupId" keyLink="maintenanceId" label={t('sharedMaintenance')} - /> diff --git a/modern/src/settings/MaintenancePage.js b/modern/src/settings/MaintenancePage.js index 599d600d..67448fb7 100644 --- a/modern/src/settings/MaintenancePage.js +++ b/modern/src/settings/MaintenancePage.js @@ -129,7 +129,6 @@ const MaintenancePage = () => { value={item.name || ''} onChange={(event) => setItem({ ...item, name: event.target.value })} label={t('sharedName')} - /> {t('sharedType')} @@ -148,7 +147,6 @@ const MaintenancePage = () => { value={rawToValue(item.start) || ''} onChange={(event) => setItem({ ...item, start: valueToRaw(event.target.value) })} label={t('maintenanceStart')} - InputProps={{ endAdornment: {labels.start}, }} @@ -159,7 +157,6 @@ const MaintenancePage = () => { value={rawToValue(item.period) || ''} onChange={(event) => setItem({ ...item, period: valueToRaw(event.target.value) })} label={t('maintenancePeriod')} - InputProps={{ endAdornment: {labels.period}, }} diff --git a/modern/src/settings/NotificationPage.js b/modern/src/settings/NotificationPage.js index a98330c2..a7c06f68 100644 --- a/modern/src/settings/NotificationPage.js +++ b/modern/src/settings/NotificationPage.js @@ -61,7 +61,6 @@ const NotificationPage = () => { keyGetter={(it) => it.type} titleGetter={(it) => t(prefixString('event', it.type))} label={t('sharedType')} - /> { keyGetter={(it) => it.type} titleGetter={(it) => t(prefixString('notificator', it.type))} label={t('notificationNotificators')} - /> {(!item.type || item.type === 'alarm') && ( { data={alarms} keyGetter={(it) => it.key} label={t('sharedAlarms')} - /> )} { value={item.mapUrl || ''} onChange={(event) => setItem({ ...item, mapUrl: event.target.value })} label={t('mapCustomLabel')} - /> { value={item.latitude || 0} onChange={(event) => setItem({ ...item, latitude: Number(event.target.value) })} label={t('positionLatitude')} - /> { value={item.longitude || 0} onChange={(event) => setItem({ ...item, longitude: Number(event.target.value) })} label={t('positionLongitude')} - /> { value={item.zoom || 0} onChange={(event) => setItem({ ...item, zoom: Number(event.target.value) })} label={t('serverZoom')} - /> {t('settingsCoordinateFormat')} @@ -168,21 +164,18 @@ const ServerPage = () => { keyGetter={(it) => it} titleGetter={(it) => it} label={t('sharedTimezone')} - /> setItem({ ...item, poiLayer: event.target.value })} label={t('mapPoiLayer')} - /> setItem({ ...item, announcement: event.target.value })} label={t('serverAnnouncement')} - /> setItem({ ...item, twelveHourFormat: event.target.checked })} />} diff --git a/modern/src/settings/UserPage.js b/modern/src/settings/UserPage.js index 8b2dc933..d279fce3 100644 --- a/modern/src/settings/UserPage.js +++ b/modern/src/settings/UserPage.js @@ -87,21 +87,18 @@ const UserPage = () => { value={item.name || ''} onChange={(event) => setItem({ ...item, name: event.target.value })} label={t('sharedName')} - /> setItem({ ...item, email: event.target.value })} label={t('userEmail')} - /> setItem({ ...item, password: event.target.value })} label={t('userPassword')} - /> @@ -117,7 +114,6 @@ const UserPage = () => { value={item.phone || ''} onChange={(event) => setItem({ ...item, phone: event.target.value })} label={t('sharedPhone')} - /> { value={item.latitude || 0} onChange={(event) => setItem({ ...item, latitude: Number(event.target.value) })} label={t('positionLatitude')} - /> { value={item.longitude || 0} onChange={(event) => setItem({ ...item, longitude: Number(event.target.value) })} label={t('positionLongitude')} - /> { value={item.zoom || 0} onChange={(event) => setItem({ ...item, zoom: Number(event.target.value) })} label={t('serverZoom')} - /> {t('settingsCoordinateFormat')} @@ -196,14 +189,12 @@ const UserPage = () => { keyGetter={(it) => it} titleGetter={(it) => it} label={t('sharedTimezone')} - /> setItem({ ...item, poiLayer: event.target.value })} label={t('mapPoiLayer')} - /> setItem({ ...item, twelveHourFormat: event.target.checked })} />} @@ -241,7 +232,6 @@ const UserPage = () => { { value={item.deviceLimit || 0} onChange={(e) => setItem({ ...item, deviceLimit: Number(e.target.value) })} label={t('userDeviceLimit')} - disabled={!admin} /> { value={item.userLimit || 0} onChange={(e) => setItem({ ...item, userLimit: Number(e.target.value) })} label={t('userUserLimit')} - disabled={!admin} /> { keyBase="userId" keyLink="deviceId" label={t('deviceTitle')} - /> { keyBase="userId" keyLink="groupId" label={t('settingsGroups')} - /> { keyBase="userId" keyLink="geofenceId" label={t('sharedGeofences')} - /> { keyLink="notificationId" titleGetter={(it) => t(prefixString('event', it.type))} label={t('sharedNotifications')} - /> { keyBase="userId" keyLink="calendarId" label={t('sharedCalendars')} - /> { keyBase="userId" keyLink="managedUserId" label={t('settingsUsers')} - /> { keyLink="attributeId" titleGetter={(it) => it.description} label={t('sharedComputedAttributes')} - /> { keyBase="userId" keyLink="driverId" label={t('sharedDrivers')} - /> { keyLink="commandId" titleGetter={(it) => it.description} label={t('sharedSavedCommands')} - /> { keyBase="userId" keyLink="maintenanceId" label={t('sharedMaintenance')} - /> diff --git a/modern/src/settings/components/AddAttributeDialog.js b/modern/src/settings/components/AddAttributeDialog.js index d0ac5f46..150fc008 100644 --- a/modern/src/settings/components/AddAttributeDialog.js +++ b/modern/src/settings/components/AddAttributeDialog.js @@ -52,7 +52,6 @@ const AddAttributeDialog = ({ open, onResult, definitions }) => { )} /> { keyGetter={(it) => it.type} titleGetter={(it) => t(prefixString('command', it.type))} label={t('sharedType')} - /> {attributes.map(({ key, name, type }) => { if (type === 'boolean') { @@ -63,7 +62,6 @@ const BaseCommandView = ({ item, setItem }) => { setItem(updateItem); }} label={name} - /> ); })} -- cgit v1.2.3