aboutsummaryrefslogtreecommitdiff
path: root/modern/src/settings
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2023-12-30 15:21:02 -0800
committerAnton Tananaev <anton@traccar.org>2023-12-30 15:21:02 -0800
commit6b74ea793333313ae578d7f7203aad0e5b854f7d (patch)
tree9f18a967d4a3db09fbcd21aa9820a1503b615784 /modern/src/settings
parent363d473ce27a4d672110005f4dcde6576eb68ccc (diff)
downloadtrackermap-web-6b74ea793333313ae578d7f7203aad0e5b854f7d.tar.gz
trackermap-web-6b74ea793333313ae578d7f7203aad0e5b854f7d.tar.bz2
trackermap-web-6b74ea793333313ae578d7f7203aad0e5b854f7d.zip
Support unknown devices logs
Diffstat (limited to 'modern/src/settings')
-rw-r--r--modern/src/settings/DevicePage.jsx7
1 files changed, 6 insertions, 1 deletions
diff --git a/modern/src/settings/DevicePage.jsx b/modern/src/settings/DevicePage.jsx
index 435a48bd..d8a30cbf 100644
--- a/modern/src/settings/DevicePage.jsx
+++ b/modern/src/settings/DevicePage.jsx
@@ -22,6 +22,7 @@ import { useAdministrator } from '../common/util/permissions';
import SettingsMenu from './components/SettingsMenu';
import useCommonDeviceAttributes from '../common/attributes/useCommonDeviceAttributes';
import { useCatch } from '../reactHelper';
+import useQuery from '../common/util/useQuery';
const useStyles = makeStyles((theme) => ({
details: {
@@ -41,7 +42,10 @@ const DevicePage = () => {
const commonDeviceAttributes = useCommonDeviceAttributes(t);
const deviceAttributes = useDeviceAttributes(t);
- const [item, setItem] = useState();
+ const query = useQuery();
+ const uniqueId = query.get('uniqueId');
+
+ const [item, setItem] = useState(uniqueId ? { uniqueId } : null);
const handleFiles = useCatch(async (files) => {
if (files.length > 0) {
@@ -87,6 +91,7 @@ const DevicePage = () => {
onChange={(event) => setItem({ ...item, uniqueId: event.target.value })}
label={t('deviceIdentifier')}
helperText={t('deviceIdentifierHelp')}
+ disabled={Boolean(uniqueId)}
/>
</AccordionDetails>
</Accordion>