diff options
Diffstat (limited to 'src')
80 files changed, 610 insertions, 211 deletions
diff --git a/src/common/attributes/useCommonUserAttributes.js b/src/common/attributes/useCommonUserAttributes.js index 294ddea8..43983fbc 100644 --- a/src/common/attributes/useCommonUserAttributes.js +++ b/src/common/attributes/useCommonUserAttributes.js @@ -49,6 +49,10 @@ export default (t) => useMemo(() => ({ name: t('attributePopupInfo'), type: 'string', }, + googleKey: { + name: t('mapGoogleKey'), + type: 'string', + }, locationIqKey: { name: t('mapLocationIqKey'), type: 'string', diff --git a/src/common/components/NativeInterface.js b/src/common/components/NativeInterface.js index b088de0e..d43b678c 100644 --- a/src/common/components/NativeInterface.js +++ b/src/common/components/NativeInterface.js @@ -37,7 +37,7 @@ const NativeInterface = () => { }, [setNotificationToken]); useEffectAsync(async () => { - if (user && !user.readonly && notificationToken) { + if (user && notificationToken) { window.localStorage.setItem('notificationToken', notificationToken); setNotificationToken(null); diff --git a/src/common/theme/index.js b/src/common/theme/index.js index 00958497..8ed998c6 100644 --- a/src/common/theme/index.js +++ b/src/common/theme/index.js @@ -5,6 +5,9 @@ import dimensions from './dimensions'; import components from './components'; export default (server, darkMode, direction) => useMemo(() => createTheme({ + typography: { + fontFamily: 'Roboto,Segoe UI,Helvetica Neue,Arial,sans-serif', + }, palette: palette(server, darkMode), direction, dimensions, diff --git a/src/common/util/colors.js b/src/common/util/colors.js new file mode 100644 index 00000000..1cb35c04 --- /dev/null +++ b/src/common/util/colors.js @@ -0,0 +1,23 @@ +import { decomposeColor } from '@mui/material'; + +export const interpolateColor = (color1, color2, factor) => { + if (factor > 1) factor = 1; + if (factor < 0) factor = 0; + + const c1 = decomposeColor(color1).values; + const c2 = decomposeColor(color2).values; + + const r = Math.round(c1[0] + factor * (c2[0] - c1[0])); + const g = Math.round(c1[1] + factor * (c2[1] - c1[1])); + const b = Math.round(c1[2] + factor * (c2[2] - c1[2])); + + return `rgb(${r}, ${g}, ${b})`; +}; + +export const getSpeedColor = (color1, color2, color3, speed, max) => { + const factor = speed / max; + if (factor <= 0.5) { + return interpolateColor(color1, color2, factor * 2); + } + return interpolateColor(color2, color3, (factor - 0.5) * 2); +}; diff --git a/src/index.jsx b/src/index.jsx index 3eb96d2f..932170e6 100644 --- a/src/index.jsx +++ b/src/index.jsx @@ -1,7 +1,3 @@ -import '@fontsource/roboto/300.css'; -import '@fontsource/roboto/400.css'; -import '@fontsource/roboto/500.css'; -import '@fontsource/roboto/700.css'; import React from 'react'; import { createRoot } from 'react-dom/client'; import { BrowserRouter } from 'react-router-dom'; diff --git a/src/main/DeviceList.jsx b/src/main/DeviceList.jsx index ce5819b2..b6e48b53 100644 --- a/src/main/DeviceList.jsx +++ b/src/main/DeviceList.jsx @@ -53,7 +53,7 @@ const DeviceList = ({ devices }) => { height={height} itemCount={devices.length} itemData={devices} - itemSize={72} + itemSize={155} overscanCount={10} innerRef={listInnerEl} > diff --git a/src/main/DeviceRow.jsx b/src/main/DeviceRow.jsx index b7c2646e..7edf64f7 100644 --- a/src/main/DeviceRow.jsx +++ b/src/main/DeviceRow.jsx @@ -74,7 +74,7 @@ const DeviceRow = ({ data, index, style }) => { const deviceSecondary = useAttributePreference('deviceSecondary', ''); const positionAttributes = usePositionAttributes(t); - const positionItems = useAttributePreference('positionItems', 'speed,address,totalDistance,course'); + const positionItems = ['speed', 'address', 'hours', 'serverTime']; const primaryText = () => { // RATIONALE: we connect output/out1 to engine lock @@ -115,6 +115,33 @@ const DeviceRow = ({ data, index, style }) => { return ( <> {deviceSecondary && item[deviceSecondary] && item[deviceSecondary]} + {/* RATIONALE: clients want more info in the list */} + {positionItems.map((attr) => { + if (position && (position.hasOwnProperty(attr) || position.attributes.hasOwnProperty(attr))) { + return ( + <AttrItem + key={attr} + attr={attr} + name={positionAttributes[attr]?.name || attr} + content={( + <PositionValue + position={position} + property={position.hasOwnProperty(attr) ? attr : null} + attribute={position.hasOwnProperty(attr) ? null : attr} + /> + )} + /> + ); + } + + return ( + <AttrItem + key={attr} + attr={attr} + name={positionAttributes[attr]?.name || attr} + /> + ); + })} </> ); }; @@ -187,13 +214,11 @@ const DeviceRow = ({ data, index, style }) => { const AttrItem = ({ attr, name, content }) => { const attrIcon = () => { switch(attr) { - case "address": return <PlaceIcon fontSize="inherit" />; - case "deviceTime": return <ScheduleIcon fontSize="inherit" />; - case "fixTime": return <ScheduleIcon fontSize="inherit" />; - case "hours": return <AvTimerIcon fontSize="inherit" />; - case "serverTime": return <ScheduleIcon fontSize="inherit" />; - case "speed": return <SpeedIcon fontSize="inherit" />; - default: return <b>{name}</b>; + case "address": return <PlaceIcon fontSize="inherit" />; + case "hours": return <AvTimerIcon fontSize="inherit" />; + case "speed": return <SpeedIcon fontSize="inherit" />; + case "serverTime": return <ScheduleIcon fontSize="inherit" />; + default: return <b>{name}</b>; } }; diff --git a/src/map/MapRouteCoordinates.js b/src/map/MapRouteCoordinates.js new file mode 100644 index 00000000..9a43ce4a --- /dev/null +++ b/src/map/MapRouteCoordinates.js @@ -0,0 +1,90 @@ +import { useTheme } from '@mui/styles'; +import { useId, useEffect } from 'react'; +import { useSelector } from 'react-redux'; +import { map } from './core/MapView'; + +const MapRouteCoordinates = ({ name, coordinates, deviceId }) => { + const id = useId(); + + const theme = useTheme(); + + const reportColor = useSelector((state) => { + const attributes = state.devices.items[deviceId]?.attributes; + if (attributes) { + const color = attributes['web.reportColor']; + if (color) { + return color; + } + } + return theme.palette.geometry.main; + }); + + useEffect(() => { + map.addSource(id, { + type: 'geojson', + data: { + type: 'Feature', + geometry: { + type: 'LineString', + coordinates: [], + }, + }, + }); + map.addLayer({ + source: id, + id: `${id}-line`, + type: 'line', + layout: { + 'line-join': 'round', + 'line-cap': 'round', + }, + paint: { + 'line-color': ['get', 'color'], + 'line-width': 2, + }, + }); + map.addLayer({ + source: id, + id: `${id}-title`, + type: 'symbol', + layout: { + 'text-field': '{name}', + 'text-size': 12, + }, + paint: { + 'text-halo-color': 'white', + 'text-halo-width': 1, + }, + }); + + return () => { + if (map.getLayer(`${id}-title`)) { + map.removeLayer(`${id}-title`); + } + if (map.getLayer(`${id}-line`)) { + map.removeLayer(`${id}-line`); + } + if (map.getSource(id)) { + map.removeSource(id); + } + }; + }, []); + + useEffect(() => { + map.getSource(id)?.setData({ + type: 'Feature', + geometry: { + type: 'LineString', + coordinates, + }, + properties: { + name, + color: reportColor, + }, + }); + }, [theme, coordinates, reportColor]); + + return null; +}; + +export default MapRouteCoordinates; diff --git a/src/map/MapRoutePath.js b/src/map/MapRoutePath.js index 20269140..716a4bd1 100644 --- a/src/map/MapRoutePath.js +++ b/src/map/MapRoutePath.js @@ -2,8 +2,9 @@ import { useTheme } from '@mui/styles'; import { useId, useEffect } from 'react'; import { useSelector } from 'react-redux'; import { map } from './core/MapView'; +import { getSpeedColor } from '../common/util/colors'; -const MapRoutePath = ({ name, positions, coordinates }) => { +const MapRoutePath = ({ positions }) => { const id = useId(); const theme = useTheme(); @@ -19,7 +20,7 @@ const MapRoutePath = ({ name, positions, coordinates }) => { } } } - return theme.palette.geometry.main; + return null; }); useEffect(() => { @@ -46,21 +47,6 @@ const MapRoutePath = ({ name, positions, coordinates }) => { 'line-width': 2, }, }); - if (name) { - map.addLayer({ - source: id, - id: `${id}-title`, - type: 'symbol', - layout: { - 'text-field': '{name}', - 'text-size': 12, - }, - paint: { - 'text-halo-color': 'white', - 'text-halo-width': 1, - }, - }); - } return () => { if (map.getLayer(`${id}-title`)) { @@ -76,21 +62,31 @@ const MapRoutePath = ({ name, positions, coordinates }) => { }, []); useEffect(() => { - if (!coordinates) { - coordinates = positions.map((item) => [item.longitude, item.latitude]); + const maxSpeed = positions.map((item) => item.speed).reduce((a, b) => Math.max(a, b), -Infinity); + const features = []; + for (let i = 0; i < positions.length - 1; i += 1) { + features.push({ + type: 'Feature', + geometry: { + type: 'LineString', + coordinates: [[positions[i].longitude, positions[i].latitude], [positions[i + 1].longitude, positions[i + 1].latitude]], + }, + properties: { + color: reportColor || getSpeedColor( + theme.palette.success.main, + theme.palette.warning.main, + theme.palette.error.main, + positions[i + 1].speed, + maxSpeed, + ), + }, + }); } map.getSource(id)?.setData({ - type: 'Feature', - geometry: { - type: 'LineString', - coordinates, - }, - properties: { - name, - color: reportColor, - }, + type: 'FeatureCollection', + features, }); - }, [theme, positions, coordinates, reportColor]); + }, [theme, positions, reportColor]); return null; }; diff --git a/src/map/MapRoutePoints.js b/src/map/MapRoutePoints.js index e329da81..929a0d50 100644 --- a/src/map/MapRoutePoints.js +++ b/src/map/MapRoutePoints.js @@ -1,8 +1,11 @@ import { useId, useCallback, useEffect } from 'react'; +import { useTheme } from '@mui/styles'; import { map } from './core/MapView'; +import { getSpeedColor } from '../common/util/colors'; const MapRoutePoints = ({ positions, onClick }) => { const id = useId(); + const theme = useTheme(); const onMouseEnter = () => map.getCanvas().style.cursor = 'pointer'; const onMouseLeave = () => map.getCanvas().style.cursor = ''; @@ -27,11 +30,13 @@ const MapRoutePoints = ({ positions, onClick }) => { id, type: 'symbol', source: id, + paint: { + 'text-color': ['get', 'color'], + }, layout: { - 'icon-image': 'arrow', - 'icon-allow-overlap': true, - 'icon-rotate': ['get', 'rotation'], - 'icon-rotation-alignment': 'map', + 'text-field': '▲', + 'text-allow-overlap': true, + 'text-rotate': ['get', 'rotation'], }, }); @@ -54,6 +59,7 @@ const MapRoutePoints = ({ positions, onClick }) => { }, [onMarkerClick]); useEffect(() => { + const maxSpeed = positions.map((p) => p.speed).reduce((a, b) => Math.max(a, b), -Infinity); map.getSource(id)?.setData({ type: 'FeatureCollection', features: positions.map((position, index) => ({ @@ -66,6 +72,7 @@ const MapRoutePoints = ({ positions, onClick }) => { index, id: position.id, rotation: position.course, + color: getSpeedColor(theme.palette.success.main, theme.palette.warning.main, theme.palette.error.main, position.speed, maxSpeed), }, })), }); diff --git a/src/map/core/MapView.jsx b/src/map/core/MapView.jsx index 6733bdde..99c84b3c 100644 --- a/src/map/core/MapView.jsx +++ b/src/map/core/MapView.jsx @@ -2,6 +2,7 @@ import mapboxglRtlTextUrl from '@mapbox/mapbox-gl-rtl-text/mapbox-gl-rtl-text.min?url'; import 'maplibre-gl/dist/maplibre-gl.css'; import maplibregl from 'maplibre-gl'; +import { googleProtocol } from 'maplibre-google-maps'; import React, { useRef, useLayoutEffect, useEffect, useState, } from 'react'; @@ -17,6 +18,7 @@ element.style.height = '100%'; element.style.boxSizing = 'initial'; maplibregl.setRTLTextPlugin(mapboxglRtlTextUrl); +maplibregl.addProtocol('google', googleProtocol); export const map = new maplibregl.Map({ container: element, diff --git a/src/map/core/preloadImages.js b/src/map/core/preloadImages.js index a0056d4c..19c3c35e 100644 --- a/src/map/core/preloadImages.js +++ b/src/map/core/preloadImages.js @@ -2,7 +2,6 @@ import { grey } from '@mui/material/colors'; import createPalette from '@mui/material/styles/createPalette'; import { loadImage, prepareIcon } from './mapUtil'; -import arrowSvg from '../../resources/images/arrow.svg'; import directionSvg from '../../resources/images/direction.svg'; import backgroundSvg from '../../resources/images/background.svg'; import animalSvg from '../../resources/images/icon/animal.svg'; @@ -65,7 +64,6 @@ export default async () => { const background = await loadImage(backgroundSvg); mapImages.background = await prepareIcon(background); mapImages.direction = await prepareIcon(await loadImage(directionSvg)); - mapImages.arrow = await prepareIcon(await loadImage(arrowSvg)); await Promise.all(Object.keys(mapIcons).map(async (category) => { const results = []; ['info', 'success', 'error', 'neutral'].forEach((color) => { diff --git a/src/map/core/useMapStyles.js b/src/map/core/useMapStyles.js index 7c3412b5..7e770010 100644 --- a/src/map/core/useMapStyles.js +++ b/src/map/core/useMapStyles.js @@ -30,6 +30,8 @@ const styleCustom = ({ tiles, minZoom, maxZoom, attribution }) => { export default () => { const t = useTranslation(); + // RATIONALE: revert to unofficial maps + // const googleKey = useAttributePreference('googleKey'); const mapTilerKey = useAttributePreference('mapTilerKey'); const locationIqKey = useAttributePreference('locationIqKey') || 'pk.0f147952a41c555a5b70614039fd148b'; const bingMapsKey = useAttributePreference('bingMapsKey'); @@ -114,14 +116,14 @@ export default () => { id: 'mapTilerBasic', title: t('mapMapTilerBasic'), style: `https://api.maptiler.com/maps/basic/style.json?key=${mapTilerKey}`, - available: !!mapTilerKey, + available: Boolean(mapTilerKey), attribute: 'mapTilerKey', }, { id: 'mapTilerHybrid', title: t('mapMapTilerHybrid'), style: `https://api.maptiler.com/maps/hybrid/style.json?key=${mapTilerKey}`, - available: !!mapTilerKey, + available: Boolean(mapTilerKey), attribute: 'mapTilerKey', }, { @@ -131,7 +133,7 @@ export default () => { tiles: [0, 1, 2, 3].map((i) => `https://t${i}.ssl.ak.dynamic.tiles.virtualearth.net/comp/ch/{quadkey}?mkt=en-US&it=G,L&shading=hill&og=1885&n=z`), maxZoom: 21, }), - available: !!bingMapsKey, + available: Boolean(bingMapsKey), attribute: 'bingMapsKey', }, { @@ -141,7 +143,7 @@ export default () => { tiles: [0, 1, 2, 3].map((i) => `https://ecn.t${i}.tiles.virtualearth.net/tiles/a{quadkey}.jpeg?g=12327`), maxZoom: 19, }), - available: !!bingMapsKey, + available: Boolean(bingMapsKey), attribute: 'bingMapsKey', }, { @@ -151,21 +153,21 @@ export default () => { tiles: [0, 1, 2, 3].map((i) => `https://t${i}.ssl.ak.dynamic.tiles.virtualearth.net/comp/ch/{quadkey}?mkt=en-US&it=A,G,L&og=1885&n=z`), maxZoom: 19, }), - available: !!bingMapsKey, + available: Boolean(bingMapsKey), attribute: 'bingMapsKey', }, { id: 'tomTomBasic', title: t('mapTomTomBasic'), style: `https://api.tomtom.com/map/1/style/20.0.0-8/basic_main.json?key=${tomTomKey}`, - available: !!tomTomKey, + available: Boolean(tomTomKey), attribute: 'tomTomKey', }, { id: 'hereBasic', title: t('mapHereBasic'), style: `https://assets.vector.hereapi.com/styles/berlin/base/mapbox/tilezen?apikey=${hereKey}`, - available: !!hereKey, + available: Boolean(hereKey), attribute: 'hereKey', }, { @@ -175,7 +177,7 @@ export default () => { tiles: [1, 2, 3, 4].map((i) => `https://${i}.aerial.maps.ls.hereapi.com/maptile/2.1/maptile/newest/hybrid.day/{z}/{x}/{y}/256/png8?apiKey=${hereKey}`), maxZoom: 20, }), - available: !!hereKey, + available: Boolean(hereKey), attribute: 'hereKey', }, { @@ -185,7 +187,7 @@ export default () => { tiles: [1, 2, 3, 4].map((i) => `https://${i}.aerial.maps.ls.hereapi.com/maptile/2.1/maptile/newest/satellite.day/{z}/{x}/{y}/256/png8?apiKey=${hereKey}`), maxZoom: 19, }), - available: !!hereKey, + available: Boolean(hereKey), attribute: 'hereKey', }, { @@ -214,7 +216,7 @@ export default () => { tiles: [`https://api.mapbox.com/styles/v1/mapbox/streets-v11/tiles/{z}/{x}/{y}?access_token=${mapboxAccessToken}`], maxZoom: 22, }), - available: !!mapboxAccessToken, + available: Boolean(mapboxAccessToken), attribute: 'mapboxAccessToken', }, { @@ -224,7 +226,7 @@ export default () => { tiles: [`https://api.mapbox.com/styles/v1/mapbox/dark-v11/tiles/{z}/{x}/{y}?access_token=${mapboxAccessToken}`], maxZoom: 22, }), - available: !!mapboxAccessToken, + available: Boolean(mapboxAccessToken), attribute: 'mapboxAccessToken', }, { @@ -234,7 +236,7 @@ export default () => { tiles: [`https://api.mapbox.com/styles/v1/mapbox/outdoors-v11/tiles/{z}/{x}/{y}?access_token=${mapboxAccessToken}`], maxZoom: 22, }), - available: !!mapboxAccessToken, + available: Boolean(mapboxAccessToken), attribute: 'mapboxAccessToken', }, { @@ -244,7 +246,7 @@ export default () => { tiles: [`https://api.mapbox.com/styles/v1/mapbox/satellite-streets-v11/tiles/{z}/{x}/{y}?access_token=${mapboxAccessToken}`], maxZoom: 22, }), - available: !!mapboxAccessToken, + available: Boolean(mapboxAccessToken), attribute: 'mapboxAccessToken', }, { @@ -253,7 +255,7 @@ export default () => { style: styleCustom({ tiles: [customMapUrl], }), - available: !!customMapUrl, + available: Boolean(customMapUrl), }, ], [t, mapTilerKey, locationIqKey, bingMapsKey, tomTomKey, hereKey, mapboxAccessToken, customMapUrl]); }; diff --git a/src/map/draw/MapGeofenceEdit.js b/src/map/draw/MapGeofenceEdit.js index 0f63509a..cbbf50bc 100644 --- a/src/map/draw/MapGeofenceEdit.js +++ b/src/map/draw/MapGeofenceEdit.js @@ -32,7 +32,6 @@ const draw = new MapboxDraw({ filter: ['all'], layout: { 'text-field': '{user_name}', - 'text-font': ['Roboto Regular'], 'text-size': 12, }, paint: { diff --git a/src/map/overlay/useMapOverlays.js b/src/map/overlay/useMapOverlays.js index dafb5f83..e1ba068a 100644 --- a/src/map/overlay/useMapOverlays.js +++ b/src/map/overlay/useMapOverlays.js @@ -17,6 +17,7 @@ const sourceOpenWeather = (style, key) => sourceCustom([ export default () => { const t = useTranslation(); + const googleKey = useAttributePreference('googleKey'); const openWeatherKey = useAttributePreference('openWeatherKey'); const tomTomKey = useAttributePreference('tomTomKey'); const hereKey = useAttributePreference('hereKey'); @@ -24,6 +25,13 @@ export default () => { return useMemo(() => [ { + id: 'googleTraffic', + title: t('mapGoogleTraffic'), + source: sourceCustom([`google://satellite/{z}/{x}/{y}?key=${googleKey}&layerType=layerTraffic&overlay=true`]), + available: Boolean(googleKey), + attribute: 'googleKey', + }, + { id: 'openSeaMap', title: t('mapOpenSeaMap'), source: sourceCustom(['https://tiles.openseamap.org/seamark/{z}/{x}/{y}.png']), @@ -39,49 +47,49 @@ export default () => { id: 'openWeatherClouds', title: t('mapOpenWeatherClouds'), source: sourceOpenWeather('clouds_new', openWeatherKey), - available: !!openWeatherKey, + available: Boolean(openWeatherKey), attribute: 'openWeatherKey', }, { id: 'openWeatherPrecipitation', title: t('mapOpenWeatherPrecipitation'), source: sourceOpenWeather('precipitation_new', openWeatherKey), - available: !!openWeatherKey, + available: Boolean(openWeatherKey), attribute: 'openWeatherKey', }, { id: 'openWeatherPressure', title: t('mapOpenWeatherPressure'), source: sourceOpenWeather('pressure_new', openWeatherKey), - available: !!openWeatherKey, + available: Boolean(openWeatherKey), attribute: 'openWeatherKey', }, { id: 'openWeatherWind', title: t('mapOpenWeatherWind'), source: sourceOpenWeather('wind_new', openWeatherKey), - available: !!openWeatherKey, + available: Boolean(openWeatherKey), attribute: 'openWeatherKey', }, { id: 'openWeatherTemperature', title: t('mapOpenWeatherTemperature'), source: sourceOpenWeather('temp_new', openWeatherKey), - available: !!openWeatherKey, + available: Boolean(openWeatherKey), attribute: 'openWeatherKey', }, { id: 'tomTomFlow', title: t('mapTomTomFlow'), source: sourceCustom([`https://api.tomtom.com/traffic/map/4/tile/flow/absolute/{z}/{x}/{y}.png?key=${tomTomKey}`]), - available: !!tomTomKey, + available: Boolean(tomTomKey), attribute: 'tomTomKey', }, { id: 'tomTomIncidents', title: t('mapTomTomIncidents'), source: sourceCustom([`https://api.tomtom.com/traffic/map/4/tile/incidents/s3/{z}/{x}/{y}.png?key=${tomTomKey}`]), - available: !!tomTomKey, + available: Boolean(tomTomKey), attribute: 'tomTomKey', }, { @@ -90,14 +98,14 @@ export default () => { source: sourceCustom( [1, 2, 3, 4].map((i) => `https://${i}.traffic.maps.ls.hereapi.com/maptile/2.1/flowtile/newest/normal.day/{z}/{x}/{y}/256/png8?apiKey=${hereKey}`), ), - available: !!hereKey, + available: Boolean(hereKey), attribute: 'hereKey', }, { id: 'custom', title: t('mapOverlayCustom'), - source: sourceCustom(customMapOverlay), - available: !!customMapOverlay, + source: sourceCustom([customMapOverlay]), + available: Boolean(customMapOverlay), }, - ], [t, openWeatherKey, tomTomKey, hereKey, customMapOverlay]); + ], [t, googleKey, openWeatherKey, tomTomKey, hereKey, customMapOverlay]); }; diff --git a/src/other/EmulatorPage.jsx b/src/other/EmulatorPage.jsx index 9adc129f..371bac7c 100644 --- a/src/other/EmulatorPage.jsx +++ b/src/other/EmulatorPage.jsx @@ -69,15 +69,26 @@ const EmulatorPage = () => { const handleClick = useCatch(async (latitude, longitude) => { if (deviceId) { - const params = new URLSearchParams(); - params.append('id', devices[deviceId].uniqueId); - params.append('lat', latitude); - params.append('lon', longitude); - - const response = await fetch(`http://${window.location.hostname}:5055?${params.toString()}`, { - method: 'GET', - mode: 'no-cors', - }); + let response; + if (window.location.protocol === 'https:') { + const formData = new FormData(); + formData.append('id', devices[deviceId].uniqueId); + formData.append('lat', latitude); + formData.append('lon', longitude); + response = await fetch(window.location.origin, { + method: 'POST', + body: formData, + }); + } else { + const params = new URLSearchParams(); + params.append('id', devices[deviceId].uniqueId); + params.append('lat', latitude); + params.append('lon', longitude); + response = await fetch(`http://${window.location.hostname}:5055?${params.toString()}`, { + method: 'POST', + mode: 'no-cors', + }); + } if (!response.ok) { throw Error(await response.text()); } diff --git a/src/reports/ChartReportPage.jsx b/src/reports/ChartReportPage.jsx index 8a3d01b8..63c4ceaa 100644 --- a/src/reports/ChartReportPage.jsx +++ b/src/reports/ChartReportPage.jsx @@ -33,6 +33,7 @@ const ChartReportPage = () => { const [items, setItems] = useState([]); const [types, setTypes] = useState(['speed']); const [type, setType] = useState('speed'); + const [timeType, setTimeType] = useState('fixTime'); const values = items.map((it) => it[type]); const minValue = Math.min(...values); @@ -52,6 +53,8 @@ const ChartReportPage = () => { const data = { ...position, ...position.attributes }; const formatted = {}; formatted.fixTime = dayjs(position.fixTime).valueOf(); + formatted.deviceTime = dayjs(position.deviceTime).valueOf(); + formatted.serverTime = dayjs(position.serverTime).valueOf(); Object.keys(data).filter((key) => !['id', 'deviceId'].includes(key)).forEach((key) => { const value = data[key]; if (typeof value === 'number') { @@ -112,6 +115,21 @@ const ChartReportPage = () => { </Select> </FormControl> </div> + <div className={classes.filterItem}> + <FormControl fullWidth> + <InputLabel>{t('reportTimeType')}</InputLabel> + <Select + label={t('reportTimeType')} + value={timeType} + onChange={(e) => setTimeType(e.target.value)} + disabled={!items.length} + > + <MenuItem value="fixTime">{t('positionFixTime')}</MenuItem> + <MenuItem value="deviceTime">{t('positionDeviceTime')}</MenuItem> + <MenuItem value="serverTime">{t('positionServerTime')}</MenuItem> + </Select> + </FormControl> + </div> </ReportFilter> {items.length > 0 && ( <div className={classes.chart}> @@ -123,7 +141,7 @@ const ChartReportPage = () => { }} > <XAxis - dataKey="fixTime" + dataKey={timeType} type="number" tickFormatter={(value) => formatTime(value, 'time')} domain={['dataMin', 'dataMax']} diff --git a/src/reports/CombinedReportPage.jsx b/src/reports/CombinedReportPage.jsx index 32ad5df0..46dbf66b 100644 --- a/src/reports/CombinedReportPage.jsx +++ b/src/reports/CombinedReportPage.jsx @@ -1,4 +1,4 @@ -import React, { useState } from 'react'; +import React, { useMemo, useState } from 'react'; import { useSelector } from 'react-redux'; import { Table, TableBody, TableCell, TableHead, TableRow, @@ -9,7 +9,6 @@ import PageLayout from '../common/components/PageLayout'; import ReportsMenu from './components/ReportsMenu'; import { useCatch } from '../reactHelper'; import MapView from '../map/core/MapView'; -import MapRoutePath from '../map/MapRoutePath'; import useReportStyles from './common/useReportStyles'; import TableShimmer from '../common/components/TableShimmer'; import MapCamera from '../map/MapCamera'; @@ -17,6 +16,7 @@ import MapGeofence from '../map/MapGeofence'; import { formatTime } from '../common/util/formatter'; import { prefixString } from '../common/util/stringUtils'; import MapMarkers from '../map/MapMarkers'; +import MapRouteCoordinates from '../map/MapRouteCoordinates'; const CombinedReportPage = () => { const classes = useReportStyles(); @@ -27,6 +27,8 @@ const CombinedReportPage = () => { const [items, setItems] = useState([]); const [loading, setLoading] = useState(false); + const itemsCoordinates = useMemo(() => items.flatMap((item) => item.route), [items]); + const createMarkers = () => items.flatMap((item) => item.events .map((event) => item.positions.find((p) => event.positionId === p.id)) .filter((position) => position != null) @@ -60,15 +62,16 @@ const CombinedReportPage = () => { <MapView> <MapGeofence /> {items.map((item) => ( - <MapRoutePath + <MapRouteCoordinates key={item.deviceId} name={devices[item.deviceId].name} coordinates={item.route} + deviceId={item.deviceId} /> ))} <MapMarkers markers={createMarkers()} /> </MapView> - <MapCamera coordinates={items.flatMap((item) => item.route)} /> + <MapCamera coordinates={itemsCoordinates} /> </div> )} <div className={classes.containerMain}> diff --git a/src/reports/components/ReportFilter.jsx b/src/reports/components/ReportFilter.jsx index 437a7487..fc60ed3a 100644 --- a/src/reports/components/ReportFilter.jsx +++ b/src/reports/components/ReportFilter.jsx @@ -11,7 +11,9 @@ import SplitButton from '../../common/components/SplitButton'; import SelectField from '../../common/components/SelectField'; import { useRestriction } from '../../common/util/permissions'; -const ReportFilter = ({ children, handleSubmit, handleSchedule, showOnly, ignoreDevice, multiDevice, includeGroups, loading }) => { +const ReportFilter = ({ + children, handleSubmit, handleSchedule, showOnly, ignoreDevice, multiDevice, includeGroups, loading, +}) => { const classes = useReportStyles(); const dispatch = useDispatch(); const t = useTranslation(); diff --git a/src/resources/images/arrow.svg b/src/resources/images/arrow.svg deleted file mode 100644 index d0f30a2e..00000000 --- a/src/resources/images/arrow.svg +++ /dev/null @@ -1,4 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<svg width="20px" height="20px" fill="#000000" version="1.1" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> - <path d="m12 2-7.5 18.29 0.71 0.71 6.79-3 6.79 3 0.71-0.71z" fill="#3bb2d0"/> -</svg> diff --git a/src/resources/l10n/af.json b/src/resources/l10n/af.json index 8437b5a5..5e224d27 100644 --- a/src/resources/l10n/af.json +++ b/src/resources/l10n/af.json @@ -359,6 +359,8 @@ "mapGoogleRoad": "Google Road", "mapGoogleHybrid": "Google Hybrid", "mapGoogleSatellite": "Google Satellite", + "mapGoogleTraffic": "Google Traffic", + "mapGoogleKey": "Google API Key", "mapOpenTopoMap": "OpenTopoMap", "mapBingKey": "Bing Kaart Sleutel", "mapBingRoad": "Bing Kaart Pad", @@ -573,6 +575,7 @@ "reportSpentFuel": "Brandstof Gebruik", "reportStartOdometer": "Odometer Begin", "reportEndOdometer": "Odometer Einde", + "reportTimeType": "Time", "statisticsTitle": "Statistieke", "statisticsCaptureTime": "Vang tyd vas", "statisticsActiveUsers": "Aktiewe Gebruikers", diff --git a/src/resources/l10n/ar.json b/src/resources/l10n/ar.json index 020b7e3e..9d527d35 100644 --- a/src/resources/l10n/ar.json +++ b/src/resources/l10n/ar.json @@ -359,6 +359,8 @@ "mapGoogleRoad": "Google Road", "mapGoogleHybrid": "Google Hybrid", "mapGoogleSatellite": "Google Satellite", + "mapGoogleTraffic": "Google Traffic", + "mapGoogleKey": "Google API Key", "mapOpenTopoMap": "OpenTopoMap", "mapBingKey": "مفتاح خرائط Bing", "mapBingRoad": "خرائط الطرق Bing", @@ -573,6 +575,7 @@ "reportSpentFuel": "الوقود المستنفد", "reportStartOdometer": "بدء عداد المسافة", "reportEndOdometer": "إنهاء Odometer", + "reportTimeType": "Time", "statisticsTitle": "إحصائيات", "statisticsCaptureTime": "وقت الالتقاط", "statisticsActiveUsers": "المستخدمون النشطون", diff --git a/src/resources/l10n/az.json b/src/resources/l10n/az.json index 09cf30d6..735842c5 100644 --- a/src/resources/l10n/az.json +++ b/src/resources/l10n/az.json @@ -359,6 +359,8 @@ "mapGoogleRoad": "Google Road", "mapGoogleHybrid": "Google Hybrid", "mapGoogleSatellite": "Google Satellite", + "mapGoogleTraffic": "Google Traffic", + "mapGoogleKey": "Google API Key", "mapOpenTopoMap": "OpenTopoMap", "mapBingKey": "Bing Maps Key", "mapBingRoad": "Bing Maps Road", @@ -573,6 +575,7 @@ "reportSpentFuel": "Yanacaq işləndi", "reportStartOdometer": "Odometer Start", "reportEndOdometer": "Odometer End", + "reportTimeType": "Time", "statisticsTitle": "Statistika", "statisticsCaptureTime": "Yığım vaxtı", "statisticsActiveUsers": "Aktiv istifadəçilər", diff --git a/src/resources/l10n/bg.json b/src/resources/l10n/bg.json index 8538bc50..29b87781 100644 --- a/src/resources/l10n/bg.json +++ b/src/resources/l10n/bg.json @@ -359,6 +359,8 @@ "mapGoogleRoad": "Google Road", "mapGoogleHybrid": "Google Hybrid", "mapGoogleSatellite": "Google Satellite", + "mapGoogleTraffic": "Google Traffic", + "mapGoogleKey": "Google API Key", "mapOpenTopoMap": "OpenTopoMap", "mapBingKey": "Ключ за Bing Maps", "mapBingRoad": "Bing Maps Road", @@ -573,6 +575,7 @@ "reportSpentFuel": "Изразходвано гориво", "reportStartOdometer": "Одометър Старт", "reportEndOdometer": "Одометър Стоп", + "reportTimeType": "Time", "statisticsTitle": "Статистики", "statisticsCaptureTime": "Дата", "statisticsActiveUsers": "Активни потребители", diff --git a/src/resources/l10n/bn.json b/src/resources/l10n/bn.json index ddda55dd..8edb5bbc 100644 --- a/src/resources/l10n/bn.json +++ b/src/resources/l10n/bn.json @@ -359,6 +359,8 @@ "mapGoogleRoad": "Google Road", "mapGoogleHybrid": "Google Hybrid", "mapGoogleSatellite": "Google Satellite", + "mapGoogleTraffic": "Google Traffic", + "mapGoogleKey": "Google API Key", "mapOpenTopoMap": "OpenTopoMap", "mapBingKey": "Bing Maps Key", "mapBingRoad": "Bing Maps Road", @@ -573,6 +575,7 @@ "reportSpentFuel": "ব্যয়িত জ্বালানি", "reportStartOdometer": "Odometer Start", "reportEndOdometer": "Odometer End", + "reportTimeType": "Time", "statisticsTitle": "পরিসংখ্যান", "statisticsCaptureTime": "সময় ক্যাপচার", "statisticsActiveUsers": "সক্রিয় ব্যবহারকারীগণ", diff --git a/src/resources/l10n/ca.json b/src/resources/l10n/ca.json index 6619412b..baec42a2 100644 --- a/src/resources/l10n/ca.json +++ b/src/resources/l10n/ca.json @@ -359,6 +359,8 @@ "mapGoogleRoad": "Google Road", "mapGoogleHybrid": "Google Hybrid", "mapGoogleSatellite": "Google Satellite", + "mapGoogleTraffic": "Google Traffic", + "mapGoogleKey": "Google API Key", "mapOpenTopoMap": "OpenTopoMap", "mapBingKey": "Clau Bing Maps", "mapBingRoad": "Bing Maps - Carretera", @@ -573,6 +575,7 @@ "reportSpentFuel": "Combustible consumit", "reportStartOdometer": "Odòmetre inical", "reportEndOdometer": "Odòmetre final", + "reportTimeType": "Time", "statisticsTitle": "Estadístiques", "statisticsCaptureTime": "Data de captura", "statisticsActiveUsers": "Usuaris Actius", diff --git a/src/resources/l10n/cs.json b/src/resources/l10n/cs.json index 5c9e53f3..ba413abd 100644 --- a/src/resources/l10n/cs.json +++ b/src/resources/l10n/cs.json @@ -35,7 +35,7 @@ "sharedName": "Jméno", "sharedDescription": "Popis", "sharedSearch": "Hledat", - "sharedPriority": "Priority", + "sharedPriority": "Přednost", "sharedIconScale": "Velikost ikony", "sharedGeofence": "Zóna", "sharedGeofences": "Zóny", @@ -105,7 +105,7 @@ "sharedDropzoneText": "Přetáhněte soubor sem nebo klikněte", "sharedLogs": "Protokoly", "sharedLink": "Odkaz", - "sharedEmulator": "Emulator", + "sharedEmulator": "Emulátor", "calendarSimple": "Jednoduchý", "calendarRecurrence": "Opakování", "calendarOnce": "Jednou", @@ -337,7 +337,7 @@ "serverLogoInverted": "Barevně obrácený obrázek loga", "serverChangeDisable": "Zakázat změnu serveru", "serverDisableShare": "Zakázat sdílení zařízení", - "serverReboot": "Reboot", + "serverReboot": "Reštartovať", "mapTitle": "Mapa", "mapActive": "Aktivní mapy", "mapOverlay": "Překrytí mapy", @@ -359,6 +359,8 @@ "mapGoogleRoad": "Google Road", "mapGoogleHybrid": "Google Hybrid", "mapGoogleSatellite": "Google Satelit", + "mapGoogleTraffic": "Provoz Google", + "mapGoogleKey": "Klíč Google API", "mapOpenTopoMap": "OpenTopoMap", "mapBingKey": "Bing Maps klíč", "mapBingRoad": "Bing Maps silniční", @@ -562,8 +564,8 @@ "reportAverageSpeed": "Průměrná rychlost", "reportMaximumSpeed": "Maximální rychlost", "reportEngineHours": "Motohodiny", - "reportStartEngineHours": "Start Engine Hours", - "reportEndEngineHours": "End Engine Hours", + "reportStartEngineHours": "Start provozu motoru", + "reportEndEngineHours": "Konec provozu motoru", "reportDuration": "Trvání", "reportStartDate": "Počáteční datum", "reportStartTime": "Čas startu", @@ -573,6 +575,7 @@ "reportSpentFuel": "Spotřebované palivo", "reportStartOdometer": "Start počítadla kilometrů", "reportEndOdometer": "Konec počítadla kilometrů", + "reportTimeType": "Čas", "statisticsTitle": "Statistiky", "statisticsCaptureTime": "Čas zachycení", "statisticsActiveUsers": "Aktivní uživatelé", diff --git a/src/resources/l10n/da.json b/src/resources/l10n/da.json index 09e2546b..bb42d4d0 100644 --- a/src/resources/l10n/da.json +++ b/src/resources/l10n/da.json @@ -359,6 +359,8 @@ "mapGoogleRoad": "Google Road", "mapGoogleHybrid": "Google Hybrid", "mapGoogleSatellite": "Google Satellite", + "mapGoogleTraffic": "Google Traffic", + "mapGoogleKey": "Google API Key", "mapOpenTopoMap": "OpenTopoMap", "mapBingKey": "Bing Maps Key", "mapBingRoad": "Bing Maps Road", @@ -573,6 +575,7 @@ "reportSpentFuel": "Brændstof forbrug", "reportStartOdometer": "Kilometertæller start", "reportEndOdometer": "Kilometertæller slut", + "reportTimeType": "Time", "statisticsTitle": "Statistik", "statisticsCaptureTime": "Noter tid", "statisticsActiveUsers": "Aktive brugere", diff --git a/src/resources/l10n/de.json b/src/resources/l10n/de.json index 3e252446..e1735029 100644 --- a/src/resources/l10n/de.json +++ b/src/resources/l10n/de.json @@ -35,7 +35,7 @@ "sharedName": "Name", "sharedDescription": "Beschreibung", "sharedSearch": "Suchen", - "sharedPriority": "Priority", + "sharedPriority": "Priorität", "sharedIconScale": "Icon-Skalierung", "sharedGeofence": "Geo-Zaun", "sharedGeofences": "Geo-Zäune", @@ -337,7 +337,7 @@ "serverLogoInverted": "Umgekehrte Logografik", "serverChangeDisable": "Serverwechsel deaktivieren", "serverDisableShare": "Gerätefreigabe deaktivieren", - "serverReboot": "Reboot", + "serverReboot": "Neustart", "mapTitle": "Karte", "mapActive": "Aktive Karte", "mapOverlay": "Karten Overlay", @@ -359,6 +359,8 @@ "mapGoogleRoad": "Google Straßen", "mapGoogleHybrid": "Google Hybrid", "mapGoogleSatellite": "Google Satellit", + "mapGoogleTraffic": "Google Verkehr", + "mapGoogleKey": "Google API Key", "mapOpenTopoMap": "OpenTopoMap", "mapBingKey": "Bing Maps Key", "mapBingRoad": "Bing Strassenkarte", @@ -573,6 +575,7 @@ "reportSpentFuel": "Kraftstoffverbrauch", "reportStartOdometer": "Kilometerstand Start", "reportEndOdometer": "Kilometerstand Ende", + "reportTimeType": "Zeit", "statisticsTitle": "Statistiken", "statisticsCaptureTime": "Zeitpunkt", "statisticsActiveUsers": "Aktive Benutzer", diff --git a/src/resources/l10n/el.json b/src/resources/l10n/el.json index 5331f397..615f901f 100644 --- a/src/resources/l10n/el.json +++ b/src/resources/l10n/el.json @@ -2,24 +2,24 @@ "sharedLoading": "Φόρτωση...", "sharedHide": "Απόκρυψη", "sharedSave": "Αποθήκευση", - "sharedUpload": "Upload", + "sharedUpload": "Ανέβασμα", "sharedSet": "Θέσε", - "sharedAccept": "Accept", + "sharedAccept": "Αποδοχή", "sharedCancel": "Άκυρο", - "sharedCopy": "Copy", + "sharedCopy": "Αντιγραφή", "sharedAdd": "Προσθήκη", "sharedEdit": "Επεξεργασία", "sharedRemove": "Διαγραφή", "sharedRemoveConfirm": "Διαγραφη στοιχείου;", "sharedNoData": "Χωρίς δεδομένα", - "sharedSubject": "Subject", + "sharedSubject": "Θέμα", "sharedYes": "Ναι", "sharedNo": "Όχι", "sharedKm": "χλμ", "sharedMi": "μίλια", "sharedNmi": "nmi", "sharedMeters": "μ.", - "sharedFeet": "ft", + "sharedFeet": "πόδια", "sharedKn": "κόμβοι", "sharedKmh": "χλμ/ώρα", "sharedMph": "μίλια/ώρα", @@ -35,7 +35,7 @@ "sharedName": "Όνομα", "sharedDescription": "Περιγραφή", "sharedSearch": "Αναζήτηση", - "sharedPriority": "Priority", + "sharedPriority": "Προτεραιότητα", "sharedIconScale": "Κλίμακα εικονιδίων", "sharedGeofence": "Γεωφράχτης", "sharedGeofences": "Γεωφράχτες", @@ -103,9 +103,9 @@ "sharedImport": "Εισαγωγή", "sharedColumns": "Στήλες", "sharedDropzoneText": "Σύρετε και αποθέστε ένα αρχείο εδώ ή κάντε κλικ", - "sharedLogs": "Logs", - "sharedLink": "Link", - "sharedEmulator": "Emulator", + "sharedLogs": "Αρχεία καταγραφής", + "sharedLink": "Σύνδεσμος", + "sharedEmulator": "Προσομοιωτής", "calendarSimple": "Απλό", "calendarRecurrence": "Επανάληψη", "calendarOnce": "Μια φορά", @@ -150,11 +150,11 @@ "attributeMailSmtpAuth": "Αλληλογραφία: Ενεργοποίηση Πιστοποίησης SMTP", "attributeMailSmtpUsername": "Αλληλογραφία: Κωδικός SMTP", "attributeMailSmtpPassword": "Αλληλογραφία: SMTP Συνθηματικό", - "attributeUiDisableSavedCommands": "UI: Disable Saved Commands", + "attributeUiDisableSavedCommands": "Διεπαφή: Απενεργοποίηση Αποθηκευμένων Εντολών", "attributeUiDisableAttributes": "Διεπαφή: Απενεργοποίηση χαρακτηριστικών", "attributeUiDisableGroups": "Διεπαφή: Απενεργοποίηση ομάδων", "attributeUiDisableEvents": "Διεπαφή: Απενεργοποίηση Γεγονότων", - "attributeUiDisableVehicleFeatures": "UI: Disable Vehicle Features", + "attributeUiDisableVehicleFeatures": "Διεπαφή: Απενεργοποίηση Χαρακτηριστικών Οχήματος", "attributeUiDisableDrivers": "Διεπαφή: Απενεργοποίηση Οδηγών", "attributeUiDisableComputedAttributes": "Διεπαφή: Απενεργοποίηση Υπολογισμένων Ιδιοτήτων", "attributeUiDisableCalendars": "Διεπαφή: Απενεργοποίηση Ημερολογίων", @@ -181,25 +181,25 @@ "userFixedEmail": "Δεν επιτρέπεται η αλλαγή email", "userToken": "Λεκτικό", "userDeleteAccount": "Διαγραφή λογαριασμού", - "userTemporary": "Temporary", - "userTerms": "Terms of Service", - "userPrivacy": "Privacy Policy", - "userTermsPrompt": "By clicking Accept, you agree to our Terms of Service and confirm that you have read our Privacy Policy.", - "userTermsAccepted": "Terms Accepted", + "userTemporary": "Προσωρινό", + "userTerms": "Όροι Χρήσης", + "userPrivacy": "Πολιτική Ιδιωτικότητας", + "userTermsPrompt": "Κλικάροντας το Αποδοχή, συμφωνείτε με τους Όρους Χρήσης και επιβεβαιώνετε ότι έχετε διαβάσει την πολιτική ιδιωτικότητας.", + "userTermsAccepted": "Οι όροι έγιναν αποδεκτοί", "loginTitle": "Σύνδεση", "loginLanguage": "Γλώσσα", "loginReset": "Επαναφορά κωδικού", "loginRegister": "Εγγραφή", "loginLogin": "Σύνδεση", - "loginOpenId": "Login with OpenID", + "loginOpenId": "Σύνδεση με OpenID", "loginFailed": "Εσφαλμένη διεύθυνση ή εσφαλμένο συνθηματικό", "loginCreated": "Ο νέος χρήστης καταχωρήθηκε.", "loginResetSuccess": "Ελέγξτε τα email σας", "loginUpdateSuccess": "Το νέο συνθηματικό αποθηκεύθηκε", "loginLogout": "Αποσύνδεση", "loginLogo": "Λογότυπο", - "loginTotpCode": "One-time Password Code", - "loginTotpKey": "One-time Password Key", + "loginTotpCode": "Κωδικός One-time Password", + "loginTotpKey": "Κλειδί One-time password", "devicesAndState": "Κατάσταση συσκευών", "deviceSelected": "Επιλεγμένη συσκευή", "deviceTitle": "Συσκευές", @@ -219,7 +219,7 @@ "deviceStatusUnknown": "Άγνωστο", "deviceRegisterFirst": "Καταχωρίστε την πρώτη σας συσκευή", "deviceIdentifierHelp": "IMEI, σειριακός αριθμός ή άλλο αναγνωριστικό. Πρέπει να ταιριάζει με τις αναφορές της συσκευής στον διακομιστή.", - "deviceShare": "Share Device", + "deviceShare": "Διαμοιρασμός Συσκευής", "groupDialog": "Ομάδα", "groupParent": "Ομάδα", "groupNoGroup": "Χωρίς Ομάδα", @@ -237,12 +237,12 @@ "settingsServerVersion": "Έκδοση διακομιστή", "settingsAppVersion": "Έκδοση εφαρμογής", "settingsConnection": "Connection", - "settingsDarkMode": "Dark Mode", - "settingsTotpEnable": "Enable One-time Password", - "settingsTotpForce": "Force One-time Password", - "settingsServiceWorkerUpdateInterval": "ServiceWorker Update Interval", - "settingsUpdateAvailable": "There is an update available.", - "settingsSupport": "Support", + "settingsDarkMode": "Σκοτεινή Εμφάνιση", + "settingsTotpEnable": "Ενεργοποίηση One-time Password", + "settingsTotpForce": "Επιβολή One-time Password", + "settingsServiceWorkerUpdateInterval": "Διάστημα Ενημέρωσης του ServiceWorker", + "settingsUpdateAvailable": "Υπάρχει διαθέσιμη ενημέρωση", + "settingsSupport": "Υποστήριξη", "reportTitle": "Αναφορές", "reportScheduled": "Προγραμματισμένες αναφορές", "reportDevice": "Συσκευή", @@ -254,7 +254,7 @@ "linkGoogleMaps": "Χάρτες Google", "linkAppleMaps": "Χάρτες Apple", "linkStreetView": "Street View", - "positionFixTime": "Διόρθωση χρόνου", + "positionFixTime": "Χρόνος GPS", "positionDeviceTime": "Χρόνος συσκευής", "positionServerTime": "Χρόνος Διακομιστή", "positionValid": "Έγκυρο", @@ -290,7 +290,7 @@ "positionHours": "Ώρες", "positionSteps": "Βήματα", "positionInput": "Είσοδος", - "positionHeartRate": "Heart Rate", + "positionHeartRate": "Καρδιακός Ρυθμός", "positionOutput": "Έξοδος", "positionBatteryLevel": "Επίπεδο Συσσωρευτή", "positionFuelConsumption": "Κατανάλωση καυσίμου", @@ -310,16 +310,16 @@ "positionAcceleration": "Επιτάχυνση", "positionTemp": "Θερμοκρασία", "positionDeviceTemp": "Θερμοκρασία συσκευής", - "positionCoolantTemp": "Coolant Temperature", + "positionCoolantTemp": "Θερμοκρασία Ψυκτικού", "positionOperator": "Χειριστής", "positionCommand": "Εντολή", "positionBlocked": "Αποκλεισμένο", "positionDtcs": "DTCs", "positionObdSpeed": "Ταχύτητα OBD", "positionObdOdometer": "Χιλιομετρητής OBD", - "positionDrivingTime": "Driving Time", + "positionDrivingTime": "Χρόνος Οδήγησης", "positionDriverUniqueId": "Αναγνωριστικό οδηγού", - "positionCard": "Card", + "positionCard": "Κάρτα", "positionImage": "Εικόνα", "positionVideo": "Βίντεο", "positionAudio": "Ήχος", @@ -329,15 +329,15 @@ "serverReadonly": "Μόνο για ανάγνωση", "serverForceSettings": "Επιβολή ρυθμίσεων", "serverAnnouncement": "Αναγγελία", - "serverName": "Server Name", - "serverDescription": "Server Description", - "serverColorPrimary": "Color Primary", - "serverColorSecondary": "Color Secondary", - "serverLogo": "Logo Image", - "serverLogoInverted": "Inverted Logo Image", - "serverChangeDisable": "Disable Server Change", - "serverDisableShare": "Disable Device Sharing", - "serverReboot": "Reboot", + "serverName": "Όνομα Διακομιστή", + "serverDescription": "Περιγραφή Διακομιστή", + "serverColorPrimary": "Πρωτεύον Χρώμα", + "serverColorSecondary": "Δευτερεύον Χρώμα", + "serverLogo": "Λογότυπο", + "serverLogoInverted": "Αντίθετο Λογότυπο", + "serverChangeDisable": "Απενεργοποίηση Αλλαγής Διακομιστή", + "serverDisableShare": "Απενεργοποίηση Διαμοιρασμού Συσκευής", + "serverReboot": "Επανεκκίνηση", "mapTitle": "Χάρτης", "mapActive": "Ενεργοί Χάρτες", "mapOverlay": "Υπέρθεση Χάρτη", @@ -359,6 +359,8 @@ "mapGoogleRoad": "Google Road", "mapGoogleHybrid": "Google Hybrid", "mapGoogleSatellite": "OpenTopoMap", + "mapGoogleTraffic": "Google Traffic", + "mapGoogleKey": "Google API Key", "mapOpenTopoMap": "OpenTopoMap", "mapBingKey": "Κλειδί Bing Maps", "mapBingRoad": "Bing Maps Road", @@ -573,6 +575,7 @@ "reportSpentFuel": "Κατανάλωση καυσίμων", "reportStartOdometer": "Έναρξη χιλιομετρητή", "reportEndOdometer": "Τέλος χιλιομετρητή", + "reportTimeType": "Time", "statisticsTitle": "Στατιστικά", "statisticsCaptureTime": "Ώρα Καταγραφής", "statisticsActiveUsers": "Ενεργοί Χρήστες", diff --git a/src/resources/l10n/en.json b/src/resources/l10n/en.json index 608c36d8..f541b3a2 100644 --- a/src/resources/l10n/en.json +++ b/src/resources/l10n/en.json @@ -359,6 +359,8 @@ "mapGoogleRoad": "Google Road", "mapGoogleHybrid": "Google Hybrid", "mapGoogleSatellite": "Google Satellite", + "mapGoogleTraffic": "Google Traffic", + "mapGoogleKey": "Google API Key", "mapOpenTopoMap": "OpenTopoMap", "mapBingKey": "Bing Maps Key", "mapBingRoad": "Bing Maps Road", @@ -573,6 +575,7 @@ "reportSpentFuel": "Spent Fuel", "reportStartOdometer": "Odometer Start", "reportEndOdometer": "Odometer End", + "reportTimeType": "Time", "statisticsTitle": "Statistics", "statisticsCaptureTime": "Capture Time", "statisticsActiveUsers": "Active Users", diff --git a/src/resources/l10n/es.json b/src/resources/l10n/es.json index 8c9ce749..57461771 100644 --- a/src/resources/l10n/es.json +++ b/src/resources/l10n/es.json @@ -337,7 +337,7 @@ "serverLogoInverted": "Imagen de logo invertida", "serverChangeDisable": "Deshabilitar el cambio de servidor", "serverDisableShare": "Deshabilitar poder Compartir Dispositivos", - "serverReboot": "Reboot", + "serverReboot": "Reiniciar", "mapTitle": "Mapa", "mapActive": "Mapas activos", "mapOverlay": "Capa sobre el mapa", @@ -359,6 +359,8 @@ "mapGoogleRoad": "Google Carreteras", "mapGoogleHybrid": "Google Híbrido", "mapGoogleSatellite": "Google Satélite", + "mapGoogleTraffic": "Google Traffic", + "mapGoogleKey": "Google API Key", "mapOpenTopoMap": "OpenTopoMap", "mapBingKey": "Bing Maps Key", "mapBingRoad": "Bing Maps - Carretera", @@ -573,6 +575,7 @@ "reportSpentFuel": "Combustible consumido", "reportStartOdometer": "Odómetro inicial", "reportEndOdometer": "Odómetro final", + "reportTimeType": "Hora", "statisticsTitle": "Estadísticas", "statisticsCaptureTime": "Fecha de captura", "statisticsActiveUsers": "Usuarios activos", diff --git a/src/resources/l10n/fa.json b/src/resources/l10n/fa.json index 50d949e2..c6373249 100644 --- a/src/resources/l10n/fa.json +++ b/src/resources/l10n/fa.json @@ -359,6 +359,8 @@ "mapGoogleRoad": "Google جاده", "mapGoogleHybrid": "Google Hybrid", "mapGoogleSatellite": "Google ماهواره", + "mapGoogleTraffic": "Google Traffic", + "mapGoogleKey": "Google API Key", "mapOpenTopoMap": "OpenTopoMap", "mapBingKey": "Bing کلید نقشه", "mapBingRoad": "Bing نقشه جاده", @@ -573,6 +575,7 @@ "reportSpentFuel": "مصرف سوخت", "reportStartOdometer": "شروع کیلومترشمار", "reportEndOdometer": "پایان کیلومتر شمار", + "reportTimeType": "Time", "statisticsTitle": "گزارشات", "statisticsCaptureTime": "زمان ضبط", "statisticsActiveUsers": "کاربران فعال", diff --git a/src/resources/l10n/fi.json b/src/resources/l10n/fi.json index ba2c19ea..12c034ca 100644 --- a/src/resources/l10n/fi.json +++ b/src/resources/l10n/fi.json @@ -359,6 +359,8 @@ "mapGoogleRoad": "Google katukartta", "mapGoogleHybrid": "Google Hybrid", "mapGoogleSatellite": "Google ilmakuva", + "mapGoogleTraffic": "Google Traffic", + "mapGoogleKey": "Google API Key", "mapOpenTopoMap": "OpenTopoMap", "mapBingKey": "Bing Maps -avain", "mapBingRoad": "Bing Maps -tiet", @@ -573,6 +575,7 @@ "reportSpentFuel": "Käytetty polttoaine", "reportStartOdometer": "Matkamittari alussa", "reportEndOdometer": "Matkamittari lopussa", + "reportTimeType": "Time", "statisticsTitle": "Tilastot", "statisticsCaptureTime": "Tarkasteluaika", "statisticsActiveUsers": "Aktiivisia käyttäjiä", diff --git a/src/resources/l10n/fr.json b/src/resources/l10n/fr.json index 84ed00fa..1d0d8e12 100644 --- a/src/resources/l10n/fr.json +++ b/src/resources/l10n/fr.json @@ -359,6 +359,8 @@ "mapGoogleRoad": "Google Road", "mapGoogleHybrid": "Google Hybrid", "mapGoogleSatellite": "Google Satellite", + "mapGoogleTraffic": "Google Traffic", + "mapGoogleKey": "Google API Key", "mapOpenTopoMap": "OpenTopoMap", "mapBingKey": "Bing Maps Clé d'API", "mapBingRoad": "Bing Maps Road", @@ -573,6 +575,7 @@ "reportSpentFuel": "Consommation de carburant", "reportStartOdometer": "Départ de l'odomètre", "reportEndOdometer": "Arrêt de l'odomètre", + "reportTimeType": "Time", "statisticsTitle": "Statistiques", "statisticsCaptureTime": "Heure de capture", "statisticsActiveUsers": "Utilisateurs actifs", diff --git a/src/resources/l10n/gl.json b/src/resources/l10n/gl.json index 9c86834d..bae478df 100644 --- a/src/resources/l10n/gl.json +++ b/src/resources/l10n/gl.json @@ -359,6 +359,8 @@ "mapGoogleRoad": "Google Road", "mapGoogleHybrid": "Google Hybrid", "mapGoogleSatellite": "Google Satellite", + "mapGoogleTraffic": "Google Traffic", + "mapGoogleKey": "Google API Key", "mapOpenTopoMap": "OpenTopoMap", "mapBingKey": "Bing Maps - Clave", "mapBingRoad": "Bing Maps - Carreteras", @@ -573,6 +575,7 @@ "reportSpentFuel": "Combustible gastado", "reportStartOdometer": "Odómetro inicial", "reportEndOdometer": "Odómetro final", + "reportTimeType": "Time", "statisticsTitle": "Estatísticas", "statisticsCaptureTime": "Fecha de captura", "statisticsActiveUsers": "Usuarios activos", diff --git a/src/resources/l10n/he.json b/src/resources/l10n/he.json index 314ac5c6..385beaf9 100644 --- a/src/resources/l10n/he.json +++ b/src/resources/l10n/he.json @@ -359,6 +359,8 @@ "mapGoogleRoad": "Google Road", "mapGoogleHybrid": "Google Hybrid", "mapGoogleSatellite": "Google Satellite", + "mapGoogleTraffic": "Google Traffic", + "mapGoogleKey": "Google API Key", "mapOpenTopoMap": "OpenTopoMap", "mapBingKey": "מפתח מפות בינג", "mapBingRoad": "מפות כביש בינג", @@ -573,6 +575,7 @@ "reportSpentFuel": "צריכת דלק", "reportStartOdometer": "ספידומטר קמ התחלתי", "reportEndOdometer": "ספידומטר קמ סוף ", + "reportTimeType": "Time", "statisticsTitle": "סטטיסטיקה", "statisticsCaptureTime": "פרק זמן", "statisticsActiveUsers": "משתמשים פעילים", diff --git a/src/resources/l10n/hi.json b/src/resources/l10n/hi.json index 879451dd..4f1c638c 100644 --- a/src/resources/l10n/hi.json +++ b/src/resources/l10n/hi.json @@ -359,6 +359,8 @@ "mapGoogleRoad": "Google Road", "mapGoogleHybrid": "Google Hybrid", "mapGoogleSatellite": "Google Satellite", + "mapGoogleTraffic": "Google Traffic", + "mapGoogleKey": "Google API Key", "mapOpenTopoMap": "OpenTopoMap", "mapBingKey": "बिंग मैप्स की कुंजी", "mapBingRoad": "बिंग मैप्स रोड / सड़क", @@ -573,6 +575,7 @@ "reportSpentFuel": "ईंधन खर्च", "reportStartOdometer": "Odometer Start", "reportEndOdometer": "Odometer End", + "reportTimeType": "Time", "statisticsTitle": "आंकड़े", "statisticsCaptureTime": "समय कैप्चर करें", "statisticsActiveUsers": "सक्रिय उपयोगकर्ता", diff --git a/src/resources/l10n/hr.json b/src/resources/l10n/hr.json index 3ca14fcf..1f96aeb0 100644 --- a/src/resources/l10n/hr.json +++ b/src/resources/l10n/hr.json @@ -359,6 +359,8 @@ "mapGoogleRoad": "Google Road", "mapGoogleHybrid": "Google Hybrid", "mapGoogleSatellite": "Google Satellite", + "mapGoogleTraffic": "Google Traffic", + "mapGoogleKey": "Google API Key", "mapOpenTopoMap": "OpenTopoMap", "mapBingKey": "Bing Maps Key", "mapBingRoad": "Bing Maps Road", @@ -573,6 +575,7 @@ "reportSpentFuel": "Potrošeno goriva", "reportStartOdometer": "Početna kilometraža", "reportEndOdometer": "Završna kilometraža", + "reportTimeType": "Time", "statisticsTitle": "Statistike", "statisticsCaptureTime": "Vrijeme dohvaćanja", "statisticsActiveUsers": "Aktivnih korisnika", diff --git a/src/resources/l10n/hu.json b/src/resources/l10n/hu.json index a9520228..eee7253d 100644 --- a/src/resources/l10n/hu.json +++ b/src/resources/l10n/hu.json @@ -359,6 +359,8 @@ "mapGoogleRoad": "Google Road", "mapGoogleHybrid": "Google Hybrid", "mapGoogleSatellite": "Google Satellite", + "mapGoogleTraffic": "Google Traffic", + "mapGoogleKey": "Google API Key", "mapOpenTopoMap": "OpenTopoMap", "mapBingKey": "Bing Maps kulcs", "mapBingRoad": "Bing Maps Road", @@ -573,6 +575,7 @@ "reportSpentFuel": "Elhasznált üzemanyag", "reportStartOdometer": "Kilométer start", "reportEndOdometer": "Kilométer Vég", + "reportTimeType": "Time", "statisticsTitle": "Statisztika", "statisticsCaptureTime": "Rögzítés ideje", "statisticsActiveUsers": "Aktív felhasználók", diff --git a/src/resources/l10n/id.json b/src/resources/l10n/id.json index 0c1910a1..039c081e 100644 --- a/src/resources/l10n/id.json +++ b/src/resources/l10n/id.json @@ -359,6 +359,8 @@ "mapGoogleRoad": "Google Road", "mapGoogleHybrid": "Google Hybrid", "mapGoogleSatellite": "Google Satellite", + "mapGoogleTraffic": "Google Traffic", + "mapGoogleKey": "Google API Key", "mapOpenTopoMap": "OpenTopoMap", "mapBingKey": "Key Peta Bing", "mapBingRoad": "Peta Jalan Bing", @@ -573,6 +575,7 @@ "reportSpentFuel": "BBM Terpakai", "reportStartOdometer": "Odometer Start", "reportEndOdometer": "Odometer End", + "reportTimeType": "Time", "statisticsTitle": "Statistik", "statisticsCaptureTime": "Waktu Didapat", "statisticsActiveUsers": "Pengguna Aktif", diff --git a/src/resources/l10n/it.json b/src/resources/l10n/it.json index 93756f25..e7cb616b 100644 --- a/src/resources/l10n/it.json +++ b/src/resources/l10n/it.json @@ -4,7 +4,7 @@ "sharedSave": "Salva", "sharedUpload": "Carica", "sharedSet": "Imposta", - "sharedAccept": "Accept", + "sharedAccept": "Accettare", "sharedCancel": "Annulla", "sharedCopy": "Copia", "sharedAdd": "Aggiungi", @@ -35,7 +35,7 @@ "sharedName": "Nome", "sharedDescription": "Descrizione", "sharedSearch": "Cerca", - "sharedPriority": "Priority", + "sharedPriority": "Priorità", "sharedIconScale": "Grandezza Icona", "sharedGeofence": "Geo Area", "sharedGeofences": "Geo Aree", @@ -105,7 +105,7 @@ "sharedDropzoneText": "Trascina un file qui o clicca", "sharedLogs": "Registri", "sharedLink": "Collegamento", - "sharedEmulator": "Emulator", + "sharedEmulator": "Emulatore", "calendarSimple": "Semplice", "calendarRecurrence": "Ricorrente", "calendarOnce": "Una volta", @@ -150,7 +150,7 @@ "attributeMailSmtpAuth": "Mail: Attiva Autenticazione SMTP", "attributeMailSmtpUsername": "Mail: Nome Utente SMTP", "attributeMailSmtpPassword": "Mail: Password SMTP", - "attributeUiDisableSavedCommands": "UI: Disable Saved Commands", + "attributeUiDisableSavedCommands": "UI: Disattiva Comandi Salvati", "attributeUiDisableAttributes": "UI: Disattiva Attributi", "attributeUiDisableGroups": "UI: Disattiva Gruppi", "attributeUiDisableEvents": "UI: Disattiva Eventi", @@ -182,10 +182,10 @@ "userToken": "Token", "userDeleteAccount": "Elimina Account", "userTemporary": "Temporaneo", - "userTerms": "Terms of Service", - "userPrivacy": "Privacy Policy", - "userTermsPrompt": "By clicking Accept, you agree to our Terms of Service and confirm that you have read our Privacy Policy.", - "userTermsAccepted": "Terms Accepted", + "userTerms": "Termini di Servizio", + "userPrivacy": "Politica sulla Riservatezza", + "userTermsPrompt": "Facendo clic su Accetto, accetti i nostri Termini di servizio e confermi di aver letto la nostra Informativa sulla privacy.", + "userTermsAccepted": "Termini Accettati", "loginTitle": "Accesso", "loginLanguage": "Lingua", "loginReset": "Resetta Password", @@ -337,7 +337,7 @@ "serverLogoInverted": "Immagine Logo Invertita", "serverChangeDisable": "Disattiva cambiamento Server", "serverDisableShare": "Disattiva la Condivisione del Dispositivo", - "serverReboot": "Reboot", + "serverReboot": "Riavvio", "mapTitle": "Mappa", "mapActive": "Mappe Attive", "mapOverlay": "Soprapposizione Mappa", @@ -359,6 +359,8 @@ "mapGoogleRoad": "Google Stradale", "mapGoogleHybrid": "Google Ibrida", "mapGoogleSatellite": "Google Satellite", + "mapGoogleTraffic": "Google Traffic", + "mapGoogleKey": "Google API Key", "mapOpenTopoMap": "OpenTopoMap", "mapBingKey": "Bing Chiave Mappa", "mapBingRoad": "Bing Mappa Stradale", @@ -562,8 +564,8 @@ "reportAverageSpeed": "Velocità Media", "reportMaximumSpeed": "Velocità Massima", "reportEngineHours": "Ore di Guida", - "reportStartEngineHours": "Start Engine Hours", - "reportEndEngineHours": "End Engine Hours", + "reportStartEngineHours": "Inizio conteggio delle ore del motore", + "reportEndEngineHours": "Fine conteggio delle ore del motore", "reportDuration": "Durata", "reportStartDate": "Data di partenza", "reportStartTime": "Ora di Partenza", @@ -573,6 +575,7 @@ "reportSpentFuel": "Carburante Consumato", "reportStartOdometer": "Odometro Inizio", "reportEndOdometer": "Odometro Fine", + "reportTimeType": "Time", "statisticsTitle": "Statistiche", "statisticsCaptureTime": "Tempo di Cattura", "statisticsActiveUsers": "Utenti Attivi", diff --git a/src/resources/l10n/ja.json b/src/resources/l10n/ja.json index 437fcfb0..5e01ba0e 100644 --- a/src/resources/l10n/ja.json +++ b/src/resources/l10n/ja.json @@ -359,6 +359,8 @@ "mapGoogleRoad": "Google Map 道路", "mapGoogleHybrid": "Google Map ハイブリッド", "mapGoogleSatellite": "Google Map 人工衛星", + "mapGoogleTraffic": "Google Traffic", + "mapGoogleKey": "Google API Key", "mapOpenTopoMap": "OpenTopoMap", "mapBingKey": "Bingマップキー", "mapBingRoad": "Bingマップ", @@ -573,6 +575,7 @@ "reportSpentFuel": "燃料消費量", "reportStartOdometer": "走行距離計開始", "reportEndOdometer": "走行距離計終了", + "reportTimeType": "Time", "statisticsTitle": "統計", "statisticsCaptureTime": "位置補足時間", "statisticsActiveUsers": "稼働中ユーザー", diff --git a/src/resources/l10n/ka.json b/src/resources/l10n/ka.json index e4c154cc..21809d52 100644 --- a/src/resources/l10n/ka.json +++ b/src/resources/l10n/ka.json @@ -359,6 +359,8 @@ "mapGoogleRoad": "Google გზები", "mapGoogleHybrid": "Google ჰიბრიდული", "mapGoogleSatellite": "Google სატელიტი", + "mapGoogleTraffic": "Google Traffic", + "mapGoogleKey": "Google API Key", "mapOpenTopoMap": "OpenTopoMap", "mapBingKey": "Bing Maps გასაღები", "mapBingRoad": "Bing Maps გზები", @@ -573,6 +575,7 @@ "reportSpentFuel": "დახარჯული საწვავი", "reportStartOdometer": "ოდომეტრის სტარტი", "reportEndOdometer": "ოდომეტრის გაჩერება", + "reportTimeType": "Time", "statisticsTitle": "სტატისტიკა", "statisticsCaptureTime": "დროის დაწყება", "statisticsActiveUsers": "აქტიური მომხმარებლები", diff --git a/src/resources/l10n/kk.json b/src/resources/l10n/kk.json index 94cec108..4a614f2f 100644 --- a/src/resources/l10n/kk.json +++ b/src/resources/l10n/kk.json @@ -359,6 +359,8 @@ "mapGoogleRoad": "Google Road", "mapGoogleHybrid": "Google Hybrid", "mapGoogleSatellite": "Google Satellite", + "mapGoogleTraffic": "Google Traffic", + "mapGoogleKey": "Google API Key", "mapOpenTopoMap": "OpenTopoMap", "mapBingKey": "Bing Maps кілті", "mapBingRoad": "Bing Maps жолдары", @@ -573,6 +575,7 @@ "reportSpentFuel": "Отын пайдаланылды", "reportStartOdometer": "Odometer Start", "reportEndOdometer": "Odometer End", + "reportTimeType": "Time", "statisticsTitle": "Статистика", "statisticsCaptureTime": "Жинау уақыты", "statisticsActiveUsers": "Белсенді қолданушылар", diff --git a/src/resources/l10n/km.json b/src/resources/l10n/km.json index bcd4d919..48c7edff 100644 --- a/src/resources/l10n/km.json +++ b/src/resources/l10n/km.json @@ -359,6 +359,8 @@ "mapGoogleRoad": "Google Road", "mapGoogleHybrid": "Google Hybrid", "mapGoogleSatellite": "Google Satellite", + "mapGoogleTraffic": "Google Traffic", + "mapGoogleKey": "Google API Key", "mapOpenTopoMap": "OpenTopoMap", "mapBingKey": "គន្លឹះផែនទី Bing", "mapBingRoad": "ផ្លូវលើផែនទីBing", @@ -573,6 +575,7 @@ "reportSpentFuel": "ការចំណាយប្រេងឥន្ធនៈ", "reportStartOdometer": "Odometer Start", "reportEndOdometer": "Odometer End", + "reportTimeType": "Time", "statisticsTitle": "ស្ថិតិ", "statisticsCaptureTime": "ពេលការចាប់យក", "statisticsActiveUsers": "អ្នកប្រើប្រាស់សកម្ម", diff --git a/src/resources/l10n/ko.json b/src/resources/l10n/ko.json index be65dd97..e72ae45f 100644 --- a/src/resources/l10n/ko.json +++ b/src/resources/l10n/ko.json @@ -359,6 +359,8 @@ "mapGoogleRoad": "구글 지도", "mapGoogleHybrid": "구글 하이브리드 지도", "mapGoogleSatellite": "구글 위성 지도", + "mapGoogleTraffic": "Google Traffic", + "mapGoogleKey": "Google API Key", "mapOpenTopoMap": "OpenTopo 지도", "mapBingKey": "빙 지도 키", "mapBingRoad": "빙 도로 지도", @@ -573,6 +575,7 @@ "reportSpentFuel": "사용한 연료", "reportStartOdometer": "주행거리계 시작", "reportEndOdometer": "주행거리계 종료", + "reportTimeType": "Time", "statisticsTitle": "통계", "statisticsCaptureTime": "캡처 시간", "statisticsActiveUsers": "활성화된 유저", diff --git a/src/resources/l10n/lo.json b/src/resources/l10n/lo.json index 64dd2864..90e6b7b1 100644 --- a/src/resources/l10n/lo.json +++ b/src/resources/l10n/lo.json @@ -359,6 +359,8 @@ "mapGoogleRoad": "Google Road", "mapGoogleHybrid": "Google Hybrid", "mapGoogleSatellite": "Google Satellite", + "mapGoogleTraffic": "Google Traffic", + "mapGoogleKey": "Google API Key", "mapOpenTopoMap": "OpenTopoMap", "mapBingKey": "Bing Maps ສຳຄັນ", "mapBingRoad": "Bing Maps ຖະຫນົນ", @@ -573,6 +575,7 @@ "reportSpentFuel": "Spent Fuel", "reportStartOdometer": "Odometer Start", "reportEndOdometer": "Odometer End", + "reportTimeType": "Time", "statisticsTitle": "Statistics", "statisticsCaptureTime": "Capture Time", "statisticsActiveUsers": "Active Users", diff --git a/src/resources/l10n/lt.json b/src/resources/l10n/lt.json index 43f61758..5cb57d5c 100644 --- a/src/resources/l10n/lt.json +++ b/src/resources/l10n/lt.json @@ -4,7 +4,7 @@ "sharedSave": "Išsaugoti", "sharedUpload": "Įkelti", "sharedSet": "Nustatyti", - "sharedAccept": "Accept", + "sharedAccept": "Sutinku", "sharedCancel": "Atšaukti", "sharedCopy": "Kopijuoti", "sharedAdd": "Pridėti", @@ -12,7 +12,7 @@ "sharedRemove": "Pašalinti", "sharedRemoveConfirm": "Pašalinti objektą?", "sharedNoData": "Nėra duomenų", - "sharedSubject": "Subject", + "sharedSubject": "Tema", "sharedYes": "Taip", "sharedNo": "Ne", "sharedKm": "km", @@ -35,7 +35,7 @@ "sharedName": "Pavadinimas", "sharedDescription": "Aprašymas", "sharedSearch": "Paieška", - "sharedPriority": "Priority", + "sharedPriority": "Pirmumas", "sharedIconScale": "Ikonos mastelis", "sharedGeofence": "Georiba", "sharedGeofences": "Georibos", @@ -104,8 +104,8 @@ "sharedColumns": "Stulpeliai", "sharedDropzoneText": "Nutempkite failą čia arba paspauskite", "sharedLogs": "Žurnalai", - "sharedLink": "Link", - "sharedEmulator": "Emulator", + "sharedLink": "Nuoroda", + "sharedEmulator": "Emuliatorius", "calendarSimple": "Paprastas", "calendarRecurrence": "Pasikartojimas", "calendarOnce": "Vienkartinis", @@ -150,7 +150,7 @@ "attributeMailSmtpAuth": "Mail: SMTP autentifikacija įjungta", "attributeMailSmtpUsername": "Mail: SMTP prisijungimas", "attributeMailSmtpPassword": "Mail: SMTP slaptažodis", - "attributeUiDisableSavedCommands": "UI: Disable Saved Commands", + "attributeUiDisableSavedCommands": "UI: Išjungti išsaugotas komandas", "attributeUiDisableAttributes": "UI: išjungti atributus", "attributeUiDisableGroups": "UI: išjungti grupes", "attributeUiDisableEvents": "UI: Išjungti įvykius", @@ -181,11 +181,11 @@ "userFixedEmail": "Neleisti keisti Email", "userToken": "Token", "userDeleteAccount": "Pašalinti vartotoją", - "userTemporary": "Temporary", - "userTerms": "Terms of Service", - "userPrivacy": "Privacy Policy", - "userTermsPrompt": "By clicking Accept, you agree to our Terms of Service and confirm that you have read our Privacy Policy.", - "userTermsAccepted": "Terms Accepted", + "userTemporary": "Laikinas", + "userTerms": "Paslaugų teikimo sąlygos", + "userPrivacy": "Privatumo politika", + "userTermsPrompt": "Nuspausdami Sutinku, sutinkate su paslaugos teikimo taisyklėmis ir privatumo politika.", + "userTermsAccepted": "Sąlygos priimtos", "loginTitle": "Prisijungimas", "loginLanguage": "Kalba", "loginReset": "Atstatyti slaptažodį", @@ -337,7 +337,7 @@ "serverLogoInverted": "Invertuotas logo vaizdas", "serverChangeDisable": "Uždrausti keisti serverį", "serverDisableShare": "Išjungti dalinimasi įrenginiais", - "serverReboot": "Reboot", + "serverReboot": "Perkrauti", "mapTitle": "Žemėlapis", "mapActive": "Aktyvūs žemėlapiai", "mapOverlay": "Žemėlapių sluoksniai", @@ -359,6 +359,8 @@ "mapGoogleRoad": "Google keliai", "mapGoogleHybrid": "Google Hybrid", "mapGoogleSatellite": "Google Satellite", + "mapGoogleTraffic": "Google Traffic", + "mapGoogleKey": "Google API Key", "mapOpenTopoMap": "OpenTopoMap", "mapBingKey": "Bing Maps raktas", "mapBingRoad": "Bing Maps Keliai", @@ -562,8 +564,8 @@ "reportAverageSpeed": "Vidutinis greitis", "reportMaximumSpeed": "Maksimalus greitis", "reportEngineHours": "Variklio valandos", - "reportStartEngineHours": "Start Engine Hours", - "reportEndEngineHours": "End Engine Hours", + "reportStartEngineHours": "Variklio valandų pradžia", + "reportEndEngineHours": "Variklio valandų pabaiga", "reportDuration": "Trukmė", "reportStartDate": "Pradžios data", "reportStartTime": "Pradžios laikas", @@ -573,6 +575,7 @@ "reportSpentFuel": "Suvartoto kuro", "reportStartOdometer": "Odometras startas", "reportEndOdometer": "Odometras pabaiga", + "reportTimeType": "Time", "statisticsTitle": "Statistika", "statisticsCaptureTime": "Užfiksuotas laikas", "statisticsActiveUsers": "Aktyvus vartotojai", diff --git a/src/resources/l10n/lv.json b/src/resources/l10n/lv.json index cb15f446..127993fb 100644 --- a/src/resources/l10n/lv.json +++ b/src/resources/l10n/lv.json @@ -359,6 +359,8 @@ "mapGoogleRoad": "Google Road", "mapGoogleHybrid": "Google Hybrid", "mapGoogleSatellite": "Google Satellite", + "mapGoogleTraffic": "Google Traffic", + "mapGoogleKey": "Google API Key", "mapOpenTopoMap": "OpenTopoMap", "mapBingKey": "Bing Karšu Atslēga", "mapBingRoad": "Bing Karšu Ceļi", @@ -573,6 +575,7 @@ "reportSpentFuel": "Patērētā Degviela", "reportStartOdometer": "Odometra sākums", "reportEndOdometer": "Odometra beigas", + "reportTimeType": "Time", "statisticsTitle": "Statistika", "statisticsCaptureTime": "Uzņemšanas Laiks", "statisticsActiveUsers": "Aktīvie Lietotāji", diff --git a/src/resources/l10n/mk.json b/src/resources/l10n/mk.json index 998552f3..e157e1b9 100644 --- a/src/resources/l10n/mk.json +++ b/src/resources/l10n/mk.json @@ -4,7 +4,7 @@ "sharedSave": "Зачувај", "sharedUpload": "Прикачи", "sharedSet": "Постави", - "sharedAccept": "Accept", + "sharedAccept": "Прифати", "sharedCancel": "Откажи", "sharedCopy": "Копирај", "sharedAdd": "Додади", @@ -35,7 +35,7 @@ "sharedName": "Име", "sharedDescription": "Опис", "sharedSearch": "Пребарување", - "sharedPriority": "Priority", + "sharedPriority": "Приоритет", "sharedIconScale": "Размер на икони", "sharedGeofence": "Географска зона", "sharedGeofences": "Географски зони", @@ -105,7 +105,7 @@ "sharedDropzoneText": "Повлечи фајл овде или кликни", "sharedLogs": "Логови", "sharedLink": "Линк", - "sharedEmulator": "Emulator", + "sharedEmulator": "Емулатор", "calendarSimple": "Едноставно", "calendarRecurrence": "Повторување", "calendarOnce": "Еднаш", @@ -182,10 +182,10 @@ "userToken": "Токен", "userDeleteAccount": "Избриши Акаунт", "userTemporary": "Привремено", - "userTerms": "Terms of Service", - "userPrivacy": "Privacy Policy", - "userTermsPrompt": "By clicking Accept, you agree to our Terms of Service and confirm that you have read our Privacy Policy.", - "userTermsAccepted": "Terms Accepted", + "userTerms": "Услови за користење", + "userPrivacy": "Политика на приватност", + "userTermsPrompt": "При кликнување на копчето Прифати, Вие се согласувате на нашите услови за користење, и потврдувате дека ја имате прочитано нашата Политика на приватност", + "userTermsAccepted": "Условите се прифатени", "loginTitle": "Најава", "loginLanguage": "Јазик", "loginReset": "Ресетирај лозинка", @@ -337,7 +337,7 @@ "serverLogoInverted": "Инверзна слика за лого", "serverChangeDisable": "Оневозможи промена на сервер", "serverDisableShare": "Оневозможи споделување на уреди", - "serverReboot": "Reboot", + "serverReboot": "Рестартирај", "mapTitle": "Мапа", "mapActive": "Активни мапи", "mapOverlay": "Преклопени мапи", @@ -359,6 +359,8 @@ "mapGoogleRoad": "Google патишта", "mapGoogleHybrid": "Google хибрид", "mapGoogleSatellite": "Google сателити", + "mapGoogleTraffic": "Google Traffic", + "mapGoogleKey": "Google API Key", "mapOpenTopoMap": "OpenTopoMap", "mapBingKey": "Bing Maps клуч", "mapBingRoad": "Bing Maps патишта", @@ -562,8 +564,8 @@ "reportAverageSpeed": "Просечна брзина", "reportMaximumSpeed": "Максимална брзина", "reportEngineHours": "Работни саати", - "reportStartEngineHours": "Start Engine Hours", - "reportEndEngineHours": "End Engine Hours", + "reportStartEngineHours": "Почеток на работни часа на моторот", + "reportEndEngineHours": "Крај на работни часа на моторот", "reportDuration": "Времетраење", "reportStartDate": "Почетен датум", "reportStartTime": "Почетно време", @@ -573,6 +575,7 @@ "reportSpentFuel": "Потрошено гориво", "reportStartOdometer": "Почетна километража", "reportEndOdometer": "Крајна километража", + "reportTimeType": "Time", "statisticsTitle": "Статистики", "statisticsCaptureTime": "Време на сликање", "statisticsActiveUsers": "Активни корисници", diff --git a/src/resources/l10n/ml.json b/src/resources/l10n/ml.json index 98b869fe..60e803b2 100644 --- a/src/resources/l10n/ml.json +++ b/src/resources/l10n/ml.json @@ -359,6 +359,8 @@ "mapGoogleRoad": "Google Road", "mapGoogleHybrid": "Google Hybrid", "mapGoogleSatellite": "Google Satellite", + "mapGoogleTraffic": "Google Traffic", + "mapGoogleKey": "Google API Key", "mapOpenTopoMap": "OpenTopoMap", "mapBingKey": "Bing Maps Key", "mapBingRoad": "Bing Maps Road", @@ -573,6 +575,7 @@ "reportSpentFuel": "Spent Fuel", "reportStartOdometer": "Odometer Start", "reportEndOdometer": "Odometer End", + "reportTimeType": "Time", "statisticsTitle": "Statistics", "statisticsCaptureTime": "Capture Time", "statisticsActiveUsers": "Active Users", diff --git a/src/resources/l10n/mn.json b/src/resources/l10n/mn.json index c11686bf..d28f0403 100644 --- a/src/resources/l10n/mn.json +++ b/src/resources/l10n/mn.json @@ -359,6 +359,8 @@ "mapGoogleRoad": "Google Road", "mapGoogleHybrid": "Google Hybrid", "mapGoogleSatellite": "Google Satellite", + "mapGoogleTraffic": "Google Traffic", + "mapGoogleKey": "Google API Key", "mapOpenTopoMap": "OpenTopoMap", "mapBingKey": "Bing Maps Key", "mapBingRoad": "Bing Maps Road", @@ -573,6 +575,7 @@ "reportSpentFuel": "Spent Fuel", "reportStartOdometer": "Odometer Start", "reportEndOdometer": "Odometer End", + "reportTimeType": "Time", "statisticsTitle": "Статистик", "statisticsCaptureTime": "Capture Time", "statisticsActiveUsers": "Идэвхитэй хэрэглэгчид", diff --git a/src/resources/l10n/ms.json b/src/resources/l10n/ms.json index 4c787349..89c5f517 100644 --- a/src/resources/l10n/ms.json +++ b/src/resources/l10n/ms.json @@ -359,6 +359,8 @@ "mapGoogleRoad": "Google Road", "mapGoogleHybrid": "Google Hybrid", "mapGoogleSatellite": "Google Satellite", + "mapGoogleTraffic": "Google Traffic", + "mapGoogleKey": "Google API Key", "mapOpenTopoMap": "OpenTopoMap", "mapBingKey": "Bing Maps Key", "mapBingRoad": "Bing Maps Road", @@ -573,6 +575,7 @@ "reportSpentFuel": "Spent Fuel", "reportStartOdometer": "Odometer Start", "reportEndOdometer": "Odometer End", + "reportTimeType": "Time", "statisticsTitle": "Statistics", "statisticsCaptureTime": "Capture Time", "statisticsActiveUsers": "Active Users", diff --git a/src/resources/l10n/nb.json b/src/resources/l10n/nb.json index 3d8d1613..ccd7a357 100644 --- a/src/resources/l10n/nb.json +++ b/src/resources/l10n/nb.json @@ -359,6 +359,8 @@ "mapGoogleRoad": "Google Road", "mapGoogleHybrid": "Google Hybrid", "mapGoogleSatellite": "Google Satellite", + "mapGoogleTraffic": "Google Traffic", + "mapGoogleKey": "Google API Key", "mapOpenTopoMap": "OpenTopoMap", "mapBingKey": "Bing Maps-nøkkel", "mapBingRoad": "Bing Maps-veg", @@ -573,6 +575,7 @@ "reportSpentFuel": "Brukt drivstoff", "reportStartOdometer": "Kilometerteller start", "reportEndOdometer": "Kilometerteller stopp", + "reportTimeType": "Time", "statisticsTitle": "Statistikk", "statisticsCaptureTime": "Opptakstidspunkt", "statisticsActiveUsers": "Aktive brukere", diff --git a/src/resources/l10n/ne.json b/src/resources/l10n/ne.json index c8bff3e6..35cb7150 100644 --- a/src/resources/l10n/ne.json +++ b/src/resources/l10n/ne.json @@ -359,6 +359,8 @@ "mapGoogleRoad": "Google Road", "mapGoogleHybrid": "Google Hybrid", "mapGoogleSatellite": "Google Satellite", + "mapGoogleTraffic": "Google Traffic", + "mapGoogleKey": "Google API Key", "mapOpenTopoMap": "OpenTopoMap", "mapBingKey": "बिंग नक्शाको चाबी (कि) ", "mapBingRoad": "बिंग नक्शा (सडक)", @@ -573,6 +575,7 @@ "reportSpentFuel": "खर्चित ईन्धन", "reportStartOdometer": "ओडोमिटर सुरु", "reportEndOdometer": "ओडोमिटर अन्त्य", + "reportTimeType": "Time", "statisticsTitle": "तथ्याङ्क ", "statisticsCaptureTime": "समय कब्जा", "statisticsActiveUsers": "सक्रिय प्रयोगकर्ता", diff --git a/src/resources/l10n/nl.json b/src/resources/l10n/nl.json index 6a22a8d6..07927c84 100644 --- a/src/resources/l10n/nl.json +++ b/src/resources/l10n/nl.json @@ -359,6 +359,8 @@ "mapGoogleRoad": "Google Road", "mapGoogleHybrid": "Google Hybrid", "mapGoogleSatellite": "Google Satellite", + "mapGoogleTraffic": "Google Traffic", + "mapGoogleKey": "Google API Key", "mapOpenTopoMap": "OpenTopoMap", "mapBingKey": "Bing Maps sleutel", "mapBingRoad": "Bing Maps Wegen", @@ -573,6 +575,7 @@ "reportSpentFuel": "Verbruikte brandstof", "reportStartOdometer": "Odometer start", "reportEndOdometer": "Odometer einde", + "reportTimeType": "Time", "statisticsTitle": "Statistieken", "statisticsCaptureTime": "Opnametijd", "statisticsActiveUsers": "Actieve gebruikers", diff --git a/src/resources/l10n/nn.json b/src/resources/l10n/nn.json index 9e1a0815..a5f52455 100644 --- a/src/resources/l10n/nn.json +++ b/src/resources/l10n/nn.json @@ -359,6 +359,8 @@ "mapGoogleRoad": "Google Road", "mapGoogleHybrid": "Google Hybrid", "mapGoogleSatellite": "Google Satellite", + "mapGoogleTraffic": "Google Traffic", + "mapGoogleKey": "Google API Key", "mapOpenTopoMap": "OpenTopoMap", "mapBingKey": "Bing Maps-nøkkel", "mapBingRoad": "Bing Maps-veg", @@ -573,6 +575,7 @@ "reportSpentFuel": "Brukt drivstoff", "reportStartOdometer": "Kilometerteljar start", "reportEndOdometer": "Kilometerteljar stop", + "reportTimeType": "Time", "statisticsTitle": "Statistikk", "statisticsCaptureTime": "Opptakstid", "statisticsActiveUsers": "Aktive brukarar", diff --git a/src/resources/l10n/pl.json b/src/resources/l10n/pl.json index cdd12bb0..fc672300 100644 --- a/src/resources/l10n/pl.json +++ b/src/resources/l10n/pl.json @@ -359,6 +359,8 @@ "mapGoogleRoad": "Google Road", "mapGoogleHybrid": "Google Hybrid", "mapGoogleSatellite": "Google Satellite", + "mapGoogleTraffic": "Google Traffic", + "mapGoogleKey": "Google API Key", "mapOpenTopoMap": "OpenTopoMap", "mapBingKey": "Bing Maps Key", "mapBingRoad": "Bing Maps Road", @@ -573,6 +575,7 @@ "reportSpentFuel": "Zużyte paliwo", "reportStartOdometer": "Start drogomierza", "reportEndOdometer": "Stop drogomierza", + "reportTimeType": "Time", "statisticsTitle": "Statystyki", "statisticsCaptureTime": "Czas zapisu", "statisticsActiveUsers": "Aktywni użytkownicy", diff --git a/src/resources/l10n/pt.json b/src/resources/l10n/pt.json index 3e68d191..19f38998 100644 --- a/src/resources/l10n/pt.json +++ b/src/resources/l10n/pt.json @@ -359,6 +359,8 @@ "mapGoogleRoad": "Google Road", "mapGoogleHybrid": "Google Hybrid", "mapGoogleSatellite": "Google Satellite", + "mapGoogleTraffic": "Google Traffic", + "mapGoogleKey": "Google API Key", "mapOpenTopoMap": "OpenTopoMap", "mapBingKey": "Mapa Bing Key", "mapBingRoad": "Mapa Bing Road", @@ -573,6 +575,7 @@ "reportSpentFuel": "Combustível Gasto", "reportStartOdometer": "Início do Conta-Quilómetros", "reportEndOdometer": "Fim do Conta-Quilómetros", + "reportTimeType": "Time", "statisticsTitle": "Estatísticas", "statisticsCaptureTime": "Data", "statisticsActiveUsers": "Utilizadores Activos", diff --git a/src/resources/l10n/pt_BR.json b/src/resources/l10n/pt_BR.json index 8b25df7c..2bc3ce7b 100644 --- a/src/resources/l10n/pt_BR.json +++ b/src/resources/l10n/pt_BR.json @@ -4,7 +4,7 @@ "sharedSave": "Salvar", "sharedUpload": "Enviar", "sharedSet": "Aplicar", - "sharedAccept": "Accept", + "sharedAccept": "Aceitar", "sharedCancel": "Cancelar", "sharedCopy": "Copia", "sharedAdd": "Adicionar", @@ -35,7 +35,7 @@ "sharedName": "Nome", "sharedDescription": "Descrição", "sharedSearch": "Busca", - "sharedPriority": "Priority", + "sharedPriority": "Prioridade", "sharedIconScale": "Escala do ícone", "sharedGeofence": "Geocerca", "sharedGeofences": "Cerca Virtual", @@ -105,7 +105,7 @@ "sharedDropzoneText": "Arraste e solte um arquivo aqui ou clique", "sharedLogs": "Logs", "sharedLink": "Link", - "sharedEmulator": "Emulator", + "sharedEmulator": "Emulador", "calendarSimple": "Simples", "calendarRecurrence": "Recorrência", "calendarOnce": "Uma vez", @@ -182,10 +182,10 @@ "userToken": "Token", "userDeleteAccount": "Deletar conta", "userTemporary": "Temporário", - "userTerms": "Terms of Service", - "userPrivacy": "Privacy Policy", - "userTermsPrompt": "By clicking Accept, you agree to our Terms of Service and confirm that you have read our Privacy Policy.", - "userTermsAccepted": "Terms Accepted", + "userTerms": "Termos do Serviço", + "userPrivacy": "Política de Privacidade", + "userTermsPrompt": "Ao clicar em Aceitar, você concorda com nossos Termos de Serviço e confirma que leu nossa Política de Privacidade.", + "userTermsAccepted": "Termos do Aceite", "loginTitle": "Login", "loginLanguage": "Idioma", "loginReset": "Redefinir senha", @@ -337,7 +337,7 @@ "serverLogoInverted": "Imagem do logo invertida", "serverChangeDisable": "Desabilitar mudança de servidor", "serverDisableShare": "Desativar Compartilhamento de Dispositivos", - "serverReboot": "Reboot", + "serverReboot": "Reiniciar", "mapTitle": "Mapa", "mapActive": "Mapas ativos", "mapOverlay": "Sobreposição de mapa", @@ -359,6 +359,8 @@ "mapGoogleRoad": "Google Estrada", "mapGoogleHybrid": "Google Híbrido", "mapGoogleSatellite": "Google Satélite", + "mapGoogleTraffic": "Google Traffic", + "mapGoogleKey": "Google API Key", "mapOpenTopoMap": "OpenTopoMap", "mapBingKey": "Bing Mapas API Key", "mapBingRoad": "Bing Mapas Estradas", @@ -562,8 +564,8 @@ "reportAverageSpeed": "Velocidade Média", "reportMaximumSpeed": "Velocidade Máxima", "reportEngineHours": "Horas ligado", - "reportStartEngineHours": "Start Engine Hours", - "reportEndEngineHours": "End Engine Hours", + "reportStartEngineHours": "Horas de partida do motor", + "reportEndEngineHours": "Encerrar horas do motor de partida", "reportDuration": "Duração", "reportStartDate": "Data de Início", "reportStartTime": "Hora inicial", @@ -573,6 +575,7 @@ "reportSpentFuel": "Gasto de Combustível", "reportStartOdometer": "Início do odômetro", "reportEndOdometer": "Fim do odômetro", + "reportTimeType": "Time", "statisticsTitle": "Estatísticas", "statisticsCaptureTime": "Tempo de Captura", "statisticsActiveUsers": "Usuários ativos", diff --git a/src/resources/l10n/ro.json b/src/resources/l10n/ro.json index 6446b0ee..95dbdcc3 100644 --- a/src/resources/l10n/ro.json +++ b/src/resources/l10n/ro.json @@ -359,6 +359,8 @@ "mapGoogleRoad": "Google Road", "mapGoogleHybrid": "Google Hybrid", "mapGoogleSatellite": "Google Satellite", + "mapGoogleTraffic": "Google Traffic", + "mapGoogleKey": "Google API Key", "mapOpenTopoMap": "OpenTopoMap", "mapBingKey": "Cheie Bing Maps", "mapBingRoad": "Bing Hartă Drumuri", @@ -573,6 +575,7 @@ "reportSpentFuel": "Combustibil consumat", "reportStartOdometer": "Kilometraj Start", "reportEndOdometer": "Kilomteraj Sfârșit", + "reportTimeType": "Time", "statisticsTitle": "Statistici", "statisticsCaptureTime": "Timpul ", "statisticsActiveUsers": "Utilizatori Activi", diff --git a/src/resources/l10n/ru.json b/src/resources/l10n/ru.json index e9beb53e..73e60002 100644 --- a/src/resources/l10n/ru.json +++ b/src/resources/l10n/ru.json @@ -359,6 +359,8 @@ "mapGoogleRoad": "Google дороги", "mapGoogleHybrid": "Google гибрид", "mapGoogleSatellite": "Google спутник", + "mapGoogleTraffic": "Google Traffic", + "mapGoogleKey": "Google API Key", "mapOpenTopoMap": "OpenTopoMap", "mapBingKey": "Ключ Bing Maps", "mapBingRoad": "Bing Maps Дороги", @@ -573,6 +575,7 @@ "reportSpentFuel": "Использовано топлива", "reportStartOdometer": "Одометр, начало", "reportEndOdometer": "Одометр, окончание", + "reportTimeType": "Time", "statisticsTitle": "Статистика", "statisticsCaptureTime": "Время сбора", "statisticsActiveUsers": "Активные пользователи", diff --git a/src/resources/l10n/si.json b/src/resources/l10n/si.json index c999d439..8c57a150 100644 --- a/src/resources/l10n/si.json +++ b/src/resources/l10n/si.json @@ -359,6 +359,8 @@ "mapGoogleRoad": "Google Road", "mapGoogleHybrid": "Google Hybrid", "mapGoogleSatellite": "Google Satellite", + "mapGoogleTraffic": "Google Traffic", + "mapGoogleKey": "Google API Key", "mapOpenTopoMap": "OpenTopoMap", "mapBingKey": "බිං මැප්ස් යතුර", "mapBingRoad": "බිං මැප්ස් පාර", @@ -573,6 +575,7 @@ "reportSpentFuel": "වැයවූ ඉන්ධන", "reportStartOdometer": "Odometer ආරම්භය", "reportEndOdometer": "Odometer අවසානය", + "reportTimeType": "Time", "statisticsTitle": "සංඛ්යාලේඛන", "statisticsCaptureTime": "අල්ලා ගැනීමේ කාලය", "statisticsActiveUsers": "ක්රියාකාරී පරිශීලකයින්", diff --git a/src/resources/l10n/sk.json b/src/resources/l10n/sk.json index d73e0efb..a44f4235 100644 --- a/src/resources/l10n/sk.json +++ b/src/resources/l10n/sk.json @@ -35,7 +35,7 @@ "sharedName": "Meno", "sharedDescription": "Popis", "sharedSearch": "Hľadať", - "sharedPriority": "Priority", + "sharedPriority": "Priorita", "sharedIconScale": "Veľkosť ikonky", "sharedGeofence": "Lokalita", "sharedGeofences": "Lokality", @@ -82,7 +82,7 @@ "sharedPreferences": "Preferencie", "sharedPermissions": "Povolenia", "sharedConnections": "Prepojenia", - "sharedExtra": "Extra", + "sharedExtra": "Podrobnosti", "sharedPrimary": "Primárne", "sharedSecondary": "Sekundárne", "sharedTypeString": "Reťazec", @@ -105,7 +105,7 @@ "sharedDropzoneText": "Presuňte sem súbor alebo kliknite", "sharedLogs": "Logy", "sharedLink": "Odkaz", - "sharedEmulator": "Emulator", + "sharedEmulator": "Emulátor", "calendarSimple": "Jednoduché", "calendarRecurrence": "Opakovanie", "calendarOnce": "Raz", @@ -337,7 +337,7 @@ "serverLogoInverted": "Farebne obrátený obrázok loga", "serverChangeDisable": "Zakázať zmenu servera", "serverDisableShare": "Zakázať zdieľanie zariadení", - "serverReboot": "Reboot", + "serverReboot": "Reštartovať", "mapTitle": "Mapa", "mapActive": "Aktívne mapy", "mapOverlay": "Prekrytie mapy", @@ -359,6 +359,8 @@ "mapGoogleRoad": "Google Road", "mapGoogleHybrid": "Google Hybridná mapa", "mapGoogleSatellite": "Google Satelitné snímky", + "mapGoogleTraffic": "Google Premávka", + "mapGoogleKey": "Google API Kľuč ", "mapOpenTopoMap": "OpenTopoMap", "mapBingKey": "Klúč Bing Maps", "mapBingRoad": "Bing Maps Road", @@ -562,8 +564,8 @@ "reportAverageSpeed": "Priemerná rýchlosť", "reportMaximumSpeed": "Maximálna rýchlosť", "reportEngineHours": "Prevádzkové hodiny motora", - "reportStartEngineHours": "Start Engine Hours", - "reportEndEngineHours": "End Engine Hours", + "reportStartEngineHours": "Štart prevádzky motora", + "reportEndEngineHours": "Koniec prevádzky motra", "reportDuration": "Trvanie", "reportStartDate": "Dátum začiatku", "reportStartTime": "Čas spustenia", @@ -573,6 +575,7 @@ "reportSpentFuel": "Spotrebované palivo", "reportStartOdometer": "Štart počítadla kilometrov", "reportEndOdometer": "Koniec počítadla kilometrov", + "reportTimeType": "Čas", "statisticsTitle": "Štatistika", "statisticsCaptureTime": "Zachyť čas", "statisticsActiveUsers": "Aktívny používatelia", diff --git a/src/resources/l10n/sl.json b/src/resources/l10n/sl.json index cd6be412..d010ae39 100644 --- a/src/resources/l10n/sl.json +++ b/src/resources/l10n/sl.json @@ -359,6 +359,8 @@ "mapGoogleRoad": "Google Road", "mapGoogleHybrid": "Google Hybrid", "mapGoogleSatellite": "Google Satellite", + "mapGoogleTraffic": "Google Traffic", + "mapGoogleKey": "Google API Key", "mapOpenTopoMap": "OpenTopoMap", "mapBingKey": "Bing Maps Ključ", "mapBingRoad": "Bing Maps Ceste", @@ -573,6 +575,7 @@ "reportSpentFuel": "Porabljeno gorivo", "reportStartOdometer": "Začetno stanje števca", "reportEndOdometer": "Končno stanje števca", + "reportTimeType": "Time", "statisticsTitle": "Statistika", "statisticsCaptureTime": "Začetni čas", "statisticsActiveUsers": "Aktivni uporabniki", diff --git a/src/resources/l10n/sq.json b/src/resources/l10n/sq.json index 72566a94..629415a4 100644 --- a/src/resources/l10n/sq.json +++ b/src/resources/l10n/sq.json @@ -359,6 +359,8 @@ "mapGoogleRoad": "Google Road", "mapGoogleHybrid": "Google Hybrid", "mapGoogleSatellite": "Google Satellite", + "mapGoogleTraffic": "Google Traffic", + "mapGoogleKey": "Google API Key", "mapOpenTopoMap": "OpenTopoMap", "mapBingKey": "Bing Maps Key", "mapBingRoad": "Bing Maps Road", @@ -573,6 +575,7 @@ "reportSpentFuel": "Spent Fuel", "reportStartOdometer": "Odometer Start", "reportEndOdometer": "Odometer End", + "reportTimeType": "Time", "statisticsTitle": "Statistics", "statisticsCaptureTime": "Capture Time", "statisticsActiveUsers": "Active Users", diff --git a/src/resources/l10n/sr.json b/src/resources/l10n/sr.json index f2b9d955..a38ac98d 100644 --- a/src/resources/l10n/sr.json +++ b/src/resources/l10n/sr.json @@ -337,7 +337,7 @@ "serverLogoInverted": "Obrnuta logo slika", "serverChangeDisable": "Onemogući Server promene", "serverDisableShare": "Onemogući deljenje vozila", - "serverReboot": "Reboot", + "serverReboot": "Pokreni ponovo", "mapTitle": "Mapa", "mapActive": "Aktivne mape", "mapOverlay": "Preklapanje mape", @@ -359,6 +359,8 @@ "mapGoogleRoad": "Google Road", "mapGoogleHybrid": "Google Hibrid", "mapGoogleSatellite": "Google Satelit", + "mapGoogleTraffic": "Google Traffic", + "mapGoogleKey": "Google API Key", "mapOpenTopoMap": "OpenTopoMap", "mapBingKey": "Bing Maps Key", "mapBingRoad": "Bing Maps Road", @@ -573,6 +575,7 @@ "reportSpentFuel": "Potrošeno goriva", "reportStartOdometer": "Odometar početak", "reportEndOdometer": "Odometar kraj", + "reportTimeType": "Vreme", "statisticsTitle": "Statistika", "statisticsCaptureTime": "Vreme slikanja", "statisticsActiveUsers": "Aktivni korisnici", diff --git a/src/resources/l10n/sv.json b/src/resources/l10n/sv.json index 06191f31..a25516e8 100644 --- a/src/resources/l10n/sv.json +++ b/src/resources/l10n/sv.json @@ -359,6 +359,8 @@ "mapGoogleRoad": "Google Road", "mapGoogleHybrid": "Google Hybrid", "mapGoogleSatellite": "Google Satellite", + "mapGoogleTraffic": "Google Traffic", + "mapGoogleKey": "Google API Key", "mapOpenTopoMap": "OpenTopoMap", "mapBingKey": "Bing Maps Nyckel", "mapBingRoad": "Bing Maps Väg", @@ -573,6 +575,7 @@ "reportSpentFuel": "Förbrukat bränsle", "reportStartOdometer": "Odometer Start", "reportEndOdometer": "Odometer Slut", + "reportTimeType": "Time", "statisticsTitle": "Statistik", "statisticsCaptureTime": "Inspelningstid", "statisticsActiveUsers": "Aktiva användare", diff --git a/src/resources/l10n/ta.json b/src/resources/l10n/ta.json index 3182f00b..c3c4cf12 100644 --- a/src/resources/l10n/ta.json +++ b/src/resources/l10n/ta.json @@ -359,6 +359,8 @@ "mapGoogleRoad": "Google Road", "mapGoogleHybrid": "Google Hybrid", "mapGoogleSatellite": "Google Satellite", + "mapGoogleTraffic": "Google Traffic", + "mapGoogleKey": "Google API Key", "mapOpenTopoMap": "OpenTopoMap", "mapBingKey": "பிங் வரைபட கீ", "mapBingRoad": "பிங் சாலை வரைபடம்", @@ -573,6 +575,7 @@ "reportSpentFuel": "எரிபொருள் செலவு", "reportStartOdometer": "ஓடோமீட்டர் தொடக்கம்", "reportEndOdometer": "ஓடோமீட்டர் முடிவு ", + "reportTimeType": "Time", "statisticsTitle": "புள்ளியியல்", "statisticsCaptureTime": "நேரம் பிடி", "statisticsActiveUsers": "செயலில் பயனர்கள்", diff --git a/src/resources/l10n/th.json b/src/resources/l10n/th.json index a95f9e0c..6a6356e3 100644 --- a/src/resources/l10n/th.json +++ b/src/resources/l10n/th.json @@ -337,7 +337,7 @@ "serverLogoInverted": "กลับด้านภาพโลโก้แล้ว", "serverChangeDisable": "ปิดใช้งานการเปลี่ยนแปลงเซิร์ฟเวอร์", "serverDisableShare": "ปิดใช้งานการแชร์อุปกรณ์", - "serverReboot": "Reboot", + "serverReboot": "รีบูต", "mapTitle": "แผนที่", "mapActive": "แผนที่ที่ใช้งานอยู่", "mapOverlay": "การวางซ้อนแผนที่", @@ -359,6 +359,8 @@ "mapGoogleRoad": "Google Road", "mapGoogleHybrid": "Google Hybrid", "mapGoogleSatellite": "Google Satellite", + "mapGoogleTraffic": "Google Traffic", + "mapGoogleKey": "Google API Key", "mapOpenTopoMap": "OpenTopoMap", "mapBingKey": "Bing Maps สำคัญ", "mapBingRoad": "Bing Maps ถนน", @@ -573,6 +575,7 @@ "reportSpentFuel": "เชื้อเพลิงที่ใช้", "reportStartOdometer": "เดินทาง-เริ่ม", "reportEndOdometer": "เดินทาง-สิ้นสุด", + "reportTimeType": "เวลา", "statisticsTitle": "ข้อมูลสถิติ", "statisticsCaptureTime": "จับเวลา", "statisticsActiveUsers": "ผู้ใช้ที่ใช้งานอยู่", diff --git a/src/resources/l10n/tr.json b/src/resources/l10n/tr.json index 252e9919..d2eafc79 100644 --- a/src/resources/l10n/tr.json +++ b/src/resources/l10n/tr.json @@ -359,6 +359,8 @@ "mapGoogleRoad": "Google Road", "mapGoogleHybrid": "Google Hybrid", "mapGoogleSatellite": "Google Satellite", + "mapGoogleTraffic": "Google Traffic", + "mapGoogleKey": "Google API Key", "mapOpenTopoMap": "OpenTopoMap", "mapBingKey": "Bing Maps Key", "mapBingRoad": "Bing Maps Road", @@ -573,6 +575,7 @@ "reportSpentFuel": "Tüketilen Yakıt", "reportStartOdometer": "Kilometre Sayacı Başlangıçı", "reportEndOdometer": "Kilometre Sayacı Sonu", + "reportTimeType": "Time", "statisticsTitle": "Statistics", "statisticsCaptureTime": "Yakalama Zamanı", "statisticsActiveUsers": "Aktif Kullanıcılar", diff --git a/src/resources/l10n/uk.json b/src/resources/l10n/uk.json index 9e7a11c2..d90a1ae4 100644 --- a/src/resources/l10n/uk.json +++ b/src/resources/l10n/uk.json @@ -359,6 +359,8 @@ "mapGoogleRoad": "Google Road", "mapGoogleHybrid": "Google Hybrid", "mapGoogleSatellite": "Google Satellite", + "mapGoogleTraffic": "Google Traffic", + "mapGoogleKey": "Google API Key", "mapOpenTopoMap": "OpenTopoMap", "mapBingKey": "Ключ Bing Maps ", "mapBingRoad": "Bing Maps Дороги", @@ -573,6 +575,7 @@ "reportSpentFuel": "Використано палива", "reportStartOdometer": "Одометр, початок", "reportEndOdometer": "Одометр, закінчення", + "reportTimeType": "Time", "statisticsTitle": "Статистика", "statisticsCaptureTime": "Час збору", "statisticsActiveUsers": "Активні користувачі", diff --git a/src/resources/l10n/uz.json b/src/resources/l10n/uz.json index 8f9c28e2..27ebb9f6 100644 --- a/src/resources/l10n/uz.json +++ b/src/resources/l10n/uz.json @@ -359,6 +359,8 @@ "mapGoogleRoad": "Google Road", "mapGoogleHybrid": "Google Hybrid", "mapGoogleSatellite": "Google Satellite", + "mapGoogleTraffic": "Google Traffic", + "mapGoogleKey": "Google API Key", "mapOpenTopoMap": "OpenTopoMap", "mapBingKey": "Bing Maps калити", "mapBingRoad": "Bing Maps йўллар", @@ -573,6 +575,7 @@ "reportSpentFuel": "Ёқилғи сарфи", "reportStartOdometer": "Odometer Start", "reportEndOdometer": "Odometer End", + "reportTimeType": "Time", "statisticsTitle": "Статистика", "statisticsCaptureTime": "Йиғилиш вақти", "statisticsActiveUsers": "Актив фойдаланувчилар", diff --git a/src/resources/l10n/vi.json b/src/resources/l10n/vi.json index e4cc407b..bc5f6515 100644 --- a/src/resources/l10n/vi.json +++ b/src/resources/l10n/vi.json @@ -359,6 +359,8 @@ "mapGoogleRoad": "Google Road", "mapGoogleHybrid": "Google Hybrid", "mapGoogleSatellite": "Google Satellite", + "mapGoogleTraffic": "Google Traffic", + "mapGoogleKey": "Google API Key", "mapOpenTopoMap": "OpenTopoMap", "mapBingKey": "Bing Maps Key", "mapBingRoad": "Bing Maps Road", @@ -573,6 +575,7 @@ "reportSpentFuel": "Tiêu thụ nguyên liệu", "reportStartOdometer": "Odometer Start", "reportEndOdometer": "Odometer End", + "reportTimeType": "Time", "statisticsTitle": "Thống kê", "statisticsCaptureTime": "Thời gian", "statisticsActiveUsers": "Người dùng được kích hoạt", diff --git a/src/resources/l10n/zh.json b/src/resources/l10n/zh.json index df05c0e0..0746a50d 100644 --- a/src/resources/l10n/zh.json +++ b/src/resources/l10n/zh.json @@ -35,7 +35,7 @@ "sharedName": "名称", "sharedDescription": "描述", "sharedSearch": "搜索", - "sharedPriority": "Priority", + "sharedPriority": "优先权", "sharedIconScale": "图标比例", "sharedGeofence": "围栏", "sharedGeofences": "围栏", @@ -105,7 +105,7 @@ "sharedDropzoneText": "将文件拖放到此处或者单击", "sharedLogs": "日志", "sharedLink": "关联", - "sharedEmulator": "Emulator", + "sharedEmulator": "模拟器", "calendarSimple": "简单", "calendarRecurrence": "复现", "calendarOnce": "单次", @@ -337,14 +337,14 @@ "serverLogoInverted": "倒置标识图片", "serverChangeDisable": "禁用服务器更改", "serverDisableShare": "禁用设备共享", - "serverReboot": "Reboot", + "serverReboot": "重启", "mapTitle": "地图", "mapActive": "已选地图", "mapOverlay": "地图叠层", "mapOverlayCustom": "自定义叠层", "mapOpenSeaMap": "开放海洋地图", "mapOpenRailwayMap": "开放铁路地图", - "mapOpenWeatherKey": "开放气候API密钥", + "mapOpenWeatherKey": "开放气候 API 密钥", "mapOpenWeatherClouds": "开放气候云层图", "mapOpenWeatherPrecipitation": "开放气候降水图", "mapOpenWeatherPressure": "开放气候气压图", @@ -359,6 +359,8 @@ "mapGoogleRoad": "谷歌道路地图", "mapGoogleHybrid": "谷歌混合地图", "mapGoogleSatellite": "谷歌卫星地图", + "mapGoogleTraffic": "谷歌交通", + "mapGoogleKey": "谷歌 API 密钥", "mapOpenTopoMap": "OpenTopo 地图", "mapBingKey": "必应地图密钥", "mapBingRoad": "必应公路地图", @@ -530,7 +532,7 @@ "notificatorWeb": "网页", "notificatorMail": "邮件", "notificatorSms": "短信", - "notificatorFirebase": "Firebase", + "notificatorFirebase": "火力基地", "notificatorTraccar": "Traccar", "notificatorTelegram": "Telegram 账号", "notificatorPushover": "Pushover", @@ -562,8 +564,8 @@ "reportAverageSpeed": "平均速度", "reportMaximumSpeed": "最大速度", "reportEngineHours": "发动机使用时间", - "reportStartEngineHours": "Start Engine Hours", - "reportEndEngineHours": "End Engine Hours", + "reportStartEngineHours": "启动发动机时间", + "reportEndEngineHours": "停止发动机时间", "reportDuration": "持续时间", "reportStartDate": "开始日期", "reportStartTime": "开始时间", @@ -573,6 +575,7 @@ "reportSpentFuel": "燃油消耗", "reportStartOdometer": "起始里程", "reportEndOdometer": "结束里程", + "reportTimeType": "时间", "statisticsTitle": "统计", "statisticsCaptureTime": "获取时间", "statisticsActiveUsers": "活动用户", diff --git a/src/resources/l10n/zh_TW.json b/src/resources/l10n/zh_TW.json index eca52c09..acb53109 100644 --- a/src/resources/l10n/zh_TW.json +++ b/src/resources/l10n/zh_TW.json @@ -359,6 +359,8 @@ "mapGoogleRoad": "Google 道路地圖", "mapGoogleHybrid": "Google 混合地圖", "mapGoogleSatellite": "Google 衛星地圖", + "mapGoogleTraffic": "Google Traffic", + "mapGoogleKey": "Google API Key", "mapOpenTopoMap": "OpenTopo地圖", "mapBingKey": "Bing 地圖金鑰", "mapBingRoad": "Bing 道路地圖", @@ -573,6 +575,7 @@ "reportSpentFuel": "燃油消耗", "reportStartOdometer": "起始里程", "reportEndOdometer": "結束里程", + "reportTimeType": "Time", "statisticsTitle": "統計", "statisticsCaptureTime": "截取時間", "statisticsActiveUsers": "活躍用戶量", diff --git a/src/settings/DevicesPage.jsx b/src/settings/DevicesPage.jsx index 831736e4..08790cbd 100644 --- a/src/settings/DevicesPage.jsx +++ b/src/settings/DevicesPage.jsx @@ -2,7 +2,7 @@ import React, { useState } from 'react'; import { useSelector } from 'react-redux'; import { useNavigate } from 'react-router-dom'; import { - Table, TableRow, TableCell, TableHead, TableBody, Button, TableFooter, + Table, TableRow, TableCell, TableHead, TableBody, Button, TableFooter, FormControlLabel, Switch, } from '@mui/material'; import LinkIcon from '@mui/icons-material/Link'; import { useEffectAsync } from '../reactHelper'; @@ -14,8 +14,9 @@ import CollectionActions from './components/CollectionActions'; import TableShimmer from '../common/components/TableShimmer'; import SearchHeader, { filterByKeyword } from './components/SearchHeader'; import { formatTime } from '../common/util/formatter'; -import { useDeviceReadonly } from '../common/util/permissions'; +import { useAdministrator, useDeviceReadonly } from '../common/util/permissions'; import useSettingsStyles from './common/useSettingsStyles'; +import DeviceUsersValue from './components/DeviceUsersValue'; const DevicesPage = () => { const classes = useSettingsStyles(); @@ -24,17 +25,20 @@ const DevicesPage = () => { const groups = useSelector((state) => state.groups.items); + const admin = useAdministrator(); const deviceReadonly = useDeviceReadonly(); const [timestamp, setTimestamp] = useState(Date.now()); const [items, setItems] = useState([]); const [searchKeyword, setSearchKeyword] = useState(''); + const [showAll, setShowAll] = useState(false); const [loading, setLoading] = useState(false); useEffectAsync(async () => { setLoading(true); try { - const response = await fetch('/api/devices'); + const query = new URLSearchParams({ all: showAll }); + const response = await fetch(`/api/devices?${query.toString()}`); if (response.ok) { setItems(await response.json()); } else { @@ -43,7 +47,7 @@ const DevicesPage = () => { } finally { setLoading(false); } - }, [timestamp]); + }, [timestamp, showAll]); const handleExport = () => { window.location.assign('/api/reports/devices/xlsx'); @@ -69,6 +73,7 @@ const DevicesPage = () => { <TableCell>{t('deviceModel')}</TableCell> <TableCell>{t('deviceContact')}</TableCell> <TableCell>{t('userExpirationTime')}</TableCell> + {admin && <TableCell>{t('settingsUsers')}</TableCell>} <TableCell className={classes.columnAction} /> </TableRow> </TableHead> @@ -82,6 +87,7 @@ const DevicesPage = () => { <TableCell>{item.model}</TableCell> <TableCell>{item.contact}</TableCell> <TableCell>{formatTime(item.expirationTime, 'date')}</TableCell> + {admin && <TableCell><DeviceUsersValue deviceId={item.id} /></TableCell>} <TableCell className={classes.columnAction} padding="none"> <CollectionActions itemId={item.id} @@ -93,13 +99,27 @@ const DevicesPage = () => { /> </TableCell> </TableRow> - )) : (<TableShimmer columns={7} endAction />)} + )) : (<TableShimmer columns={admin ? 8 : 7} endAction />)} </TableBody> <TableFooter> <TableRow> - <TableCell colSpan={8} align="right"> + <TableCell> <Button onClick={handleExport} variant="text">{t('reportExport')}</Button> </TableCell> + <TableCell colSpan={admin ? 8 : 7} align="right"> + <FormControlLabel + control={( + <Switch + value={showAll} + onChange={(e) => setShowAll(e.target.checked)} + size="small" + /> + )} + label={t('notificationAlways')} + labelPlacement="start" + disabled={!admin} + /> + </TableCell> </TableRow> </TableFooter> </Table> diff --git a/src/settings/PreferencesPage.jsx b/src/settings/PreferencesPage.jsx index 3b7fcaed..a8e3de88 100644 --- a/src/settings/PreferencesPage.jsx +++ b/src/settings/PreferencesPage.jsx @@ -89,9 +89,7 @@ const PreferencesPage = () => { const handleReboot = useCatch(async () => { const response = await fetch('/api/server/reboot', { method: 'POST' }); - if (!response.ok) { - throw Error(await response.text()); - } + throw Error(response.statusText); }); return ( diff --git a/src/settings/components/DeviceUsersValue.jsx b/src/settings/components/DeviceUsersValue.jsx new file mode 100644 index 00000000..9fc87247 --- /dev/null +++ b/src/settings/components/DeviceUsersValue.jsx @@ -0,0 +1,27 @@ +import React, { useState } from 'react'; +import { Link } from '@mui/material'; +import { useCatch } from '../../reactHelper'; +import { useTranslation } from '../../common/components/LocalizationProvider'; + +const DeviceUsersValue = ({ deviceId }) => { + const t = useTranslation(); + + const [users, setUsers] = useState(); + + const loadUsers = useCatch(async () => { + const query = new URLSearchParams({ deviceId }); + const response = await fetch(`/api/users?${query.toString()}`); + if (response.ok) { + setUsers(await response.json()); + } else { + throw Error(await response.text()); + } + }); + + if (users) { + return users.map((user) => user.name).join(', '); + } + return (<Link href="#" onClick={loadUsers}>{t('reportShow')}</Link>); +}; + +export default DeviceUsersValue; |