aboutsummaryrefslogtreecommitdiff
path: root/modern/src/settings/DevicesPage.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2023-02-23 11:53:36 -0800
committerAnton Tananaev <anton@traccar.org>2023-02-23 11:53:36 -0800
commit0ca058f1c69827b41fa3a414917ab1cbebfb84e6 (patch)
treec617a73afeececac75371c2b6d6225d7b1cf00d6 /modern/src/settings/DevicesPage.js
parent5f65762c67aacc9a621983fcb06107b982792c3f (diff)
downloadtrackermap-web-0ca058f1c69827b41fa3a414917ab1cbebfb84e6.tar.gz
trackermap-web-0ca058f1c69827b41fa3a414917ab1cbebfb84e6.tar.bz2
trackermap-web-0ca058f1c69827b41fa3a414917ab1cbebfb84e6.zip
Allow device readonly linking
Diffstat (limited to 'modern/src/settings/DevicesPage.js')
-rw-r--r--modern/src/settings/DevicesPage.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/modern/src/settings/DevicesPage.js b/modern/src/settings/DevicesPage.js
index 8f267a21..5a053766 100644
--- a/modern/src/settings/DevicesPage.js
+++ b/modern/src/settings/DevicesPage.js
@@ -15,6 +15,7 @@ import TableShimmer from '../common/components/TableShimmer';
import SearchHeader, { filterByKeyword } from './components/SearchHeader';
import { usePreference } from '../common/util/preferences';
import { formatTime } from '../common/util/formatter';
+import { useDeviceReadonly } from '../common/util/permissions';
const useStyles = makeStyles((theme) => ({
columnAction: {
@@ -30,6 +31,8 @@ const DevicesPage = () => {
const hours12 = usePreference('twelveHourFormat');
+ const deviceReadonly = useDeviceReadonly();
+
const [timestamp, setTimestamp] = useState(Date.now());
const [items, setItems] = useState([]);
const [searchKeyword, setSearchKeyword] = useState('');
@@ -87,6 +90,7 @@ const DevicesPage = () => {
endpoint="devices"
setTimestamp={setTimestamp}
customActions={[actionConnections]}
+ readonly={deviceReadonly}
/>
</TableCell>
</TableRow>