aboutsummaryrefslogtreecommitdiff
path: root/modern/src/attributes
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-04-20 18:11:16 -0700
committerAnton Tananaev <anton@traccar.org>2022-04-20 18:11:16 -0700
commitf2bd440c7fdf8857a5704f214d96aba3345a14e7 (patch)
tree1b741f3d66fa7403ca81631b782617897045c841 /modern/src/attributes
parent60f74cdaa7f737eb4749e44333a7c7166dd6db6b (diff)
downloadtrackermap-web-f2bd440c7fdf8857a5704f214d96aba3345a14e7.tar.gz
trackermap-web-f2bd440c7fdf8857a5704f214d96aba3345a14e7.tar.bz2
trackermap-web-f2bd440c7fdf8857a5704f214d96aba3345a14e7.zip
Add saved commands
Diffstat (limited to 'modern/src/attributes')
-rw-r--r--modern/src/attributes/EditAttributesView.js2
-rw-r--r--modern/src/attributes/useCommandAttributes.js11
2 files changed, 12 insertions, 1 deletions
diff --git a/modern/src/attributes/EditAttributesView.js b/modern/src/attributes/EditAttributesView.js
index e8ab83e1..3a18a9a3 100644
--- a/modern/src/attributes/EditAttributesView.js
+++ b/modern/src/attributes/EditAttributesView.js
@@ -116,7 +116,7 @@ const EditAttributesView = ({ attributes, setAttributes, definitions }) => {
<CloseIcon />
</IconButton>
</InputAdornment>
- )}
+ )}
/>
</FormControl>
);
diff --git a/modern/src/attributes/useCommandAttributes.js b/modern/src/attributes/useCommandAttributes.js
new file mode 100644
index 00000000..1212d283
--- /dev/null
+++ b/modern/src/attributes/useCommandAttributes.js
@@ -0,0 +1,11 @@
+import { useMemo } from 'react';
+
+export default (t) => useMemo(() => ({
+ custom: [
+ {
+ key: 'data',
+ name: t('commandData'),
+ type: 'string',
+ },
+ ],
+}), [t]);