aboutsummaryrefslogtreecommitdiff
path: root/modern
diff options
context:
space:
mode:
Diffstat (limited to 'modern')
-rw-r--r--modern/.env2
-rw-r--r--modern/craco.config.js5
-rw-r--r--modern/public/apple-touch-icon.pngbin0 -> 4326 bytes
-rw-r--r--modern/public/favicon.icobin15086 -> 3322 bytes
-rw-r--r--modern/public/icon.pngbin0 -> 5687 bytes
-rw-r--r--modern/public/images/icon/animal.pngbin0 -> 1074 bytes
-rw-r--r--modern/public/images/icon/backhoe.pngbin0 -> 45689 bytes
-rw-r--r--modern/public/images/icon/bicycle.pngbin0 -> 1121 bytes
-rw-r--r--modern/public/images/icon/boat.pngbin0 -> 1066 bytes
-rw-r--r--modern/public/images/icon/bus.pngbin0 -> 1012 bytes
-rw-r--r--modern/public/images/icon/car.pngbin0 -> 43950 bytes
-rw-r--r--modern/public/images/icon/crane.pngbin0 -> 1106 bytes
-rw-r--r--modern/public/images/icon/default.pngbin0 -> 819 bytes
-rw-r--r--modern/public/images/icon/helicopter.pngbin0 -> 1042 bytes
-rw-r--r--modern/public/images/icon/motorcycle.pngbin0 -> 1123 bytes
-rw-r--r--modern/public/images/icon/offroad.pngbin0 -> 1031 bytes
-rw-r--r--modern/public/images/icon/old/animal.svg (renamed from modern/public/images/icon/animal.svg)0
-rw-r--r--modern/public/images/icon/old/bicycle.svg (renamed from modern/public/images/icon/bicycle.svg)0
-rw-r--r--modern/public/images/icon/old/boat.svg (renamed from modern/public/images/icon/boat.svg)0
-rw-r--r--modern/public/images/icon/old/bus.svg (renamed from modern/public/images/icon/bus.svg)0
-rw-r--r--modern/public/images/icon/old/car.svg (renamed from modern/public/images/icon/car.svg)0
-rw-r--r--modern/public/images/icon/old/crane.svg (renamed from modern/public/images/icon/crane.svg)0
-rw-r--r--modern/public/images/icon/old/default.svg (renamed from modern/public/images/icon/default.svg)0
-rw-r--r--modern/public/images/icon/old/helicopter.svg (renamed from modern/public/images/icon/helicopter.svg)0
-rw-r--r--modern/public/images/icon/old/motorcycle.svg (renamed from modern/public/images/icon/motorcycle.svg)0
-rw-r--r--modern/public/images/icon/old/offroad.svg (renamed from modern/public/images/icon/offroad.svg)0
-rw-r--r--modern/public/images/icon/old/person.svg (renamed from modern/public/images/icon/person.svg)0
-rw-r--r--modern/public/images/icon/old/pickup.svg (renamed from modern/public/images/icon/pickup.svg)0
-rw-r--r--modern/public/images/icon/old/plane.svg (renamed from modern/public/images/icon/plane.svg)0
-rw-r--r--modern/public/images/icon/old/scooter.svg (renamed from modern/public/images/icon/scooter.svg)0
-rw-r--r--modern/public/images/icon/old/ship.svg (renamed from modern/public/images/icon/ship.svg)0
-rw-r--r--modern/public/images/icon/old/tractor.svg (renamed from modern/public/images/icon/tractor.svg)0
-rw-r--r--modern/public/images/icon/old/train.svg (renamed from modern/public/images/icon/train.svg)0
-rw-r--r--modern/public/images/icon/old/tram.svg (renamed from modern/public/images/icon/tram.svg)0
-rw-r--r--modern/public/images/icon/old/trolleybus.svg (renamed from modern/public/images/icon/trolleybus.svg)0
-rw-r--r--modern/public/images/icon/old/truck.svg (renamed from modern/public/images/icon/truck.svg)0
-rw-r--r--modern/public/images/icon/old/van.svg (renamed from modern/public/images/icon/van.svg)0
-rw-r--r--modern/public/images/icon/person.pngbin0 -> 957 bytes
-rw-r--r--modern/public/images/icon/pickup.pngbin0 -> 33134 bytes
-rw-r--r--modern/public/images/icon/plane.pngbin0 -> 1011 bytes
-rw-r--r--modern/public/images/icon/scooter.pngbin0 -> 973 bytes
-rw-r--r--modern/public/images/icon/ship.pngbin0 -> 934 bytes
-rw-r--r--modern/public/images/icon/tractor.pngbin0 -> 61757 bytes
-rw-r--r--modern/public/images/icon/train.pngbin0 -> 1031 bytes
-rw-r--r--modern/public/images/icon/tram.pngbin0 -> 1028 bytes
-rw-r--r--modern/public/images/icon/trolleybus.pngbin0 -> 986 bytes
-rw-r--r--modern/public/images/icon/truck.pngbin0 -> 58791 bytes
-rw-r--r--modern/public/images/icon/van.pngbin0 -> 921 bytes
-rw-r--r--modern/public/index.html2
-rw-r--r--modern/public/logo.inkscape.svg53
-rw-r--r--modern/public/logo.pngbin0 -> 21517 bytes
-rw-r--r--modern/public/logo.svg49
-rw-r--r--modern/public/manifest.json4
-rw-r--r--modern/src/App.js4
-rw-r--r--modern/src/CommandsPage.js121
-rw-r--r--modern/src/DevicesList.js141
-rw-r--r--modern/src/LocalizationProvider.js108
-rw-r--r--modern/src/MainPage.js60
-rw-r--r--modern/src/MainToolbar.js21
-rw-r--r--modern/src/StartPage.js7
-rw-r--r--modern/src/common/deviceCategories.js1
-rw-r--r--modern/src/common/formatter.js24
-rw-r--r--modern/src/common/selectors.js4
-rw-r--r--modern/src/components/BottomMenu.js10
-rw-r--r--modern/src/components/registration/LoginForm.js11
-rw-r--r--modern/src/index.js2
-rw-r--r--modern/src/map/Map.js37
-rw-r--r--modern/src/map/PositionsMap.js37
-rw-r--r--modern/src/map/SelectedDeviceMap.js4
-rw-r--r--modern/src/map/StatusView.js109
-rw-r--r--modern/src/map/mapStyles.js8
-rw-r--r--modern/src/map/mapUtil.js8
-rw-r--r--modern/src/reports/ReplayPage.js60
-rw-r--r--modern/src/reports/ReportFilter.js12
-rw-r--r--modern/src/setupProxy.js6
-rw-r--r--modern/src/store/devices.js18
-rw-r--r--modern/src/store/index.js3
-rw-r--r--modern/src/store/ui.js16
-rw-r--r--modern/src/theme/index.js4
79 files changed, 595 insertions, 356 deletions
diff --git a/modern/.env b/modern/.env
index 69efd74..0a33603 100644
--- a/modern/.env
+++ b/modern/.env
@@ -1,2 +1,2 @@
SKIP_PREFLIGHT_CHECK=true
-REACT_APP_URL_NAME='localhost:8082'
+REACT_APP_URL_NAME='http://trackermap.local'
diff --git a/modern/craco.config.js b/modern/craco.config.js
index 32971f2..c598595 100644
--- a/modern/craco.config.js
+++ b/modern/craco.config.js
@@ -1,4 +1,9 @@
module.exports = {
+ devServer: {
+ watchOptions: {
+ ignored: /\.#|node_modules|~$/,
+ },
+ },
webpack: {
configure: (webpackConfig) => {
const scopePluginIndex = webpackConfig.resolve.plugins.findIndex(
diff --git a/modern/public/apple-touch-icon.png b/modern/public/apple-touch-icon.png
new file mode 100644
index 0000000..bf999a0
--- /dev/null
+++ b/modern/public/apple-touch-icon.png
Binary files differ
diff --git a/modern/public/favicon.ico b/modern/public/favicon.ico
index 6be99dd..0413df6 100644
--- a/modern/public/favicon.ico
+++ b/modern/public/favicon.ico
Binary files differ
diff --git a/modern/public/icon.png b/modern/public/icon.png
new file mode 100644
index 0000000..69809ef
--- /dev/null
+++ b/modern/public/icon.png
Binary files differ
diff --git a/modern/public/images/icon/animal.png b/modern/public/images/icon/animal.png
new file mode 100644
index 0000000..c6b1043
--- /dev/null
+++ b/modern/public/images/icon/animal.png
Binary files differ
diff --git a/modern/public/images/icon/backhoe.png b/modern/public/images/icon/backhoe.png
new file mode 100644
index 0000000..7347b06
--- /dev/null
+++ b/modern/public/images/icon/backhoe.png
Binary files differ
diff --git a/modern/public/images/icon/bicycle.png b/modern/public/images/icon/bicycle.png
new file mode 100644
index 0000000..12956f1
--- /dev/null
+++ b/modern/public/images/icon/bicycle.png
Binary files differ
diff --git a/modern/public/images/icon/boat.png b/modern/public/images/icon/boat.png
new file mode 100644
index 0000000..392f903
--- /dev/null
+++ b/modern/public/images/icon/boat.png
Binary files differ
diff --git a/modern/public/images/icon/bus.png b/modern/public/images/icon/bus.png
new file mode 100644
index 0000000..5bade66
--- /dev/null
+++ b/modern/public/images/icon/bus.png
Binary files differ
diff --git a/modern/public/images/icon/car.png b/modern/public/images/icon/car.png
new file mode 100644
index 0000000..9865312
--- /dev/null
+++ b/modern/public/images/icon/car.png
Binary files differ
diff --git a/modern/public/images/icon/crane.png b/modern/public/images/icon/crane.png
new file mode 100644
index 0000000..44d22bc
--- /dev/null
+++ b/modern/public/images/icon/crane.png
Binary files differ
diff --git a/modern/public/images/icon/default.png b/modern/public/images/icon/default.png
new file mode 100644
index 0000000..e7d1f72
--- /dev/null
+++ b/modern/public/images/icon/default.png
Binary files differ
diff --git a/modern/public/images/icon/helicopter.png b/modern/public/images/icon/helicopter.png
new file mode 100644
index 0000000..4c602f1
--- /dev/null
+++ b/modern/public/images/icon/helicopter.png
Binary files differ
diff --git a/modern/public/images/icon/motorcycle.png b/modern/public/images/icon/motorcycle.png
new file mode 100644
index 0000000..01e50cc
--- /dev/null
+++ b/modern/public/images/icon/motorcycle.png
Binary files differ
diff --git a/modern/public/images/icon/offroad.png b/modern/public/images/icon/offroad.png
new file mode 100644
index 0000000..38a99ce
--- /dev/null
+++ b/modern/public/images/icon/offroad.png
Binary files differ
diff --git a/modern/public/images/icon/animal.svg b/modern/public/images/icon/old/animal.svg
index 5a23934..5a23934 100644
--- a/modern/public/images/icon/animal.svg
+++ b/modern/public/images/icon/old/animal.svg
diff --git a/modern/public/images/icon/bicycle.svg b/modern/public/images/icon/old/bicycle.svg
index a473f4b..a473f4b 100644
--- a/modern/public/images/icon/bicycle.svg
+++ b/modern/public/images/icon/old/bicycle.svg
diff --git a/modern/public/images/icon/boat.svg b/modern/public/images/icon/old/boat.svg
index 33bfe27..33bfe27 100644
--- a/modern/public/images/icon/boat.svg
+++ b/modern/public/images/icon/old/boat.svg
diff --git a/modern/public/images/icon/bus.svg b/modern/public/images/icon/old/bus.svg
index 5e88148..5e88148 100644
--- a/modern/public/images/icon/bus.svg
+++ b/modern/public/images/icon/old/bus.svg
diff --git a/modern/public/images/icon/car.svg b/modern/public/images/icon/old/car.svg
index f919e0b..f919e0b 100644
--- a/modern/public/images/icon/car.svg
+++ b/modern/public/images/icon/old/car.svg
diff --git a/modern/public/images/icon/crane.svg b/modern/public/images/icon/old/crane.svg
index 23db091..23db091 100644
--- a/modern/public/images/icon/crane.svg
+++ b/modern/public/images/icon/old/crane.svg
diff --git a/modern/public/images/icon/default.svg b/modern/public/images/icon/old/default.svg
index a4ba881..a4ba881 100644
--- a/modern/public/images/icon/default.svg
+++ b/modern/public/images/icon/old/default.svg
diff --git a/modern/public/images/icon/helicopter.svg b/modern/public/images/icon/old/helicopter.svg
index 2849ee8..2849ee8 100644
--- a/modern/public/images/icon/helicopter.svg
+++ b/modern/public/images/icon/old/helicopter.svg
diff --git a/modern/public/images/icon/motorcycle.svg b/modern/public/images/icon/old/motorcycle.svg
index 0289a34..0289a34 100644
--- a/modern/public/images/icon/motorcycle.svg
+++ b/modern/public/images/icon/old/motorcycle.svg
diff --git a/modern/public/images/icon/offroad.svg b/modern/public/images/icon/old/offroad.svg
index b0072b6..b0072b6 100644
--- a/modern/public/images/icon/offroad.svg
+++ b/modern/public/images/icon/old/offroad.svg
diff --git a/modern/public/images/icon/person.svg b/modern/public/images/icon/old/person.svg
index 805ba44..805ba44 100644
--- a/modern/public/images/icon/person.svg
+++ b/modern/public/images/icon/old/person.svg
diff --git a/modern/public/images/icon/pickup.svg b/modern/public/images/icon/old/pickup.svg
index db4494b..db4494b 100644
--- a/modern/public/images/icon/pickup.svg
+++ b/modern/public/images/icon/old/pickup.svg
diff --git a/modern/public/images/icon/plane.svg b/modern/public/images/icon/old/plane.svg
index 5210e4c..5210e4c 100644
--- a/modern/public/images/icon/plane.svg
+++ b/modern/public/images/icon/old/plane.svg
diff --git a/modern/public/images/icon/scooter.svg b/modern/public/images/icon/old/scooter.svg
index ea23f9f..ea23f9f 100644
--- a/modern/public/images/icon/scooter.svg
+++ b/modern/public/images/icon/old/scooter.svg
diff --git a/modern/public/images/icon/ship.svg b/modern/public/images/icon/old/ship.svg
index b8c563c..b8c563c 100644
--- a/modern/public/images/icon/ship.svg
+++ b/modern/public/images/icon/old/ship.svg
diff --git a/modern/public/images/icon/tractor.svg b/modern/public/images/icon/old/tractor.svg
index 3a9e9f2..3a9e9f2 100644
--- a/modern/public/images/icon/tractor.svg
+++ b/modern/public/images/icon/old/tractor.svg
diff --git a/modern/public/images/icon/train.svg b/modern/public/images/icon/old/train.svg
index 125b468..125b468 100644
--- a/modern/public/images/icon/train.svg
+++ b/modern/public/images/icon/old/train.svg
diff --git a/modern/public/images/icon/tram.svg b/modern/public/images/icon/old/tram.svg
index f54084f..f54084f 100644
--- a/modern/public/images/icon/tram.svg
+++ b/modern/public/images/icon/old/tram.svg
diff --git a/modern/public/images/icon/trolleybus.svg b/modern/public/images/icon/old/trolleybus.svg
index 46ecc71..46ecc71 100644
--- a/modern/public/images/icon/trolleybus.svg
+++ b/modern/public/images/icon/old/trolleybus.svg
diff --git a/modern/public/images/icon/truck.svg b/modern/public/images/icon/old/truck.svg
index df5c164..df5c164 100644
--- a/modern/public/images/icon/truck.svg
+++ b/modern/public/images/icon/old/truck.svg
diff --git a/modern/public/images/icon/van.svg b/modern/public/images/icon/old/van.svg
index a3ee13c..a3ee13c 100644
--- a/modern/public/images/icon/van.svg
+++ b/modern/public/images/icon/old/van.svg
diff --git a/modern/public/images/icon/person.png b/modern/public/images/icon/person.png
new file mode 100644
index 0000000..ed15d09
--- /dev/null
+++ b/modern/public/images/icon/person.png
Binary files differ
diff --git a/modern/public/images/icon/pickup.png b/modern/public/images/icon/pickup.png
new file mode 100644
index 0000000..60c005d
--- /dev/null
+++ b/modern/public/images/icon/pickup.png
Binary files differ
diff --git a/modern/public/images/icon/plane.png b/modern/public/images/icon/plane.png
new file mode 100644
index 0000000..f5840c6
--- /dev/null
+++ b/modern/public/images/icon/plane.png
Binary files differ
diff --git a/modern/public/images/icon/scooter.png b/modern/public/images/icon/scooter.png
new file mode 100644
index 0000000..61995ae
--- /dev/null
+++ b/modern/public/images/icon/scooter.png
Binary files differ
diff --git a/modern/public/images/icon/ship.png b/modern/public/images/icon/ship.png
new file mode 100644
index 0000000..1e5e48b
--- /dev/null
+++ b/modern/public/images/icon/ship.png
Binary files differ
diff --git a/modern/public/images/icon/tractor.png b/modern/public/images/icon/tractor.png
new file mode 100644
index 0000000..9eaa214
--- /dev/null
+++ b/modern/public/images/icon/tractor.png
Binary files differ
diff --git a/modern/public/images/icon/train.png b/modern/public/images/icon/train.png
new file mode 100644
index 0000000..94ef26c
--- /dev/null
+++ b/modern/public/images/icon/train.png
Binary files differ
diff --git a/modern/public/images/icon/tram.png b/modern/public/images/icon/tram.png
new file mode 100644
index 0000000..9daf131
--- /dev/null
+++ b/modern/public/images/icon/tram.png
Binary files differ
diff --git a/modern/public/images/icon/trolleybus.png b/modern/public/images/icon/trolleybus.png
new file mode 100644
index 0000000..c0db490
--- /dev/null
+++ b/modern/public/images/icon/trolleybus.png
Binary files differ
diff --git a/modern/public/images/icon/truck.png b/modern/public/images/icon/truck.png
new file mode 100644
index 0000000..dc42323
--- /dev/null
+++ b/modern/public/images/icon/truck.png
Binary files differ
diff --git a/modern/public/images/icon/van.png b/modern/public/images/icon/van.png
new file mode 100644
index 0000000..7be109e
--- /dev/null
+++ b/modern/public/images/icon/van.png
Binary files differ
diff --git a/modern/public/index.html b/modern/public/index.html
index 78138ed..b6919c8 100644
--- a/modern/public/index.html
+++ b/modern/public/index.html
@@ -7,7 +7,7 @@
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
<link rel="stylesheet" href="%PUBLIC_URL%/styles.css">
- <title>Traccar</title>
+ <title>ETBSA</title>
</head>
<body style="margin: 0; padding: 0;">
<noscript>
diff --git a/modern/public/logo.inkscape.svg b/modern/public/logo.inkscape.svg
new file mode 100644
index 0000000..c780710
--- /dev/null
+++ b/modern/public/logo.inkscape.svg
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ id="img"
+ height="64"
+ viewBox="0 0 240 64"
+ width="240"
+ version="1.1"
+ sodipodi:docname="logo.svg"
+ inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20, custom)"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:svg="http://www.w3.org/2000/svg">
+ <defs
+ id="defs22" />
+ <sodipodi:namedview
+ id="namedview20"
+ pagecolor="#ffffff"
+ bordercolor="#cccccc"
+ borderopacity="1"
+ inkscape:pageshadow="0"
+ inkscape:pageopacity="1"
+ inkscape:pagecheckerboard="0"
+ showgrid="false"
+ inkscape:zoom="4.5552343"
+ inkscape:cx="132.26542"
+ inkscape:cy="47.637506"
+ inkscape:window-width="1920"
+ inkscape:window-height="1007"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1"
+ inkscape:current-layer="img" />
+ <rect
+ style="fill:#ffffff;fill-rule:evenodd;stroke-width:38.4;stroke-linecap:round;stroke-linejoin:round"
+ id="rect846"
+ width="151.03503"
+ height="50.052311"
+ x="44.482483"
+ y="6.9738445" />
+ <g
+ transform="translate(46.156565,-0.2695845)"
+ id="g6">
+ <path
+ style="fill:#efdb1e;stroke-width:0.0901377"
+ d="m 3.3409719,63.234274 c -2.68310269,-0.418158 -5.1206207,-1.669477 -7.0943514,-3.641941 -1.9733059,-1.972037 -3.250335,-4.468735 -3.6532849,-7.142472 -0.1133311,-0.751998 -0.1281317,-3.649757 -0.1051998,-20.596476 0.025256,-18.66434 0.035423,-19.757497 0.1897066,-20.395665 0.6646054,-2.7490461 1.6937732,-4.6240656 3.5665418,-6.4978083 1.8319083,-1.8328616 3.70315231,-2.8812438 6.3152663,-3.538185 L 3.3258211,1.2290366 73.407916,1.2022102 c 61.608354,-0.023583 70.185634,-0.010656 70.938404,0.1069518 1.28953,0.2014615 2.36095,0.5406129 3.56045,1.1270302 3.71857,1.8179753 6.26588,5.1285559 7.09539,9.2214568 l 0.20575,1.015207 v 19.559892 c 0,18.372433 -0.01,19.611878 -0.16041,20.416201 -0.5188,2.769123 -1.6942,4.999941 -3.65765,6.941905 -0.57715,0.570834 -1.35481,1.246517 -1.72814,1.501517 -1.38677,0.947236 -2.98521,1.644017 -4.66096,2.031773 l -0.87978,0.203573 -69.991952,0.01531 C 15.096417,63.355939 4.0124095,63.338874 3.3409719,63.234263 Z M 143.85648,61.295646 c 2.84418,-0.395588 5.6604,-2.123389 7.3731,-4.523511 0.87958,-1.232612 1.59334,-2.941439 1.87281,-4.483737 0.1007,-0.556095 0.1225,-4.11424 0.1225,-20.05565 0,-18.254074 -0.01,-19.425553 -0.16107,-20.170564 -0.46293,-2.2733251 -1.41885,-4.0482244 -3.0755,-5.7104011 -1.43381,-1.4386066 -3.00707,-2.3538357 -4.98454,-2.8996987 l -0.88281,-0.243692 H 73.813536 3.5060967 L 2.6047197,3.4562747 C 1.4697865,3.7683862 -0.24145949,4.605543 -1.1843646,5.3099275 -3.3956931,6.9618738 -4.9484791,9.4948339 -5.415212,12.21144 c -0.1203571,0.700558 -0.1375342,3.206124 -0.1375342,20.066377 0,16.985777 0.016516,19.360558 0.1395288,20.065983 0.788328,4.520609 4.3531978,8.078665 8.9193141,8.902268 0.6239771,0.112545 10.0776683,0.131156 70.1882413,0.138154 48.988082,0.0057 69.672032,-0.02041 70.162142,-0.08857 z M 13.805948,54.025829 c 0.162008,-0.02007 0.405381,-0.01965 0.540827,9.19e-4 0.135444,0.02057 0.0029,0.03699 -0.294562,0.03647 -0.297455,-5.41e-4 -0.408275,-0.01733 -0.246265,-0.03739 z m 17.801829,6.31e-4 c 0.137015,-0.02072 0.339824,-0.02017 0.450689,0.0012 0.11086,0.0214 -0.0012,0.03834 -0.249118,0.03767 -0.247879,-7.22e-4 -0.338585,-0.01819 -0.201571,-0.0389 z m 6.39978,0 c 0.137015,-0.02072 0.339824,-0.02017 0.450688,0.0012 0.110861,0.0214 -0.0012,0.03834 -0.249118,0.03767 -0.247878,-7.22e-4 -0.338584,-0.01819 -0.20157,-0.0389 z M 3.6638378,53.93476 c 0.2354849,-0.01857 0.6208241,-0.01857 0.856309,0 0.2354849,0.01857 0.042808,0.03376 -0.4281551,0.03376 -0.4709698,0 -0.6636388,-0.01519 -0.4281539,-0.03376 z m 5.3181275,0 c 0.235485,-0.01857 0.620823,-0.01857 0.856308,0 0.2354837,0.01857 0.04282,0.03376 -0.428154,0.03376 -0.47097,0 -0.663639,-0.01519 -0.428154,-0.03376 z m 9.6474567,-9.1e-5 c 0.236982,-0.01863 0.60204,-0.01841 0.81124,5.41e-4 0.209202,0.01891 0.01531,0.03414 -0.430874,0.03387 -0.446181,-2.69e-4 -0.617346,-0.01575 -0.380366,-0.03437 z m 3.638953,-0.0012 c -0.02314,-0.03718 0.248257,-0.05651 0.603111,-0.04293 1.098222,0.04199 1.225166,0.08104 0.312493,0.09612 -0.480439,0.0079 -0.892459,-0.01599 -0.915604,-0.05318 z m 2.050704,-0.05813 c -0.02654,-0.06915 -0.03208,-0.282101 -0.01233,-0.473223 0.03429,-0.331681 0.03661,-0.328102 0.05107,0.07862 l 0.01515,0.426122 1.645014,0.02673 1.645014,0.02673 -1.647843,0.02037 c -1.340183,0.01656 -1.65685,-0.0031 -1.69609,-0.105356 z m 18.753578,0.01284 c -0.02383,-0.06209 -0.0322,-1.694708 -0.01862,-3.628044 l 0.02471,-3.515157 0.02145,3.581401 0.02145,3.581401 2.230909,0.02576 2.23091,0.02576 -2.233739,0.02089 c -1.721741,0.0161 -2.243668,-0.005 -2.277057,-0.092 z m 5.051622,0.05571 c 0.637248,-0.0667 1.46734,-0.07278 1.428562,-0.0105 -0.02313,0.03718 -0.414871,0.06112 -0.87052,0.05318 -0.455651,-0.0079 -0.706769,-0.02716 -0.558042,-0.04272 z m 5.475868,-0.0092 c 0.235485,-0.01857 0.620824,-0.01857 0.856309,0 0.235485,0.01857 0.04281,0.03376 -0.428155,0.03376 -0.47097,0 -0.663639,-0.01518 -0.428154,-0.03376 z M 15.030154,51.927848 c 0,-0.421394 0.01553,-0.593783 0.03451,-0.383086 0.01898,0.210697 0.01898,0.555474 0,0.766171 -0.01898,0.210697 -0.03451,0.0383 -0.03451,-0.383085 z m -8.8875289,0.293623 c 0.3594247,-0.01711 0.9475742,-0.01711 1.3069976,0 0.3594246,0.01711 0.065354,0.0311 -0.6534988,0.0311 -0.718848,0 -1.0129222,-0.014 -0.6534988,-0.0311 z M 50.719859,52.22129 c 0.386478,-0.01693 0.994908,-0.01683 1.352067,2.71e-4 0.357158,0.01707 0.04095,0.03092 -0.702688,0.0308 -0.743636,-9e-5 -1.035857,-0.01409 -0.649379,-0.03103 z M 10.609841,50.350436 c 5.41e-4,-0.297454 0.01733,-0.408273 0.03739,-0.246264 0.02005,0.16201 0.01965,0.405381 -9.19e-4,0.540827 -0.02057,0.135446 -0.03699,0.0029 -0.03647,-0.294563 z M 133.0791,50.542887 c -0.37181,-0.111935 -0.86269,-0.302428 -1.09082,-0.423325 -0.22813,-0.120894 -2.32179,-1.456954 -4.65259,-2.969015 l -4.2378,-2.749202 3.80482,-0.02349 3.80484,-0.02349 -5.14095,-14.689436 c -2.82753,-8.07919 -5.15225,-14.678128 -5.16608,-14.664305 -0.0138,0.01382 0.45238,3.114987 1.03599,6.891479 l 1.0611,6.86635 -2.20816,6.311639 -2.20817,6.311641 h -5.16545 c -2.84098,0 -5.1655,-0.03042 -5.1656,-0.0676 -1e-4,-0.03718 2.48125,-6.975065 5.51409,-15.417519 l 5.51426,-15.349915 4.37853,0.0265 4.37852,0.0265 0.51402,0.252418 c 0.60983,0.299468 1.26187,0.986621 1.45024,1.528325 0.0731,0.21041 2.73743,7.683721 5.92059,16.607358 3.18316,8.923638 5.86496,16.525359 5.95958,16.892713 0.50672,1.9677 -0.10376,3.60601 -1.63237,4.380609 -0.82913,0.420157 -1.38981,0.492576 -3.78418,0.488784 -2.02686,-0.0032 -2.26395,-0.02023 -2.88441,-0.207008 z M 30.069234,50.350436 c 0.0018,-0.148726 0.02203,-0.198657 0.0449,-0.110958 0.02285,0.0877 0.02135,0.209388 -0.0033,0.270415 -0.02469,0.06102 -0.0434,-0.01074 -0.04155,-0.159458 z m -6.850469,-1.442203 c 0.0018,-0.148727 0.02204,-0.198658 0.0449,-0.110958 0.02285,0.0877 0.02135,0.209387 -0.0033,0.270414 -0.02469,0.06102 -0.04339,-0.01074 -0.04155,-0.159458 z m -3.194928,-0.919922 c 0.111544,-0.02148 0.294076,-0.02148 0.405621,0 0.111544,0.02148 0.02028,0.03906 -0.20281,0.03906 -0.223091,0 -0.314356,-0.01758 -0.202811,-0.03906 z m -5.72203,-0.08899 c 0.0877,-0.02285 0.209387,-0.02135 0.270413,0.0033 0.06102,0.02469 -0.01074,0.04339 -0.159456,0.04155 -0.148728,-0.0018 -0.198659,-0.02203 -0.110958,-0.0449 z m 17.439937,0.0028 c 0.06197,-0.025 0.163375,-0.025 0.225345,0 0.06197,0.02501 0.01123,0.04547 -0.112679,0.04547 -0.123938,0 -0.174641,-0.02046 -0.112666,-0.04547 z m 6.264574,-0.0024 c 0.08675,-0.02267 0.228724,-0.02267 0.315482,0 0.08675,0.02267 0.01577,0.04122 -0.157741,0.04122 -0.173516,0 -0.244499,-0.01855 -0.157741,-0.04122 z M 24.308627,47.195616 c 7.2e-4,-0.24788 0.01819,-0.338586 0.0389,-0.20157 0.02071,0.137014 0.02017,0.339824 -0.0012,0.450688 -0.0214,0.110861 -0.03834,-0.0012 -0.03767,-0.249118 z m -3.467915,-0.467195 c 0.06507,-0.02604 0.142812,-0.02284 0.172763,0.0071 0.02996,0.02996 -0.02329,0.05126 -0.118306,0.04735 -0.105001,-0.0043 -0.126365,-0.02568 -0.05445,-0.05445 z m 72.421754,-5.138742 c 0.0877,-0.02285 0.209391,-0.02135 0.270414,0.0033 0.06103,0.02469 -0.01074,0.04339 -0.159453,0.04155 -0.148728,-0.0018 -0.198655,-0.02203 -0.110958,-0.0449 z m 2.343582,0 c 0.0877,-0.02285 0.20939,-0.02135 0.270413,0.0033 0.06103,0.02469 -0.01074,0.04339 -0.159453,0.04155 -0.148728,-0.0018 -0.198655,-0.02203 -0.110958,-0.0449 z M 44.066702,29.934236 c 0,-6.221758 0.01074,-8.767023 0.0239,-5.656143 0.01315,3.110878 0.01315,8.201408 0,11.312287 -0.01315,3.110879 -0.0239,0.565614 -0.0239,-5.656144 z m 10.636577,-3.60551 c 0,-8.204788 0.01062,-11.561294 0.02358,-7.458899 0.01298,4.102395 0.01298,10.815403 0,14.917798 -0.01298,4.102394 -0.02358,0.745889 -0.02358,-7.458899 z m 89.530371,14.452481 c 0.062,-0.02501 0.16338,-0.02501 0.22534,0 0.062,0.02501 0.011,0.04547 -0.11267,0.04547 -0.12393,0 -0.17464,-0.02046 -0.11267,-0.04547 z m -1.20232,-2.374023 c 0,-0.867575 0.0136,-1.222492 0.03,-0.788705 0.0165,0.433789 0.0165,1.143623 0,1.577411 -0.0165,0.433788 -0.03,0.07887 -0.03,-0.788706 z m -1.19129,-0.04507 c 0.001,-0.148728 0.022,-0.198659 0.0449,-0.110958 0.0228,0.0877 0.0214,0.209388 -0.004,0.270414 -0.0247,0.06102 -0.0435,-0.01074 -0.0415,-0.159456 z m 1.98922,-0.199888 c 0.13702,-0.02072 0.33983,-0.02017 0.45069,0.0012 0.11084,0.0214 -0.001,0.03835 -0.24911,0.03767 -0.24788,-7.21e-4 -0.33859,-0.01819 -0.20158,-0.0389 z M 98.293045,32.766064 c 0.0043,-0.105001 0.02569,-0.126364 0.05446,-0.05445 0.026,0.06507 0.0228,0.142812 -0.007,0.172763 -0.02995,0.02996 -0.05127,-0.02329 -0.04735,-0.118306 z M 70.73409,31.73699 c 0,-0.371817 0.0159,-0.523925 0.03536,-0.338015 0.01945,0.185909 0.01945,0.490123 0,0.676032 -0.01944,0.185909 -0.03536,0.0338 -0.03536,-0.338017 z m 36.94373,0.225345 c 0.001,-0.148727 0.0221,-0.198657 0.0449,-0.110958 0.0228,0.0877 0.0214,0.209388 -0.004,0.270413 -0.0247,0.06103 -0.0433,-0.01074 -0.0415,-0.159456 z m -0.004,-1.306997 c 0,-0.12394 0.0205,-0.174641 0.0455,-0.112667 0.025,0.06197 0.025,0.163374 0,0.225344 -0.025,0.06197 -0.0455,0.01123 -0.0455,-0.112667 z M 82.428803,21.588983 c 0.0043,-0.105001 0.02569,-0.126364 0.05447,-0.05445 0.02604,0.06506 0.02284,0.142813 -0.0071,0.172764 -0.02996,0.02996 -0.05127,-0.02329 -0.04735,-0.118306 z m 24.717637,-1.389624 c 0,-0.272667 0.0169,-0.384213 0.0376,-0.247879 0.0206,0.136334 0.0206,0.359424 0,0.495757 -0.0206,0.136333 -0.0376,0.02479 -0.0376,-0.247878 z M 27.478744,15.016438 c 2.4e-5,-1.983031 0.01196,-2.781428 0.02644,-1.774217 0.01451,1.00721 0.0145,2.62969 -4.4e-5,3.60551 -0.01454,0.975819 -0.02642,0.151738 -0.02639,-1.831293 z m 66.99887,2.599367 c 0.06197,-0.02501 0.163374,-0.02501 0.225344,0 0.06197,0.02501 0.01123,0.04547 -0.112667,0.04547 -0.12394,0 -0.174643,-0.02046 -0.112667,-0.04547 z m 1.177424,-0.0018 c 0.06507,-0.02604 0.142814,-0.02284 0.172767,0.0071 0.02996,0.02996 -0.02329,0.05126 -0.118307,0.04734 -0.105013,-0.0043 -0.126364,-0.02568 -0.05447,-0.05445 z m -2.253443,-6.580056 c 0.06507,-0.02604 0.142813,-0.02284 0.172766,0.0071 0.02996,0.02996 -0.02329,0.05126 -0.118307,0.04734 -0.105013,-0.0043 -0.126363,-0.02568 -0.05447,-0.05445 z m 3.15482,0 c 0.06507,-0.02604 0.142815,-0.02284 0.172768,0.0071 0.02996,0.02996 -0.02329,0.05126 -0.118307,0.04734 -0.105013,-0.0043 -0.126364,-0.02568 -0.05446,-0.05445 z"
+ id="path238" />
+ <path
+ style="fill:#337729;stroke-width:0.0901377"
+ d="M 3.5060967,61.246068 C 2.3978752,61.046175 1.6095179,60.788372 0.59465251,60.293988 -2.0485554,59.006371 -4.0837231,56.695729 -5.0101456,53.93054 -5.5834263,52.219415 -5.5527462,53.443674 -5.5527462,32.277817 c 0,-16.860253 0.017175,-19.365819 0.1375342,-20.066377 C -4.9484791,9.4948339 -3.3956931,6.9618738 -1.1843646,5.3099275 -0.24145949,4.605543 1.4697865,3.7683862 2.6047197,3.4562747 L 3.5060967,3.2083922 H 73.813536 144.12097 l 0.88281,0.243692 c 1.97747,0.545863 3.55073,1.4610921 4.98454,2.8996987 1.65665,1.6621767 2.61257,3.437076 3.0755,5.7104011 0.15171,0.745011 0.16107,1.91649 0.16107,20.170564 0,21.038041 0.0271,19.87475 -0.50264,21.542923 -1.24725,3.927328 -4.81932,6.957165 -8.86577,7.519975 -0.49011,0.06817 -21.17406,0.09428 -70.162142,0.08857 -60.110573,-0.007 -69.5642642,-0.02561 -70.1882413,-0.138154 z m 12.3696093,-7.408099 0.610226,-0.152435 0.02433,-1.915427 0.02433,-1.915428 h -1.443997 -1.443997 v 0.676033 0.676034 h 0.676034 0.676033 v 0.710589 c 0,0.813706 -0.005,0.818284 -0.895453,0.820522 -1.029416,0.0026 -1.600527,-0.542153 -1.818795,-1.73481 -0.206405,-1.127842 0.173247,-2.24784 0.932296,-2.750331 0.514456,-0.34057 1.591843,-0.396851 2.317406,-0.121053 0.269712,0.102523 0.498888,0.177223 0.509281,0.166005 0.11202,-0.120906 0.471277,-1.199502 0.417455,-1.253324 -0.03938,-0.03938 -0.390963,-0.153271 -0.781308,-0.253104 -2.085579,-0.533403 -3.983976,0.172237 -4.696311,1.745629 -0.292628,0.64635 -0.430496,1.513416 -0.358358,2.253733 0.226169,2.321037 1.472029,3.38352 3.808631,3.248043 0.457588,-0.02652 1.10658,-0.116829 1.442203,-0.200672 z m 17.353312,0.01376 0.518291,-0.144876 v -0.673798 c 0,-0.604777 -0.01616,-0.667573 -0.157741,-0.613017 -0.911991,0.351426 -1.987136,0.400488 -2.547389,0.116244 -0.598485,-0.303638 -0.840013,-0.836763 -0.884827,-1.953078 -0.05123,-1.276215 0.196133,-1.956433 0.878765,-2.416458 0.417198,-0.281149 1.162469,-0.277427 1.925067,0.0096 l 0.570056,0.214567 0.19457,-0.507515 c 0.107016,-0.279134 0.218599,-0.57273 0.247965,-0.652435 0.09182,-0.249215 -1.086601,-0.576284 -2.074289,-0.575719 -1.146933,6.31e-4 -1.650618,0.19192 -2.351469,0.892915 -0.718781,0.718925 -0.945375,1.289296 -1.006243,2.53287 -0.109884,2.244799 0.75526,3.608249 2.489742,3.923814 0.543828,0.09894 1.545397,0.02915 2.197502,-0.15313 z m 6.251628,0.01627 c 0.866006,-0.257176 1.516066,-0.908324 1.891915,-1.895078 0.138394,-0.363346 0.171397,-0.686513 0.17029,-1.667548 -0.0017,-1.548417 -0.167645,-2.043343 -0.93994,-2.804131 -0.687797,-0.67755 -1.174441,-0.846449 -2.438852,-0.846449 -1.270037,0 -1.763437,0.171604 -2.440705,0.848873 -0.671075,0.671075 -0.902461,1.269273 -0.962076,2.487238 -0.111568,2.279422 0.799498,3.685987 2.592618,4.002644 0.611054,0.107906 1.521621,0.05416 2.12675,-0.125549 z M 37.38897,52.573063 c -0.473344,-0.222298 -0.719555,-0.573813 -0.903088,-1.289337 -0.328114,-1.279176 0.02881,-2.710438 0.78141,-3.133421 0.497346,-0.279523 1.513842,-0.248909 1.945699,0.0586 0.419146,0.298458 0.677974,0.928907 0.731174,1.780986 0.07545,1.208364 -0.195106,2.054384 -0.800291,2.502545 -0.354337,0.262396 -1.277538,0.304812 -1.754904,0.08062 z m -32.1883064,0.546746 0.2575068,-0.836145 1.3179847,0.0249 1.3179859,0.0249 0.2557903,0.833774 0.255791,0.833775 h 0.807817 c 0.5866187,0 0.8075857,-0.03086 0.8069657,-0.112667 -4.5e-4,-0.06197 -0.5601887,-1.69459 -1.2438227,-3.628045 L 7.7337106,46.74493 6.7799318,46.719455 c -0.8451704,-0.02257 -0.9610209,-0.0072 -1.0173726,0.135206 -0.149808,0.378513 -2.4818073,7.048125 -2.4818073,7.09807 0,0.03028 0.374042,0.04339 0.8312024,0.02914 l 0.8312025,-0.02591 z m 0.6979235,-2.251076 c 0.0061,-0.106502 0.8894048,-2.959689 0.8936966,-2.886591 0.0033,0.05551 0.7463886,2.508498 0.8608389,2.841522 0.029271,0.08519 -0.1804295,0.112679 -0.859827,0.112679 -0.4942013,0 -0.8968202,-0.03042 -0.8947085,-0.0676 z M 19.775959,52.598945 V 51.19687 l 0.422611,0.02748 0.422611,0.02748 0.849814,1.374601 0.849814,1.374601 h 0.845812 c 0.465196,0 0.845811,-0.02347 0.845811,-0.05217 0,-0.0287 -0.468371,-0.745094 -1.040826,-1.592003 -0.756336,-1.118949 -1.008871,-1.558414 -0.923912,-1.607804 1.089651,-0.633462 1.42865,-1.517464 1.054073,-2.748684 -0.09502,-0.312312 -0.531523,-0.761628 -0.938975,-0.966528 -0.45703,-0.229831 -1.276734,-0.333972 -2.628732,-0.333972 h -1.290442 v 3.650579 3.650579 h 0.76617 0.766171 z m 0.0676,-2.70473 c -0.03718,-0.03827 -0.0676,-0.468438 -0.0676,-0.955933 v -0.886355 l 0.60843,3.6e-4 c 1.001421,5.41e-4 1.420633,0.394923 1.229735,1.156857 -0.054,0.215562 -0.172092,0.374516 -0.359006,0.483264 -0.298676,0.173769 -1.299746,0.316906 -1.411555,0.20183 z m 7.77438,3.622145 v -0.484657 l -0.450688,-0.193881 -0.45069,-0.193881 v -2.294488 -2.29449 l 0.45069,-0.228381 c 0.450386,-0.228229 0.450688,-0.228683 0.450688,-0.679584 v -0.451205 l -1.645014,0.02457 -1.645014,0.02457 -0.0277,0.433725 -0.0277,0.433727 0.455855,0.192593 0.455855,0.192594 v 2.324173 2.324173 L 24.733533,52.8743 c -0.435947,0.22091 -0.450689,0.241109 -0.450689,0.61746 0,0.213993 0.02704,0.416119 0.06009,0.44917 0.03306,0.03306 0.783447,0.06009 1.667549,0.06009 h 1.607456 z M 47.53838,53.324985 v -0.676033 h -1.442204 -1.442204 v -2.978055 -2.978055 l -0.788705,0.02605 -0.788705,0.02605 -0.02362,3.515156 c -0.01299,1.933337 -0.0041,3.565957 0.0197,3.628046 0.03307,0.08618 0.566458,0.112886 2.254524,0.112886 h 2.211203 z m 2.253551,-0.180275 0.247646,-0.81124 1.314173,-0.02491 1.314174,-0.02493 0.256417,0.836161 0.256414,0.83616 0.829391,0.02591 c 0.456166,0.01426 0.829391,-0.0096 0.829391,-0.05299 0,-0.04339 -0.563996,-1.677537 -1.253325,-3.631426 l -1.25332,-3.552523 h -0.970239 -0.97024 l -1.242294,3.515372 c -0.683262,1.933455 -1.244294,3.567597 -1.246739,3.631428 -0.0034,0.0883 0.192241,0.109859 0.818234,0.09013 l 0.822678,-0.02591 z m 0.720741,-2.275979 c -5.41e-4,-0.143975 0.850501,-2.924617 0.872385,-2.850379 0.01276,0.04326 0.221823,0.717495 0.464605,1.498314 l 0.441422,1.419669 h -0.88908 c -0.488993,0 -0.889192,-0.03042 -0.889332,-0.0676 z m 88.224298,-0.248566 c 0.6782,-0.159901 1.34025,-0.482922 1.77861,-0.867815 0.92707,-0.813972 1.26368,-2.321639 0.86448,-3.871845 -0.0946,-0.367355 -2.77642,-7.969076 -5.95958,-16.892714 -3.18316,-8.923636 -5.84742,-16.396948 -5.92059,-16.607358 -0.18837,-0.541703 -0.84041,-1.228857 -1.45024,-1.528325 l -0.51402,-0.252418 -4.37852,-0.0265 -4.37853,-0.0265 -5.51426,15.349916 c -3.03284,8.442453 -5.51419,15.380337 -5.51409,15.417518 0,0.03718 2.32462,0.0676 5.1656,0.0676 h 5.16545 l 2.20817,-6.31164 2.20816,-6.311639 -1.0611,-6.86635 c -0.58361,-3.776492 -1.04981,-6.877658 -1.03599,-6.891479 0.0138,-0.01382 2.33855,6.585115 5.16608,14.664305 l 5.14095,14.689436 -3.80484,0.02349 -3.80482,0.02349 4.2378,2.749201 c 2.3308,1.512061 4.42446,2.848118 4.65259,2.969016 0.22813,0.120894 0.71901,0.311393 1.09082,0.423325 0.62046,0.186781 0.85755,0.203797 2.88441,0.207008 1.6438,0.0026 2.35283,-0.03057 2.77346,-0.129733 z M 27.009513,45.43174 c 0.483364,-0.398258 0.878843,-0.762598 0.878843,-0.809646 0,-0.04784 -0.369838,-0.08554 -0.839072,-0.08554 h -0.839072 l -0.595995,0.758287 c -0.327797,0.417057 -0.572165,0.782113 -0.54304,0.811239 0.02913,0.02913 0.279426,0.05223 0.556224,0.05137 0.495428,-0.0016 0.516961,-0.01288 1.382112,-0.725699 z m 70.555318,-3.959103 c 4.503659,-0.58465 7.620059,-2.352497 9.049319,-5.133406 0.78602,-1.529381 1.08256,-2.901661 1.08212,-5.00786 0,-1.096129 -0.0383,-1.504938 -0.20122,-2.15966 -0.68166,-2.739729 -2.59291,-4.594668 -5.9315,-5.756753 -0.49421,-0.172026 -2.275511,-0.625409 -3.958454,-1.00752 -4.116798,-0.934722 -5.214658,-1.347056 -5.7068,-2.143372 -0.647848,-1.048239 -0.01821,-2.068461 1.520199,-2.463258 0.887939,-0.227867 2.659379,-0.204669 3.439052,0.04504 1.084601,0.347361 1.777742,1.185772 1.930152,2.334658 l 0.0623,0.469546 h 4.179781 4.17979 l -6e-5,-0.247879 c 0,-1.352799 -0.3929,-3.250156 -0.86812,-4.196586 -1.39409,-2.776479 -4.68096,-4.62728 -9.065948,-5.104931 -1.10344,-0.120199 -3.381193,-0.121846 -4.442836,-0.0032 -4.620108,0.516258 -8.03522,2.472886 -9.514823,5.451344 -0.589293,1.186254 -0.807084,2.059596 -0.87082,3.491983 -0.122579,2.75476 0.491188,4.599984 2.084399,6.266512 1.75463,1.835377 3.588555,2.63948 8.571657,3.758325 4.116122,0.924186 5.182245,1.481286 5.182245,2.707976 0,0.817327 -0.520032,1.342249 -1.621804,1.637057 -0.446704,0.119527 -0.960634,0.15783 -2.163305,0.161234 -1.435218,0.004 -1.638353,-0.01539 -2.253444,-0.215749 -0.562901,-0.183359 -0.760358,-0.304184 -1.179894,-0.721992 -0.590546,-0.588113 -0.823048,-1.15998 -0.831368,-2.044914 l -0.0054,-0.573323 h -4.231543 -4.231544 l 0.04689,1.41967 c 0.03893,1.178551 0.08697,1.554211 0.282906,2.211829 0.541494,1.817413 1.595484,3.264433 3.282186,4.506113 1.617712,1.190895 4.294694,2.104016 7.048051,2.404096 0.940732,0.102523 4.095454,0.05036 5.137851,-0.08496 z M 145.544,40.99649 c 1.02011,-0.467029 1.60674,-1.346432 1.6671,-2.499167 0.0485,-0.924343 -0.19823,-1.581686 -0.83081,-2.214255 -1.42792,-1.427932 -3.87452,-0.996081 -4.71124,0.831591 -0.62354,1.36196 -0.13386,2.952151 1.15425,3.748316 0.76104,0.470392 1.86637,0.524636 2.7207,0.133515 z m -2.35585,-0.52356 c -0.85931,-0.429403 -1.27733,-1.148823 -1.27357,-2.191868 0.004,-0.923636 0.46413,-1.673597 1.29423,-2.10636 0.90043,-0.469439 2.1252,-0.28134 2.8432,0.436661 0.71799,0.718002 0.9061,1.942754 0.43666,2.843199 -0.63469,1.21741 -2.03659,1.649963 -3.30052,1.018368 z m 0.34693,-1.167197 c 0,-0.70026 0.0752,-0.795842 0.51532,-0.655006 0.16671,0.05335 0.38397,0.282937 0.64775,0.684536 0.35924,0.5469 0.42566,0.604264 0.69971,0.604264 h 0.3028 l -0.2395,-0.383086 c -0.13171,-0.210697 -0.35871,-0.535192 -0.50445,-0.721101 -0.19422,-0.24774 -0.2282,-0.338017 -0.12723,-0.338017 0.24936,0 0.60267,-0.393602 0.65639,-0.731262 0.0437,-0.274878 0.01,-0.373239 -0.22094,-0.630966 l -0.27276,-0.305321 h -0.97643 -0.97642 l -0.0247,1.554876 -0.0247,1.554877 h 0.27255 0.27253 z m 0,-1.61965 v -0.45069 h 0.52077 c 0.57105,0 0.92143,0.170873 0.92143,0.449363 0,0.322512 -0.24717,0.452016 -0.86274,0.452016 h -0.57946 z M 25.634912,37.64159 v -3.559864 l -6.692727,-0.02311 -6.692728,-0.02311 -0.02403,-2.366116 -0.02403,-2.366115 h 6.040726 6.040725 v -3.334452 -3.334458 l -6.016695,-0.02318 -6.016694,-0.02317 -0.02417,-2.140771 -0.02417,-2.140771 h 6.716894 6.716893 V 14.881232 11.455997 H 14.457832 3.2807519 V 26.328726 41.201455 H 14.457832 25.634912 Z M 44.113149,29.889167 V 18.576879 h 3.740717 3.740717 V 15.016438 11.455997 H 39.516124 27.437667 v 3.560441 3.560441 h 3.785785 3.785786 v 11.312288 11.312288 h 4.551956 4.551955 z m 29.339837,11.062579 c 0.811067,-0.228112 2.0046,-0.773221 2.619871,-1.196541 1.490274,-1.025332 2.711542,-2.717395 3.196582,-4.428839 0.247752,-0.8742 0.327822,-2.435277 0.180473,-3.518578 -0.24759,-1.820315 -0.758744,-2.912347 -1.890314,-4.038523 -0.858581,-0.854483 -1.623643,-1.313296 -2.844684,-1.705979 -0.396606,-0.127547 -0.741384,-0.264971 -0.766172,-0.30539 -0.02479,-0.04042 0.241967,-0.18516 0.592782,-0.321653 2.119824,-0.824767 3.442911,-2.20107 4.009399,-4.170678 0.241975,-0.841297 0.339649,-2.90807 0.180664,-3.822684 -0.2434,-1.400163 -0.885567,-2.56025 -2.06949,-3.738555 -0.777583,-0.773892 -0.970856,-0.91317 -1.902115,-1.370672 -1.820683,-0.894458 -0.882629,-0.822312 -11.109476,-0.85443 l -8.991241,-0.02823 v 14.877729 14.87773 l 9.03631,-0.02594 9.036308,-0.02594 z M 63.132213,31.73699 v -2.523856 h 2.977441 c 3.26706,0 3.292424,0.0035 3.916268,0.551312 0.53994,0.474073 0.673904,0.866189 0.673904,1.972544 0,0.727034 -0.0385,1.0312 -0.166054,1.31203 -0.201881,0.444465 -0.829279,1.000144 -1.266302,1.121546 -0.181432,0.0504 -1.587189,0.0895 -3.228314,0.08978 l -2.906943,5.03e-4 z m 0,-11.447494 V 17.76564 l 2.546391,0.0022 c 1.400516,0.0012 2.705651,0.03909 2.9003,0.08423 0.506262,0.117416 1.041213,0.525973 1.356576,1.036061 0.258571,0.418229 0.272499,0.489726 0.271607,1.394347 -0.001,1.061177 -0.102914,1.377717 -0.61167,1.900738 -0.590593,0.60715 -0.702746,0.626006 -3.736537,0.628209 l -2.726667,0.002 z"
+ id="path236" />
+ </g>
+</svg>
diff --git a/modern/public/logo.png b/modern/public/logo.png
new file mode 100644
index 0000000..39d237f
--- /dev/null
+++ b/modern/public/logo.png
Binary files differ
diff --git a/modern/public/logo.svg b/modern/public/logo.svg
index 8183831..81e2bcb 100644
--- a/modern/public/logo.svg
+++ b/modern/public/logo.svg
@@ -1,24 +1,31 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg id="svg2985" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="64" viewBox="0 0 240 64" width="240" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/">
- <g id="img">
- <rect id="rect3778" height="64" width="240" y="0" x="0" fill="none"/>
- <g id="g4194">
- <g id="g4145" fill="currentColor">
- <circle id="path2993" stroke-width="1.3262" transform="rotate(-30)" cy="43.713" cx="9.4364" r="2.2765"/>
- <path id="path3004" stroke-width="1.0095" d="m37.012 24.177-2.8428 3.6128c0.66345 0.52205 1.3255 1.1576 1.7734 1.9333 0.4479 0.77578 0.66726 1.6669 0.78764 2.5025l4.5502-0.65558c-0.193-1.42-0.633-2.804-1.394-4.123s-1.74-2.391-2.874-3.27z"/>
- <path id="path3014" stroke-width="1.0095" d="m42.504 16.9-2.8428 3.6128c1.607 1.2355 3.0914 2.7935 4.1679 4.6581s1.6835 3.9291 1.95 5.9386l4.5502-0.65558c-0.33967-2.5954-1.1669-5.1513-2.5573-7.5594-1.3903-2.4081-3.1901-4.4025-5.268-5.9944z"/>
- <path id="path3036" stroke-width="3.6204" d="m28.667 44.439a9.1058 9.1058 0 0 1 -9.1058 0.000023 9.1058 9.1058 0 0 1 -4.5529 -7.8859 9.1058 9.1058 0 0 1 4.5529 -7.8859l4.5529 7.8859z"/>
- <path id="path3038-8" stroke-width="1.0095" d="m17.502 6.8895c-13.868 8.0065-18.619 25.74-10.612 39.608 8.006 13.868 25.739 18.619 39.608 10.613 13.868-8.007 18.619-25.74 10.613-39.609-8.007-13.868-25.74-18.62-39.609-10.612zm1.706 2.9541c12.237-7.0648 27.884-2.8722 34.948 9.3644 7.065 12.237 2.873 27.884-9.364 34.948-12.237 7.065-27.884 2.873-34.948-9.364-7.0652-12.237-2.8726-27.884 9.364-34.948z"/>
- </g>
+<svg
+ id="img"
+ height="64"
+ viewBox="0 0 240 64"
+ width="240"
+ version="1.1"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:svg="http://www.w3.org/2000/svg">
+ <defs
+ id="defs22" />
+ <rect
+ style="fill:#ffffff;fill-rule:evenodd;stroke-width:38.4;stroke-linecap:round;stroke-linejoin:round"
+ id="rect846"
+ width="151.03503"
+ height="50.052311"
+ x="44.482483"
+ y="6.9738445" />
+ <g
+ transform="translate(46.156565,-0.2695845)"
+ id="g6">
+ <path
+ style="fill:#efdb1e;stroke-width:0.0901377"
+ d="m 3.3409719,63.234274 c -2.68310269,-0.418158 -5.1206207,-1.669477 -7.0943514,-3.641941 -1.9733059,-1.972037 -3.250335,-4.468735 -3.6532849,-7.142472 -0.1133311,-0.751998 -0.1281317,-3.649757 -0.1051998,-20.596476 0.025256,-18.66434 0.035423,-19.757497 0.1897066,-20.395665 0.6646054,-2.7490461 1.6937732,-4.6240656 3.5665418,-6.4978083 1.8319083,-1.8328616 3.70315231,-2.8812438 6.3152663,-3.538185 L 3.3258211,1.2290366 73.407916,1.2022102 c 61.608354,-0.023583 70.185634,-0.010656 70.938404,0.1069518 1.28953,0.2014615 2.36095,0.5406129 3.56045,1.1270302 3.71857,1.8179753 6.26588,5.1285559 7.09539,9.2214568 l 0.20575,1.015207 v 19.559892 c 0,18.372433 -0.01,19.611878 -0.16041,20.416201 -0.5188,2.769123 -1.6942,4.999941 -3.65765,6.941905 -0.57715,0.570834 -1.35481,1.246517 -1.72814,1.501517 -1.38677,0.947236 -2.98521,1.644017 -4.66096,2.031773 l -0.87978,0.203573 -69.991952,0.01531 C 15.096417,63.355939 4.0124095,63.338874 3.3409719,63.234263 Z M 143.85648,61.295646 c 2.84418,-0.395588 5.6604,-2.123389 7.3731,-4.523511 0.87958,-1.232612 1.59334,-2.941439 1.87281,-4.483737 0.1007,-0.556095 0.1225,-4.11424 0.1225,-20.05565 0,-18.254074 -0.01,-19.425553 -0.16107,-20.170564 -0.46293,-2.2733251 -1.41885,-4.0482244 -3.0755,-5.7104011 -1.43381,-1.4386066 -3.00707,-2.3538357 -4.98454,-2.8996987 l -0.88281,-0.243692 H 73.813536 3.5060967 L 2.6047197,3.4562747 C 1.4697865,3.7683862 -0.24145949,4.605543 -1.1843646,5.3099275 -3.3956931,6.9618738 -4.9484791,9.4948339 -5.415212,12.21144 c -0.1203571,0.700558 -0.1375342,3.206124 -0.1375342,20.066377 0,16.985777 0.016516,19.360558 0.1395288,20.065983 0.788328,4.520609 4.3531978,8.078665 8.9193141,8.902268 0.6239771,0.112545 10.0776683,0.131156 70.1882413,0.138154 48.988082,0.0057 69.672032,-0.02041 70.162142,-0.08857 z M 13.805948,54.025829 c 0.162008,-0.02007 0.405381,-0.01965 0.540827,9.19e-4 0.135444,0.02057 0.0029,0.03699 -0.294562,0.03647 -0.297455,-5.41e-4 -0.408275,-0.01733 -0.246265,-0.03739 z m 17.801829,6.31e-4 c 0.137015,-0.02072 0.339824,-0.02017 0.450689,0.0012 0.11086,0.0214 -0.0012,0.03834 -0.249118,0.03767 -0.247879,-7.22e-4 -0.338585,-0.01819 -0.201571,-0.0389 z m 6.39978,0 c 0.137015,-0.02072 0.339824,-0.02017 0.450688,0.0012 0.110861,0.0214 -0.0012,0.03834 -0.249118,0.03767 -0.247878,-7.22e-4 -0.338584,-0.01819 -0.20157,-0.0389 z M 3.6638378,53.93476 c 0.2354849,-0.01857 0.6208241,-0.01857 0.856309,0 0.2354849,0.01857 0.042808,0.03376 -0.4281551,0.03376 -0.4709698,0 -0.6636388,-0.01519 -0.4281539,-0.03376 z m 5.3181275,0 c 0.235485,-0.01857 0.620823,-0.01857 0.856308,0 0.2354837,0.01857 0.04282,0.03376 -0.428154,0.03376 -0.47097,0 -0.663639,-0.01519 -0.428154,-0.03376 z m 9.6474567,-9.1e-5 c 0.236982,-0.01863 0.60204,-0.01841 0.81124,5.41e-4 0.209202,0.01891 0.01531,0.03414 -0.430874,0.03387 -0.446181,-2.69e-4 -0.617346,-0.01575 -0.380366,-0.03437 z m 3.638953,-0.0012 c -0.02314,-0.03718 0.248257,-0.05651 0.603111,-0.04293 1.098222,0.04199 1.225166,0.08104 0.312493,0.09612 -0.480439,0.0079 -0.892459,-0.01599 -0.915604,-0.05318 z m 2.050704,-0.05813 c -0.02654,-0.06915 -0.03208,-0.282101 -0.01233,-0.473223 0.03429,-0.331681 0.03661,-0.328102 0.05107,0.07862 l 0.01515,0.426122 1.645014,0.02673 1.645014,0.02673 -1.647843,0.02037 c -1.340183,0.01656 -1.65685,-0.0031 -1.69609,-0.105356 z m 18.753578,0.01284 c -0.02383,-0.06209 -0.0322,-1.694708 -0.01862,-3.628044 l 0.02471,-3.515157 0.02145,3.581401 0.02145,3.581401 2.230909,0.02576 2.23091,0.02576 -2.233739,0.02089 c -1.721741,0.0161 -2.243668,-0.005 -2.277057,-0.092 z m 5.051622,0.05571 c 0.637248,-0.0667 1.46734,-0.07278 1.428562,-0.0105 -0.02313,0.03718 -0.414871,0.06112 -0.87052,0.05318 -0.455651,-0.0079 -0.706769,-0.02716 -0.558042,-0.04272 z m 5.475868,-0.0092 c 0.235485,-0.01857 0.620824,-0.01857 0.856309,0 0.235485,0.01857 0.04281,0.03376 -0.428155,0.03376 -0.47097,0 -0.663639,-0.01518 -0.428154,-0.03376 z M 15.030154,51.927848 c 0,-0.421394 0.01553,-0.593783 0.03451,-0.383086 0.01898,0.210697 0.01898,0.555474 0,0.766171 -0.01898,0.210697 -0.03451,0.0383 -0.03451,-0.383085 z m -8.8875289,0.293623 c 0.3594247,-0.01711 0.9475742,-0.01711 1.3069976,0 0.3594246,0.01711 0.065354,0.0311 -0.6534988,0.0311 -0.718848,0 -1.0129222,-0.014 -0.6534988,-0.0311 z M 50.719859,52.22129 c 0.386478,-0.01693 0.994908,-0.01683 1.352067,2.71e-4 0.357158,0.01707 0.04095,0.03092 -0.702688,0.0308 -0.743636,-9e-5 -1.035857,-0.01409 -0.649379,-0.03103 z M 10.609841,50.350436 c 5.41e-4,-0.297454 0.01733,-0.408273 0.03739,-0.246264 0.02005,0.16201 0.01965,0.405381 -9.19e-4,0.540827 -0.02057,0.135446 -0.03699,0.0029 -0.03647,-0.294563 z M 133.0791,50.542887 c -0.37181,-0.111935 -0.86269,-0.302428 -1.09082,-0.423325 -0.22813,-0.120894 -2.32179,-1.456954 -4.65259,-2.969015 l -4.2378,-2.749202 3.80482,-0.02349 3.80484,-0.02349 -5.14095,-14.689436 c -2.82753,-8.07919 -5.15225,-14.678128 -5.16608,-14.664305 -0.0138,0.01382 0.45238,3.114987 1.03599,6.891479 l 1.0611,6.86635 -2.20816,6.311639 -2.20817,6.311641 h -5.16545 c -2.84098,0 -5.1655,-0.03042 -5.1656,-0.0676 -1e-4,-0.03718 2.48125,-6.975065 5.51409,-15.417519 l 5.51426,-15.349915 4.37853,0.0265 4.37852,0.0265 0.51402,0.252418 c 0.60983,0.299468 1.26187,0.986621 1.45024,1.528325 0.0731,0.21041 2.73743,7.683721 5.92059,16.607358 3.18316,8.923638 5.86496,16.525359 5.95958,16.892713 0.50672,1.9677 -0.10376,3.60601 -1.63237,4.380609 -0.82913,0.420157 -1.38981,0.492576 -3.78418,0.488784 -2.02686,-0.0032 -2.26395,-0.02023 -2.88441,-0.207008 z M 30.069234,50.350436 c 0.0018,-0.148726 0.02203,-0.198657 0.0449,-0.110958 0.02285,0.0877 0.02135,0.209388 -0.0033,0.270415 -0.02469,0.06102 -0.0434,-0.01074 -0.04155,-0.159458 z m -6.850469,-1.442203 c 0.0018,-0.148727 0.02204,-0.198658 0.0449,-0.110958 0.02285,0.0877 0.02135,0.209387 -0.0033,0.270414 -0.02469,0.06102 -0.04339,-0.01074 -0.04155,-0.159458 z m -3.194928,-0.919922 c 0.111544,-0.02148 0.294076,-0.02148 0.405621,0 0.111544,0.02148 0.02028,0.03906 -0.20281,0.03906 -0.223091,0 -0.314356,-0.01758 -0.202811,-0.03906 z m -5.72203,-0.08899 c 0.0877,-0.02285 0.209387,-0.02135 0.270413,0.0033 0.06102,0.02469 -0.01074,0.04339 -0.159456,0.04155 -0.148728,-0.0018 -0.198659,-0.02203 -0.110958,-0.0449 z m 17.439937,0.0028 c 0.06197,-0.025 0.163375,-0.025 0.225345,0 0.06197,0.02501 0.01123,0.04547 -0.112679,0.04547 -0.123938,0 -0.174641,-0.02046 -0.112666,-0.04547 z m 6.264574,-0.0024 c 0.08675,-0.02267 0.228724,-0.02267 0.315482,0 0.08675,0.02267 0.01577,0.04122 -0.157741,0.04122 -0.173516,0 -0.244499,-0.01855 -0.157741,-0.04122 z M 24.308627,47.195616 c 7.2e-4,-0.24788 0.01819,-0.338586 0.0389,-0.20157 0.02071,0.137014 0.02017,0.339824 -0.0012,0.450688 -0.0214,0.110861 -0.03834,-0.0012 -0.03767,-0.249118 z m -3.467915,-0.467195 c 0.06507,-0.02604 0.142812,-0.02284 0.172763,0.0071 0.02996,0.02996 -0.02329,0.05126 -0.118306,0.04735 -0.105001,-0.0043 -0.126365,-0.02568 -0.05445,-0.05445 z m 72.421754,-5.138742 c 0.0877,-0.02285 0.209391,-0.02135 0.270414,0.0033 0.06103,0.02469 -0.01074,0.04339 -0.159453,0.04155 -0.148728,-0.0018 -0.198655,-0.02203 -0.110958,-0.0449 z m 2.343582,0 c 0.0877,-0.02285 0.20939,-0.02135 0.270413,0.0033 0.06103,0.02469 -0.01074,0.04339 -0.159453,0.04155 -0.148728,-0.0018 -0.198655,-0.02203 -0.110958,-0.0449 z M 44.066702,29.934236 c 0,-6.221758 0.01074,-8.767023 0.0239,-5.656143 0.01315,3.110878 0.01315,8.201408 0,11.312287 -0.01315,3.110879 -0.0239,0.565614 -0.0239,-5.656144 z m 10.636577,-3.60551 c 0,-8.204788 0.01062,-11.561294 0.02358,-7.458899 0.01298,4.102395 0.01298,10.815403 0,14.917798 -0.01298,4.102394 -0.02358,0.745889 -0.02358,-7.458899 z m 89.530371,14.452481 c 0.062,-0.02501 0.16338,-0.02501 0.22534,0 0.062,0.02501 0.011,0.04547 -0.11267,0.04547 -0.12393,0 -0.17464,-0.02046 -0.11267,-0.04547 z m -1.20232,-2.374023 c 0,-0.867575 0.0136,-1.222492 0.03,-0.788705 0.0165,0.433789 0.0165,1.143623 0,1.577411 -0.0165,0.433788 -0.03,0.07887 -0.03,-0.788706 z m -1.19129,-0.04507 c 0.001,-0.148728 0.022,-0.198659 0.0449,-0.110958 0.0228,0.0877 0.0214,0.209388 -0.004,0.270414 -0.0247,0.06102 -0.0435,-0.01074 -0.0415,-0.159456 z m 1.98922,-0.199888 c 0.13702,-0.02072 0.33983,-0.02017 0.45069,0.0012 0.11084,0.0214 -0.001,0.03835 -0.24911,0.03767 -0.24788,-7.21e-4 -0.33859,-0.01819 -0.20158,-0.0389 z M 98.293045,32.766064 c 0.0043,-0.105001 0.02569,-0.126364 0.05446,-0.05445 0.026,0.06507 0.0228,0.142812 -0.007,0.172763 -0.02995,0.02996 -0.05127,-0.02329 -0.04735,-0.118306 z M 70.73409,31.73699 c 0,-0.371817 0.0159,-0.523925 0.03536,-0.338015 0.01945,0.185909 0.01945,0.490123 0,0.676032 -0.01944,0.185909 -0.03536,0.0338 -0.03536,-0.338017 z m 36.94373,0.225345 c 0.001,-0.148727 0.0221,-0.198657 0.0449,-0.110958 0.0228,0.0877 0.0214,0.209388 -0.004,0.270413 -0.0247,0.06103 -0.0433,-0.01074 -0.0415,-0.159456 z m -0.004,-1.306997 c 0,-0.12394 0.0205,-0.174641 0.0455,-0.112667 0.025,0.06197 0.025,0.163374 0,0.225344 -0.025,0.06197 -0.0455,0.01123 -0.0455,-0.112667 z M 82.428803,21.588983 c 0.0043,-0.105001 0.02569,-0.126364 0.05447,-0.05445 0.02604,0.06506 0.02284,0.142813 -0.0071,0.172764 -0.02996,0.02996 -0.05127,-0.02329 -0.04735,-0.118306 z m 24.717637,-1.389624 c 0,-0.272667 0.0169,-0.384213 0.0376,-0.247879 0.0206,0.136334 0.0206,0.359424 0,0.495757 -0.0206,0.136333 -0.0376,0.02479 -0.0376,-0.247878 z M 27.478744,15.016438 c 2.4e-5,-1.983031 0.01196,-2.781428 0.02644,-1.774217 0.01451,1.00721 0.0145,2.62969 -4.4e-5,3.60551 -0.01454,0.975819 -0.02642,0.151738 -0.02639,-1.831293 z m 66.99887,2.599367 c 0.06197,-0.02501 0.163374,-0.02501 0.225344,0 0.06197,0.02501 0.01123,0.04547 -0.112667,0.04547 -0.12394,0 -0.174643,-0.02046 -0.112667,-0.04547 z m 1.177424,-0.0018 c 0.06507,-0.02604 0.142814,-0.02284 0.172767,0.0071 0.02996,0.02996 -0.02329,0.05126 -0.118307,0.04734 -0.105013,-0.0043 -0.126364,-0.02568 -0.05447,-0.05445 z m -2.253443,-6.580056 c 0.06507,-0.02604 0.142813,-0.02284 0.172766,0.0071 0.02996,0.02996 -0.02329,0.05126 -0.118307,0.04734 -0.105013,-0.0043 -0.126363,-0.02568 -0.05447,-0.05445 z m 3.15482,0 c 0.06507,-0.02604 0.142815,-0.02284 0.172768,0.0071 0.02996,0.02996 -0.02329,0.05126 -0.118307,0.04734 -0.105013,-0.0043 -0.126364,-0.02568 -0.05446,-0.05445 z"
+ id="path238" />
+ <path
+ style="fill:#337729;stroke-width:0.0901377"
+ d="M 3.5060967,61.246068 C 2.3978752,61.046175 1.6095179,60.788372 0.59465251,60.293988 -2.0485554,59.006371 -4.0837231,56.695729 -5.0101456,53.93054 -5.5834263,52.219415 -5.5527462,53.443674 -5.5527462,32.277817 c 0,-16.860253 0.017175,-19.365819 0.1375342,-20.066377 C -4.9484791,9.4948339 -3.3956931,6.9618738 -1.1843646,5.3099275 -0.24145949,4.605543 1.4697865,3.7683862 2.6047197,3.4562747 L 3.5060967,3.2083922 H 73.813536 144.12097 l 0.88281,0.243692 c 1.97747,0.545863 3.55073,1.4610921 4.98454,2.8996987 1.65665,1.6621767 2.61257,3.437076 3.0755,5.7104011 0.15171,0.745011 0.16107,1.91649 0.16107,20.170564 0,21.038041 0.0271,19.87475 -0.50264,21.542923 -1.24725,3.927328 -4.81932,6.957165 -8.86577,7.519975 -0.49011,0.06817 -21.17406,0.09428 -70.162142,0.08857 -60.110573,-0.007 -69.5642642,-0.02561 -70.1882413,-0.138154 z m 12.3696093,-7.408099 0.610226,-0.152435 0.02433,-1.915427 0.02433,-1.915428 h -1.443997 -1.443997 v 0.676033 0.676034 h 0.676034 0.676033 v 0.710589 c 0,0.813706 -0.005,0.818284 -0.895453,0.820522 -1.029416,0.0026 -1.600527,-0.542153 -1.818795,-1.73481 -0.206405,-1.127842 0.173247,-2.24784 0.932296,-2.750331 0.514456,-0.34057 1.591843,-0.396851 2.317406,-0.121053 0.269712,0.102523 0.498888,0.177223 0.509281,0.166005 0.11202,-0.120906 0.471277,-1.199502 0.417455,-1.253324 -0.03938,-0.03938 -0.390963,-0.153271 -0.781308,-0.253104 -2.085579,-0.533403 -3.983976,0.172237 -4.696311,1.745629 -0.292628,0.64635 -0.430496,1.513416 -0.358358,2.253733 0.226169,2.321037 1.472029,3.38352 3.808631,3.248043 0.457588,-0.02652 1.10658,-0.116829 1.442203,-0.200672 z m 17.353312,0.01376 0.518291,-0.144876 v -0.673798 c 0,-0.604777 -0.01616,-0.667573 -0.157741,-0.613017 -0.911991,0.351426 -1.987136,0.400488 -2.547389,0.116244 -0.598485,-0.303638 -0.840013,-0.836763 -0.884827,-1.953078 -0.05123,-1.276215 0.196133,-1.956433 0.878765,-2.416458 0.417198,-0.281149 1.162469,-0.277427 1.925067,0.0096 l 0.570056,0.214567 0.19457,-0.507515 c 0.107016,-0.279134 0.218599,-0.57273 0.247965,-0.652435 0.09182,-0.249215 -1.086601,-0.576284 -2.074289,-0.575719 -1.146933,6.31e-4 -1.650618,0.19192 -2.351469,0.892915 -0.718781,0.718925 -0.945375,1.289296 -1.006243,2.53287 -0.109884,2.244799 0.75526,3.608249 2.489742,3.923814 0.543828,0.09894 1.545397,0.02915 2.197502,-0.15313 z m 6.251628,0.01627 c 0.866006,-0.257176 1.516066,-0.908324 1.891915,-1.895078 0.138394,-0.363346 0.171397,-0.686513 0.17029,-1.667548 -0.0017,-1.548417 -0.167645,-2.043343 -0.93994,-2.804131 -0.687797,-0.67755 -1.174441,-0.846449 -2.438852,-0.846449 -1.270037,0 -1.763437,0.171604 -2.440705,0.848873 -0.671075,0.671075 -0.902461,1.269273 -0.962076,2.487238 -0.111568,2.279422 0.799498,3.685987 2.592618,4.002644 0.611054,0.107906 1.521621,0.05416 2.12675,-0.125549 z M 37.38897,52.573063 c -0.473344,-0.222298 -0.719555,-0.573813 -0.903088,-1.289337 -0.328114,-1.279176 0.02881,-2.710438 0.78141,-3.133421 0.497346,-0.279523 1.513842,-0.248909 1.945699,0.0586 0.419146,0.298458 0.677974,0.928907 0.731174,1.780986 0.07545,1.208364 -0.195106,2.054384 -0.800291,2.502545 -0.354337,0.262396 -1.277538,0.304812 -1.754904,0.08062 z m -32.1883064,0.546746 0.2575068,-0.836145 1.3179847,0.0249 1.3179859,0.0249 0.2557903,0.833774 0.255791,0.833775 h 0.807817 c 0.5866187,0 0.8075857,-0.03086 0.8069657,-0.112667 -4.5e-4,-0.06197 -0.5601887,-1.69459 -1.2438227,-3.628045 L 7.7337106,46.74493 6.7799318,46.719455 c -0.8451704,-0.02257 -0.9610209,-0.0072 -1.0173726,0.135206 -0.149808,0.378513 -2.4818073,7.048125 -2.4818073,7.09807 0,0.03028 0.374042,0.04339 0.8312024,0.02914 l 0.8312025,-0.02591 z m 0.6979235,-2.251076 c 0.0061,-0.106502 0.8894048,-2.959689 0.8936966,-2.886591 0.0033,0.05551 0.7463886,2.508498 0.8608389,2.841522 0.029271,0.08519 -0.1804295,0.112679 -0.859827,0.112679 -0.4942013,0 -0.8968202,-0.03042 -0.8947085,-0.0676 z M 19.775959,52.598945 V 51.19687 l 0.422611,0.02748 0.422611,0.02748 0.849814,1.374601 0.849814,1.374601 h 0.845812 c 0.465196,0 0.845811,-0.02347 0.845811,-0.05217 0,-0.0287 -0.468371,-0.745094 -1.040826,-1.592003 -0.756336,-1.118949 -1.008871,-1.558414 -0.923912,-1.607804 1.089651,-0.633462 1.42865,-1.517464 1.054073,-2.748684 -0.09502,-0.312312 -0.531523,-0.761628 -0.938975,-0.966528 -0.45703,-0.229831 -1.276734,-0.333972 -2.628732,-0.333972 h -1.290442 v 3.650579 3.650579 h 0.76617 0.766171 z m 0.0676,-2.70473 c -0.03718,-0.03827 -0.0676,-0.468438 -0.0676,-0.955933 v -0.886355 l 0.60843,3.6e-4 c 1.001421,5.41e-4 1.420633,0.394923 1.229735,1.156857 -0.054,0.215562 -0.172092,0.374516 -0.359006,0.483264 -0.298676,0.173769 -1.299746,0.316906 -1.411555,0.20183 z m 7.77438,3.622145 v -0.484657 l -0.450688,-0.193881 -0.45069,-0.193881 v -2.294488 -2.29449 l 0.45069,-0.228381 c 0.450386,-0.228229 0.450688,-0.228683 0.450688,-0.679584 v -0.451205 l -1.645014,0.02457 -1.645014,0.02457 -0.0277,0.433725 -0.0277,0.433727 0.455855,0.192593 0.455855,0.192594 v 2.324173 2.324173 L 24.733533,52.8743 c -0.435947,0.22091 -0.450689,0.241109 -0.450689,0.61746 0,0.213993 0.02704,0.416119 0.06009,0.44917 0.03306,0.03306 0.783447,0.06009 1.667549,0.06009 h 1.607456 z M 47.53838,53.324985 v -0.676033 h -1.442204 -1.442204 v -2.978055 -2.978055 l -0.788705,0.02605 -0.788705,0.02605 -0.02362,3.515156 c -0.01299,1.933337 -0.0041,3.565957 0.0197,3.628046 0.03307,0.08618 0.566458,0.112886 2.254524,0.112886 h 2.211203 z m 2.253551,-0.180275 0.247646,-0.81124 1.314173,-0.02491 1.314174,-0.02493 0.256417,0.836161 0.256414,0.83616 0.829391,0.02591 c 0.456166,0.01426 0.829391,-0.0096 0.829391,-0.05299 0,-0.04339 -0.563996,-1.677537 -1.253325,-3.631426 l -1.25332,-3.552523 h -0.970239 -0.97024 l -1.242294,3.515372 c -0.683262,1.933455 -1.244294,3.567597 -1.246739,3.631428 -0.0034,0.0883 0.192241,0.109859 0.818234,0.09013 l 0.822678,-0.02591 z m 0.720741,-2.275979 c -5.41e-4,-0.143975 0.850501,-2.924617 0.872385,-2.850379 0.01276,0.04326 0.221823,0.717495 0.464605,1.498314 l 0.441422,1.419669 h -0.88908 c -0.488993,0 -0.889192,-0.03042 -0.889332,-0.0676 z m 88.224298,-0.248566 c 0.6782,-0.159901 1.34025,-0.482922 1.77861,-0.867815 0.92707,-0.813972 1.26368,-2.321639 0.86448,-3.871845 -0.0946,-0.367355 -2.77642,-7.969076 -5.95958,-16.892714 -3.18316,-8.923636 -5.84742,-16.396948 -5.92059,-16.607358 -0.18837,-0.541703 -0.84041,-1.228857 -1.45024,-1.528325 l -0.51402,-0.252418 -4.37852,-0.0265 -4.37853,-0.0265 -5.51426,15.349916 c -3.03284,8.442453 -5.51419,15.380337 -5.51409,15.417518 0,0.03718 2.32462,0.0676 5.1656,0.0676 h 5.16545 l 2.20817,-6.31164 2.20816,-6.311639 -1.0611,-6.86635 c -0.58361,-3.776492 -1.04981,-6.877658 -1.03599,-6.891479 0.0138,-0.01382 2.33855,6.585115 5.16608,14.664305 l 5.14095,14.689436 -3.80484,0.02349 -3.80482,0.02349 4.2378,2.749201 c 2.3308,1.512061 4.42446,2.848118 4.65259,2.969016 0.22813,0.120894 0.71901,0.311393 1.09082,0.423325 0.62046,0.186781 0.85755,0.203797 2.88441,0.207008 1.6438,0.0026 2.35283,-0.03057 2.77346,-0.129733 z M 27.009513,45.43174 c 0.483364,-0.398258 0.878843,-0.762598 0.878843,-0.809646 0,-0.04784 -0.369838,-0.08554 -0.839072,-0.08554 h -0.839072 l -0.595995,0.758287 c -0.327797,0.417057 -0.572165,0.782113 -0.54304,0.811239 0.02913,0.02913 0.279426,0.05223 0.556224,0.05137 0.495428,-0.0016 0.516961,-0.01288 1.382112,-0.725699 z m 70.555318,-3.959103 c 4.503659,-0.58465 7.620059,-2.352497 9.049319,-5.133406 0.78602,-1.529381 1.08256,-2.901661 1.08212,-5.00786 0,-1.096129 -0.0383,-1.504938 -0.20122,-2.15966 -0.68166,-2.739729 -2.59291,-4.594668 -5.9315,-5.756753 -0.49421,-0.172026 -2.275511,-0.625409 -3.958454,-1.00752 -4.116798,-0.934722 -5.214658,-1.347056 -5.7068,-2.143372 -0.647848,-1.048239 -0.01821,-2.068461 1.520199,-2.463258 0.887939,-0.227867 2.659379,-0.204669 3.439052,0.04504 1.084601,0.347361 1.777742,1.185772 1.930152,2.334658 l 0.0623,0.469546 h 4.179781 4.17979 l -6e-5,-0.247879 c 0,-1.352799 -0.3929,-3.250156 -0.86812,-4.196586 -1.39409,-2.776479 -4.68096,-4.62728 -9.065948,-5.104931 -1.10344,-0.120199 -3.381193,-0.121846 -4.442836,-0.0032 -4.620108,0.516258 -8.03522,2.472886 -9.514823,5.451344 -0.589293,1.186254 -0.807084,2.059596 -0.87082,3.491983 -0.122579,2.75476 0.491188,4.599984 2.084399,6.266512 1.75463,1.835377 3.588555,2.63948 8.571657,3.758325 4.116122,0.924186 5.182245,1.481286 5.182245,2.707976 0,0.817327 -0.520032,1.342249 -1.621804,1.637057 -0.446704,0.119527 -0.960634,0.15783 -2.163305,0.161234 -1.435218,0.004 -1.638353,-0.01539 -2.253444,-0.215749 -0.562901,-0.183359 -0.760358,-0.304184 -1.179894,-0.721992 -0.590546,-0.588113 -0.823048,-1.15998 -0.831368,-2.044914 l -0.0054,-0.573323 h -4.231543 -4.231544 l 0.04689,1.41967 c 0.03893,1.178551 0.08697,1.554211 0.282906,2.211829 0.541494,1.817413 1.595484,3.264433 3.282186,4.506113 1.617712,1.190895 4.294694,2.104016 7.048051,2.404096 0.940732,0.102523 4.095454,0.05036 5.137851,-0.08496 z M 145.544,40.99649 c 1.02011,-0.467029 1.60674,-1.346432 1.6671,-2.499167 0.0485,-0.924343 -0.19823,-1.581686 -0.83081,-2.214255 -1.42792,-1.427932 -3.87452,-0.996081 -4.71124,0.831591 -0.62354,1.36196 -0.13386,2.952151 1.15425,3.748316 0.76104,0.470392 1.86637,0.524636 2.7207,0.133515 z m -2.35585,-0.52356 c -0.85931,-0.429403 -1.27733,-1.148823 -1.27357,-2.191868 0.004,-0.923636 0.46413,-1.673597 1.29423,-2.10636 0.90043,-0.469439 2.1252,-0.28134 2.8432,0.436661 0.71799,0.718002 0.9061,1.942754 0.43666,2.843199 -0.63469,1.21741 -2.03659,1.649963 -3.30052,1.018368 z m 0.34693,-1.167197 c 0,-0.70026 0.0752,-0.795842 0.51532,-0.655006 0.16671,0.05335 0.38397,0.282937 0.64775,0.684536 0.35924,0.5469 0.42566,0.604264 0.69971,0.604264 h 0.3028 l -0.2395,-0.383086 c -0.13171,-0.210697 -0.35871,-0.535192 -0.50445,-0.721101 -0.19422,-0.24774 -0.2282,-0.338017 -0.12723,-0.338017 0.24936,0 0.60267,-0.393602 0.65639,-0.731262 0.0437,-0.274878 0.01,-0.373239 -0.22094,-0.630966 l -0.27276,-0.305321 h -0.97643 -0.97642 l -0.0247,1.554876 -0.0247,1.554877 h 0.27255 0.27253 z m 0,-1.61965 v -0.45069 h 0.52077 c 0.57105,0 0.92143,0.170873 0.92143,0.449363 0,0.322512 -0.24717,0.452016 -0.86274,0.452016 h -0.57946 z M 25.634912,37.64159 v -3.559864 l -6.692727,-0.02311 -6.692728,-0.02311 -0.02403,-2.366116 -0.02403,-2.366115 h 6.040726 6.040725 v -3.334452 -3.334458 l -6.016695,-0.02318 -6.016694,-0.02317 -0.02417,-2.140771 -0.02417,-2.140771 h 6.716894 6.716893 V 14.881232 11.455997 H 14.457832 3.2807519 V 26.328726 41.201455 H 14.457832 25.634912 Z M 44.113149,29.889167 V 18.576879 h 3.740717 3.740717 V 15.016438 11.455997 H 39.516124 27.437667 v 3.560441 3.560441 h 3.785785 3.785786 v 11.312288 11.312288 h 4.551956 4.551955 z m 29.339837,11.062579 c 0.811067,-0.228112 2.0046,-0.773221 2.619871,-1.196541 1.490274,-1.025332 2.711542,-2.717395 3.196582,-4.428839 0.247752,-0.8742 0.327822,-2.435277 0.180473,-3.518578 -0.24759,-1.820315 -0.758744,-2.912347 -1.890314,-4.038523 -0.858581,-0.854483 -1.623643,-1.313296 -2.844684,-1.705979 -0.396606,-0.127547 -0.741384,-0.264971 -0.766172,-0.30539 -0.02479,-0.04042 0.241967,-0.18516 0.592782,-0.321653 2.119824,-0.824767 3.442911,-2.20107 4.009399,-4.170678 0.241975,-0.841297 0.339649,-2.90807 0.180664,-3.822684 -0.2434,-1.400163 -0.885567,-2.56025 -2.06949,-3.738555 -0.777583,-0.773892 -0.970856,-0.91317 -1.902115,-1.370672 -1.820683,-0.894458 -0.882629,-0.822312 -11.109476,-0.85443 l -8.991241,-0.02823 v 14.877729 14.87773 l 9.03631,-0.02594 9.036308,-0.02594 z M 63.132213,31.73699 v -2.523856 h 2.977441 c 3.26706,0 3.292424,0.0035 3.916268,0.551312 0.53994,0.474073 0.673904,0.866189 0.673904,1.972544 0,0.727034 -0.0385,1.0312 -0.166054,1.31203 -0.201881,0.444465 -0.829279,1.000144 -1.266302,1.121546 -0.181432,0.0504 -1.587189,0.0895 -3.228314,0.08978 l -2.906943,5.03e-4 z m 0,-11.447494 V 17.76564 l 2.546391,0.0022 c 1.400516,0.0012 2.705651,0.03909 2.9003,0.08423 0.506262,0.117416 1.041213,0.525973 1.356576,1.036061 0.258571,0.418229 0.272499,0.489726 0.271607,1.394347 -0.001,1.061177 -0.102914,1.377717 -0.61167,1.900738 -0.590593,0.60715 -0.702746,0.626006 -3.736537,0.628209 l -2.726667,0.002 z"
+ id="path236" />
</g>
- <g id="logotext" aria-label="Traccar" fill="currentColor">
- <path id="path4172" d="m89.719 48.671h-3.915v-30.192h-10.663v-3.4775h25.241v3.4775h-10.663v30.192z"/>
- <path id="path4174" d="m116.36 22.969q1.6812 0 3.0169 0.27636l-0.52968 3.5466q-1.566-0.34544-2.7636-0.34544-3.063 0-5.2508 2.4872-2.1648 2.4872-2.1648 6.195v13.541h-3.8229v-25.241h3.1551l0.43756 4.675h0.18424q1.4048-2.4642 3.3854-3.7999t4.3526-1.3357z"/>
- <path id="path4176" d="m139.62 48.671-0.75998-3.5926h-0.18424q-1.8884 2.3721-3.7769 3.2242-1.8654 0.82907-4.675 0.82907-3.7538 0-5.8956-1.9345-2.1187-1.9345-2.1187-5.5041 0-7.6459 12.229-8.0143l4.2835-0.13818v-1.566q0-2.9708-1.2897-4.3756-1.2666-1.4278-4.0763-1.4278-3.1551 0-7.1392 1.9345l-1.1745-2.9248q1.8654-1.0133 4.0762-1.589 2.2339-0.57574 4.4678-0.57574 4.5138 0 6.6786 2.0036 2.1878 2.0036 2.1878 6.4253v17.226h-2.8326zm-8.6361-2.6945q3.5696 0 5.5962-1.9575 2.0496-1.9575 2.0496-5.4811v-2.2799l-3.8229 0.16121q-4.5599 0.16121-6.5865 1.4278-2.0036 1.2436-2.0036 3.892 0 2.0727 1.2436 3.1551 1.2666 1.0824 3.5236 1.0824z"/>
- <path id="path4178" d="m160.44 49.131q-5.4811 0-8.498-3.3623-2.9939-3.3854-2.9939-9.5573 0-6.3332 3.0399-9.7876 3.063-3.4545 8.7052-3.4545 1.8194 0 3.6387 0.3915t2.8557 0.92119l-1.1745 3.2472q-1.2666-0.50665-2.7636-0.82907-1.4969-0.34544-2.6484-0.34544-7.6919 0-7.6919 9.8106 0 4.652 1.8654 7.1392 1.8884 2.4872 5.5732 2.4872 3.1551 0 6.4713-1.3588v3.3854q-2.5333 1.3127-6.3792 1.3127z"/>
- <path id="path4180" d="m182.92 49.131q-5.4811 0-8.498-3.3623-2.9939-3.3854-2.9939-9.5573 0-6.3332 3.0399-9.7876 3.063-3.4545 8.7052-3.4545 1.8193 0 3.6387 0.3915t2.8557 0.92119l-1.1745 3.2472q-1.2666-0.50665-2.7636-0.82907-1.4969-0.34544-2.6484-0.34544-7.6919 0-7.6919 9.8106 0 4.652 1.8654 7.1392 1.8884 2.4872 5.5732 2.4872 3.1551 0 6.4714-1.3588v3.3854q-2.5333 1.3127-6.3792 1.3127z"/>
- <path id="path4182" d="m210.83 48.671-0.75998-3.5926h-0.18424q-1.8884 2.3721-3.7769 3.2242-1.8654 0.82907-4.675 0.82907-3.7538 0-5.8956-1.9345-2.1187-1.9345-2.1187-5.5041 0-7.6459 12.229-8.0143l4.2835-0.13818v-1.566q0-2.9708-1.2897-4.3756-1.2666-1.4278-4.0762-1.4278-3.1551 0-7.1392 1.9345l-1.1745-2.9248q1.8654-1.0133 4.0762-1.589 2.2339-0.57574 4.4678-0.57574 4.5138 0 6.6786 2.0036 2.1878 2.0036 2.1878 6.4253v17.226h-2.8326zm-8.6361-2.6945q3.5696 0 5.5962-1.9575 2.0496-1.9575 2.0496-5.4811v-2.2799l-3.8229 0.16121q-4.5599 0.16121-6.5865 1.4278-2.0036 1.2436-2.0036 3.892 0 2.0727 1.2436 3.1551 1.2666 1.0824 3.5235 1.0824z"/>
- <path id="path4184" d="m233.08 22.969q1.6812 0 3.0169 0.27636l-0.52968 3.5466q-1.566-0.34544-2.7636-0.34544-3.0629 0-5.2508 2.4872-2.1648 2.4872-2.1648 6.195v13.541h-3.8229v-25.241h3.1551l0.43757 4.675h0.18423q1.4048-2.4642 3.3854-3.7999t4.3526-1.3357z"/>
- </g>
- </g>
</svg>
diff --git a/modern/public/manifest.json b/modern/public/manifest.json
index 350ef8a..163d908 100644
--- a/modern/public/manifest.json
+++ b/modern/public/manifest.json
@@ -1,6 +1,6 @@
{
- "short_name": "Traccar",
- "name": "Traccar GPS Tracking System",
+ "short_name": "ETBSA",
+ "name": "AplicaciĆ³n de rastreo GPS para ETBSA",
"icons": [
{
"src": "favicon.ico",
diff --git a/modern/src/App.js b/modern/src/App.js
index a53ffc6..95ed1c2 100644
--- a/modern/src/App.js
+++ b/modern/src/App.js
@@ -26,6 +26,7 @@ import DriversPage from './settings/DriversPage';
import DriverPage from './settings/DriverPage';
import CalendarsPage from './settings/CalendarsPage';
import CalendarPage from './settings/CalendarPage';
+import CommandsPage from './CommandsPage';
import ComputedAttributesPage from './settings/ComputedAttributesPage';
import ComputedAttributePage from './settings/ComputedAttributePage';
import MaintenancesPage from './settings/MaintenancesPage';
@@ -59,10 +60,11 @@ const App = () => {
{!initialized ? (<LinearProgress />) : (
<Switch>
<Route exact path="/" component={MainPage} />
- <Route exact path="/replay" component={ReplayPage} />
+ <Route exact path="/replay/:id?" component={ReplayPage} />
<Route exact path="/position/:id?" component={PositionPage} />
<Route exact path="/user/:id?" component={UserPage} />
<Route exact path="/device/:id?" component={DevicePage} />
+ <Route exact path="/device/:id?/commands" component={CommandsPage} />
<Route exact path="/geofence/:id?" component={GeofencePage} />
<Route exact path="/geofences" component={GeofencesPage} />
<Route exact path="/settings/notifications" component={NotificationsPage} />
diff --git a/modern/src/CommandsPage.js b/modern/src/CommandsPage.js
new file mode 100644
index 0000000..1458b43
--- /dev/null
+++ b/modern/src/CommandsPage.js
@@ -0,0 +1,121 @@
+import React, { useState } from 'react';
+import { useHistory, useParams } from 'react-router-dom';
+import {
+ makeStyles, Typography, Container, Card, CardContent, RadioGroup, Radio, FormControl, FormControlLabel, Button
+} from '@material-ui/core';
+
+import MainToolbar from './MainToolbar';
+import { useEffectAsync } from './reactHelper';
+import { useTranslation } from './LocalizationProvider';
+
+const useStyles = makeStyles((theme) => ({
+ root: {
+ marginTop: theme.spacing(2),
+ marginBottom: theme.spacing(2),
+ },
+ buttons: {
+ display: 'flex',
+ justifyContent: 'space-evenly',
+ '& > *': {
+ flexBasis: '33%',
+ },
+ },
+}));
+
+const CommandsPage = () => {
+ const classes = useStyles();
+ const { id } = useParams();
+ const t = useTranslation();
+ const history = useHistory();
+
+ const [device, setDevice] = useState();
+ const [commands, setCommands] = useState([]);
+ const [selectedCommand, setSelectedCommand] = useState();
+
+ useEffectAsync(async () => {
+ if (id) {
+ let device = undefined;
+
+ const response = await fetch(`/api/devices?id=${id}`, {
+ headers: {
+ Accept: 'application/json'
+ },
+ });
+ if (response.ok) {
+ const items = await response.json();
+ device = items[0];
+ setDevice(items[0]);
+ } else {
+ setDevice({});
+ }
+
+ if (device) {
+ const response = await fetch(`/api/commands/send?deviceId=${device.id}`, {
+ headers: {
+ Accept: 'application/json'
+ },
+ });
+ if (response.ok) {
+ const items = await response.json();
+ setCommands(items);
+ } else {
+ setCommands([]);
+ }
+ }
+ }
+ }, [id]);
+
+ const handleSend = async () => {
+ const response = await fetch(`/api/commands/send`, {
+ method: 'POST',
+ headers: { 'Content-Type': 'application/json' },
+ body: JSON.stringify({
+ 'id': selectedCommand,
+ 'deviceId': device.id,
+ }),
+ });
+
+ if (response.ok) {
+ history.goBack();
+ } else {
+ console.log ('response!', response);
+ }
+ };
+
+ return (
+ <>
+ <MainToolbar />
+ <Container maxWidth="sm" className={classes.root}>
+ <Card>
+ {device && (
+ <>
+ <CardContent>
+ <Typography gutterBottom variant="h5">{t('commandSend')}</Typography>
+ <Typography variant="body2" color="text.secondary">{device.name}</Typography>
+ {commands && (
+ <FormControl fullWidth aria-label="command">
+ <RadioGroup onChange={(event) => setSelectedCommand(event.target.value) }>
+ {commands.map (command => (
+ <FormControlLabel value={command.id.toString()} control={<Radio />} label={command.description} />
+ ))}
+ </RadioGroup>
+ <div className={classes.buttons}>
+ <Button type="button" color="primary" variant="outlined" onClick={() => history.goBack()}>
+ {t('sharedCancel')}
+ </Button>
+ <Button type="button" color="primary" variant="contained" onClick={handleSend}>
+ {t('commandSend')}
+ </Button>
+ </div>
+ </FormControl>
+ )}
+ </CardContent>
+ </>
+ )}
+ </Card>
+ </Container>
+ </>
+ );
+}
+
+export default CommandsPage;
diff --git a/modern/src/DevicesList.js b/modern/src/DevicesList.js
index e06fd58..b98956c 100644
--- a/modern/src/DevicesList.js
+++ b/modern/src/DevicesList.js
@@ -1,7 +1,6 @@
import React, { useRef } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import { makeStyles } from '@material-ui/core/styles';
-import Avatar from '@material-ui/core/Avatar';
import List from '@material-ui/core/List';
import ListItem from '@material-ui/core/ListItem';
import ListItemAvatar from '@material-ui/core/ListItemAvatar';
@@ -14,11 +13,19 @@ import AutoSizer from 'react-virtualized-auto-sizer';
import BatteryFullIcon from '@material-ui/icons/BatteryFull';
import { ReactComponent as IgnitionIcon } from '../public/images/ignition.svg';
-import { devicesActions } from './store';
+import FiberManualRecordIcon from '@material-ui/icons/FiberManualRecord';
+import PersonIcon from '@material-ui/icons/Person';
+import SpeedIcon from '@material-ui/icons/Speed';
+import CalendarTodayIcon from '@material-ui/icons/CalendarToday';
+import LockIcon from '@material-ui/icons/Lock';
+import LockOpenIcon from '@material-ui/icons/LockOpen';
+
+import { devicesActions, uiActions } from './store';
import EditCollectionView from './EditCollectionView';
import { useEffectAsync } from './reactHelper';
-import { formatPosition } from './common/formatter';
-import { getDevices, getPosition } from './common/selectors';
+import { formatPosition, formatSpeed, formatHours } from './common/formatter';
+import { useAttributePreference } from './common/preferences';
+import { getDevices, getFilteredDevices, getFilterTerm, getPosition } from './common/selectors';
import { useTranslation } from './LocalizationProvider';
const useStyles = makeStyles((theme) => ({
@@ -30,15 +37,21 @@ const useStyles = makeStyles((theme) => ({
margin: theme.spacing(1.5, 0),
},
icon: {
- width: '25px',
- height: '25px',
- filter: 'brightness(0) invert(1)',
+ width: '40px',
+ height: '40px',
+ },
+ statusIcon: {
+ paddingRight: '5px',
},
listItem: {
backgroundColor: 'white',
'&:hover': {
backgroundColor: 'white',
},
+ height: '150px',
+ },
+ listItemSecondary: {
+ fontSize: '0.92rem',
},
batteryText: {
fontSize: '0.75rem',
@@ -59,18 +72,6 @@ const useStyles = makeStyles((theme) => ({
},
}));
-const getStatusColor = (status) => {
- switch (status) {
- case 'online':
- return 'green';
- case 'offline':
- return 'red';
- case 'unknown':
- default:
- return 'gray';
- }
-};
-
const getBatteryStatus = (batteryLevel) => {
if (batteryLevel >= 70) {
return 'green';
@@ -86,39 +87,91 @@ const DeviceRow = ({ data, index, style }) => {
const dispatch = useDispatch();
const t = useTranslation();
+ const speedUnit = useAttributePreference('speedUnit');
+
const { items } = data;
const item = items[index];
const position = useSelector(getPosition(item.id));
const showIgnition = position?.attributes.hasOwnProperty('ignition') && position.attributes.ignition;
+ const statusColor = () => {
+ if (position && position.speed >= 2) {
+ return 'primary';
+ } else {
+ return 'error';
+ }
+ };
+
return (
<div style={style}>
- <ListItem button key={item.id} className={classes.listItem} onClick={() => dispatch(devicesActions.select(item))}>
+ <ListItem button key={item.id} className={classes.listItem} onClick={() => {
+ dispatch(devicesActions.select(item));
+ dispatch(uiActions.setCollapsed(true));
+ setTimeout(() => {
+ dispatch(devicesActions.unselect());
+ }, 1000);
+ }}>
+ {/* Avatar */}
<ListItemAvatar>
- <Avatar>
- <img className={classes.icon} src={`images/icon/${item.category || 'default'}.svg`} alt="" />
- </Avatar>
+ <img className={classes.icon} src={`images/icon/${(item.category || 'default').toLowerCase()}.png`} alt="" />
</ListItemAvatar>
- <ListItemText primary={item.name} secondary={item.status} classes={{ secondary: classes[getStatusColor(item.status)] }} />
+
+ {/* Status icon */}
+ <ListItemText primary={
+ <>
+ <FiberManualRecordIcon fontSize="inherit" color={statusColor()} classes={{ colorPrimary: classes.green }} />
+ {position && position.attributes.out1 == false && (
+ <LockOpenIcon fontSize="inherit" color="primary" classes={{ colorPrimary: classes.green }} />
+ )}
+ {position && position.attributes.out1 == true && (
+ <LockIcon fontSize="inherit" color="error" />
+ )}
+ {` ${item.name}`}
+ </>} secondary={(
+ <>
+ {/* Contact */}
+ {item.contact && (
+ <>
+ <PersonIcon fontSize="inherit" /> {item.contact}<br />
+ </>
+ )}
+ {position && (
+ <>
+ {/* Speed */}
+ <SpeedIcon fontSize="inherit" /> {formatSpeed(position.speed, speedUnit, t)}<br />
+ {/* Datetime */}
+ <CalendarTodayIcon fontSize="inherit" /> {formatPosition(position, 'fixTime', t)}
+ {/* Hours */}
+ {item.category
+ && (item.category.toLowerCase() === 'backhoe' || item.category.toLowerCase() === 'tractor' )
+ && position.attributes.hours
+ && position.attributes.hours > 1
+ && ` (${formatHours(position.attributes.hours, t)})`}
+ </>
+ )}
+ </>
+ )} classes={{ secondary: classes.listItemSecondary }} />
<ListItemSecondaryAction className={classes.indicators}>
{position && (
- <Grid container direction="row" alignItems="center" alignContent="center" spacing={2}>
- {showIgnition && (
- <Grid item>
- <SvgIcon component={IgnitionIcon} />
+ <Grid container direction="row" alignItems="center" alignContent="center" spacing={2}>
+ {/* Ignition */}
+ {showIgnition && (
+ <Grid item>
+ <SvgIcon component={IgnitionIcon} />
+ </Grid>
+ )}
+ {/* Battery level */}
+ {position.attributes.hasOwnProperty('batteryLevel') && (
+ <Grid item container xs alignItems="center" alignContent="center">
+ <Grid item>
+ <span className={classes.batteryText}>{formatPosition(position.attributes.batteryLevel, 'batteryLevel', t)}</span>
+ </Grid>
+ <Grid item>
+ <BatteryFullIcon className={classes[getBatteryStatus(position.attributes.batteryLevel)]} />
+ </Grid>
+ </Grid>
+ )}
</Grid>
- )}
- {position.attributes.hasOwnProperty('batteryLevel') && (
- <Grid item container xs alignItems="center" alignContent="center">
- <Grid item>
- <span className={classes.batteryText}>{formatPosition(position.attributes.batteryLevel, 'batteryLevel', t)}</span>
- </Grid>
- <Grid item>
- <BatteryFullIcon className={classes[getBatteryStatus(position.attributes.batteryLevel)]} />
- </Grid>
- </Grid>
- )}
- </Grid>
)}
</ListItemSecondaryAction>
</ListItem>
@@ -131,7 +184,11 @@ const DeviceView = ({ updateTimestamp, onMenuClick }) => {
const dispatch = useDispatch();
const listInnerEl = useRef(null);
- const items = useSelector(getDevices);
+ const filterTerm = useSelector(getFilterTerm);
+ const filteredItems = useSelector(getFilteredDevices);
+ const unfilteredItems = useSelector(getDevices);
+
+ const items = (filterTerm.length > 0 ? filteredItems : unfilteredItems).sort((a, b) => a.name.localeCompare(b.name));
if (listInnerEl.current) {
listInnerEl.current.className = classes.listInner;
@@ -153,7 +210,7 @@ const DeviceView = ({ updateTimestamp, onMenuClick }) => {
height={height}
itemCount={items.length}
itemData={{ items, onMenuClick }}
- itemSize={72}
+ itemSize={150}
overscanCount={10}
innerRef={listInnerEl}
>
diff --git a/modern/src/LocalizationProvider.js b/modern/src/LocalizationProvider.js
index cc23d72..6d8605b 100644
--- a/modern/src/LocalizationProvider.js
+++ b/modern/src/LocalizationProvider.js
@@ -1,116 +1,12 @@
import React, { createContext, useContext } from 'react';
import usePersistedState from './common/usePersistedState';
-import af from '../../web/l10n/af.json';
-import ar from '../../web/l10n/ar.json';
-import az from '../../web/l10n/az.json';
-import bg from '../../web/l10n/bg.json';
-import bn from '../../web/l10n/bn.json';
-import cs from '../../web/l10n/cs.json';
-import da from '../../web/l10n/da.json';
-import de from '../../web/l10n/de.json';
-import el from '../../web/l10n/el.json';
import en from '../../web/l10n/en.json';
import es from '../../web/l10n/es.json';
-import fa from '../../web/l10n/fa.json';
-import fi from '../../web/l10n/fi.json';
-import fr from '../../web/l10n/fr.json';
-import he from '../../web/l10n/he.json';
-import hi from '../../web/l10n/hi.json';
-import hr from '../../web/l10n/hr.json';
-import hu from '../../web/l10n/hu.json';
-import id from '../../web/l10n/id.json';
-import it from '../../web/l10n/it.json';
-import ja from '../../web/l10n/ja.json';
-import ka from '../../web/l10n/ka.json';
-import kk from '../../web/l10n/kk.json';
-import km from '../../web/l10n/km.json';
-import ko from '../../web/l10n/ko.json';
-import lo from '../../web/l10n/lo.json';
-import lt from '../../web/l10n/lt.json';
-import lv from '../../web/l10n/lv.json';
-import ml from '../../web/l10n/ml.json';
-import mn from '../../web/l10n/mn.json';
-import ms from '../../web/l10n/ms.json';
-import nb from '../../web/l10n/nb.json';
-import ne from '../../web/l10n/ne.json';
-import nl from '../../web/l10n/nl.json';
-import nn from '../../web/l10n/nn.json';
-import pl from '../../web/l10n/pl.json';
-import pt from '../../web/l10n/pt.json';
-import ptBR from '../../web/l10n/pt_BR.json';
-import ro from '../../web/l10n/ro.json';
-import ru from '../../web/l10n/ru.json';
-import si from '../../web/l10n/si.json';
-import sk from '../../web/l10n/sk.json';
-import sl from '../../web/l10n/sl.json';
-import sq from '../../web/l10n/sq.json';
-import sr from '../../web/l10n/sr.json';
-import sv from '../../web/l10n/sv.json';
-import ta from '../../web/l10n/ta.json';
-import th from '../../web/l10n/th.json';
-import tr from '../../web/l10n/tr.json';
-import uk from '../../web/l10n/uk.json';
-import uz from '../../web/l10n/uz.json';
-import vi from '../../web/l10n/vi.json';
-import zh from '../../web/l10n/zh.json';
-import zhTW from '../../web/l10n/zh_TW.json';
const languages = {
- af: { data: af, name: 'Afrikaans' },
- ar: { data: ar, name: 'Ų§Ł„Ų¹Ų±ŲØŁŠŲ©' },
- az: { data: az, name: 'Azərbaycanca' },
- bg: { data: bg, name: 'Š‘ŃŠŠ»Š³Š°Ń€ŃŠŗŠø' },
- bn: { data: bn, name: 'ą¦¬ą¦¾ą¦‚ą¦²ą¦¾' },
- cs: { data: cs, name: 'ČeÅ”tina' },
- de: { data: de, name: 'Deutsch' },
- da: { data: da, name: 'Dansk' },
- el: { data: el, name: 'Ī•Ī»Ī»Ī·Ī½Ī¹ĪŗĪ¬' },
en: { data: en, name: 'English' },
es: { data: es, name: 'EspaƱol' },
- fa: { data: fa, name: 'ŁŲ§Ų±Ų³ŪŒ' },
- fi: { data: fi, name: 'Suomi' },
- fr: { data: fr, name: 'FranƧais' },
- he: { data: he, name: 'עב×Øי×Ŗ' },
- hi: { data: hi, name: 'ą¤¹ą¤æą¤Øą„ą¤¦ą„€' },
- hr: { data: hr, name: 'Hrvatski' },
- hu: { data: hu, name: 'Magyar' },
- id: { data: id, name: 'Bahasa Indonesia' },
- it: { data: it, name: 'Italiano' },
- ja: { data: ja, name: 'ę—„ęœ¬čŖž' },
- ka: { data: ka, name: 'įƒ„įƒįƒ įƒ—įƒ£įƒšįƒ˜' },
- kk: { data: kk, name: 'ŅšŠ°Š·Š°Ņ›ŃˆŠ°' },
- ko: { data: ko, name: 'ķ•œźµ­ģ–“' },
- km: { data: km, name: 'įž—įž¶įžŸįž¶įžįŸ’įž˜įŸ‚įžš' },
- lo: { data: lo, name: 'ąŗ„ąŗ²ąŗ§' },
- lt: { data: lt, name: 'Lietuvių' },
- lv: { data: lv, name: 'LatvieŔu' },
- ml: { data: ml, name: 'ą“®ą“²ą“Æą“¾ą“³ą“‚' },
- mn: { data: mn, name: 'ŠœŠ¾Š½Š³Š¾Š» хэŠ»' },
- ms: { data: ms, name: 'ŲØŁ‡Ų§Ų³ Ł…Ł„Ų§ŁŠŁˆ' },
- nb: { data: nb, name: 'Norsk bokmƄl' },
- ne: { data: ne, name: 'ą¤Øą„‡ą¤Ŗą¤¾ą¤²ą„€' },
- nl: { data: nl, name: 'Nederlands' },
- nn: { data: nn, name: 'Norsk nynorsk' },
- pl: { data: pl, name: 'Polski' },
- pt: { data: pt, name: 'PortuguĆŖs' },
- ptBR: { data: ptBR, name: 'PortuguĆŖs (Brasil)' },
- ro: { data: ro, name: 'RomĆ¢nă' },
- ru: { data: ru, name: 'Š ŃƒŃŃŠŗŠøŠ¹' },
- si: { data: si, name: 'ą·ƒą·’ą¶‚ą·„ą¶½' },
- sk: { data: sk, name: 'Slovenčina' },
- sl: { data: sl, name: 'SlovenŔčina' },
- sq: { data: sq, name: 'Shqipƫria' },
- sr: { data: sr, name: 'Srpski' },
- sv: { data: sv, name: 'Svenska' },
- ta: { data: ta, name: 'ą®¤ą®®ą®æą®“ąÆ' },
- th: { data: th, name: 'ą¹„ąø—ąø¢' },
- tr: { data: tr, name: 'TĆ¼rkƧe' },
- uk: { data: uk, name: 'Š£ŠŗрŠ°Ń—Š½ŃŃŒŠŗŠ°' },
- uz: { data: uz, name: 'OŹ»zbekcha' },
- vi: { data: vi, name: 'Tiįŗæng Viį»‡t' },
- zh: { data: zh, name: 'äø­ę–‡' },
- zhTW: { data: zhTW, name: 'äø­ę–‡ (Taiwan)' },
};
const getDefaultLanguage = () => {
@@ -131,12 +27,12 @@ const getDefaultLanguage = () => {
}
}
}
- return 'en';
+ return 'es';
};
const LocalizationContext = createContext({
languages,
- language: 'en',
+ language: 'es',
setLanguage: () => {},
});
diff --git a/modern/src/MainPage.js b/modern/src/MainPage.js
index 7fd4315..a118f17 100644
--- a/modern/src/MainPage.js
+++ b/modern/src/MainPage.js
@@ -1,8 +1,11 @@
-import React, { useState, useEffect } from 'react';
+import React, { useEffect } from 'react';
import { useHistory } from 'react-router-dom';
import {
makeStyles, Paper, Toolbar, TextField, IconButton, Button,
} from '@material-ui/core';
+import { useDispatch, useSelector } from 'react-redux';
+import { devicesActions } from './store/devices';
+import { uiActions } from './store/ui';
import { useTheme } from '@material-ui/core/styles';
import useMediaQuery from '@material-ui/core/useMediaQuery';
@@ -22,7 +25,6 @@ import BottomMenu from './components/BottomMenu';
import { useTranslation } from './LocalizationProvider';
import PoiMap from './map/PoiMap';
import MapPadding from './map/MapPadding';
-
const useStyles = makeStyles((theme) => ({
root: {
height: '100vh',
@@ -34,20 +36,20 @@ const useStyles = makeStyles((theme) => ({
left: 0,
top: 0,
margin: theme.spacing(1.5),
- width: theme.dimensions.drawerWidthDesktop,
+ width: '450px',
bottom: 56,
zIndex: 1301,
transition: 'transform .5s ease',
backgroundColor: 'white',
- [theme.breakpoints.down('md')]: {
+ [theme.breakpoints.down('sm')]: {
width: '100%',
margin: 0,
},
},
sidebarCollapsed: {
- transform: `translateX(-${theme.dimensions.drawerWidthDesktop})`,
+ transform: `translateX(-450px)`,
marginLeft: 0,
- [theme.breakpoints.down('md')]: {
+ [theme.breakpoints.down('sm')]: {
transform: 'translateX(-100vw)',
},
},
@@ -93,25 +95,34 @@ const MainPage = () => {
const classes = useStyles();
const history = useHistory();
const theme = useTheme();
+ const dispatch = useDispatch();
const t = useTranslation();
- const isTablet = useMediaQuery(theme.breakpoints.down('md'));
- const isPhone = useMediaQuery(theme.breakpoints.down('xs'));
+ const isPhone = useMediaQuery(theme.breakpoints.down('sm'));
+ const isWide = useMediaQuery(theme.breakpoints.up('md')/* || theme.breakpoints.up('sm') || theme.breakpoints.up('xs')*/);
- const [deviceName, setDeviceName] = useState('');
- const [collapsed, setCollapsed] = useState(false);
+ const collapsed = useSelector((state) => state.ui.collapsed);
const handleClose = () => {
- setCollapsed(!collapsed);
+ dispatch(uiActions.setCollapsed(!collapsed));
};
- useEffect(() => setCollapsed(isTablet), [isTablet]);
+ const filterTerm = useSelector((state) => state.devices.filterTerm);
+
+ const setFilterTerm = (text) => {
+ dispatch(devicesActions.setFilter(text));
+ }
+
+ const clearFilter = () => {
+ dispatch(devicesActions.clearFilter());
+ }
+
+ useEffect(() => uiActions.setCollapsed(isPhone), [isPhone]);
return (
<div className={classes.root}>
<Map>
- {!isTablet && <MapPadding left={parseInt(theme.dimensions.drawerWidthDesktop, 10)} />}
- <CurrentLocationMap />
+ {isWide && <MapPadding left={parseInt(theme.dimensions.drawerWidthDesktop, 10)} />}
<GeofenceMap />
<AccuracyMap />
<CurrentPositionsMap />
@@ -129,10 +140,10 @@ const MainPage = () => {
<ListIcon />
<div className={classes.sidebarToggleText}>{t('deviceTitle')}</div>
</Button>
- <Paper square elevation={3} className={`${classes.sidebar} ${collapsed && classes.sidebarCollapsed}`}>
+ <Paper square elevation={3} className={`${classes.sidebar} ${(!isWide && collapsed) && classes.sidebarCollapsed}`}>
<Paper className={classes.paper} square elevation={3}>
<Toolbar className={classes.toolbar} disableGutters>
- {isTablet && (
+ {!isWide && (
<IconButton onClick={handleClose}>
<ArrowBackIcon />
</IconButton>
@@ -140,21 +151,20 @@ const MainPage = () => {
<TextField
fullWidth
name="deviceName"
- value={deviceName}
- autoComplete="deviceName"
+ value={filterTerm}
autoFocus
- onChange={(event) => setDeviceName(event.target.value)}
- placeholder="Search Devices"
+ onChange={(event) => setFilterTerm(event.target.value) }
+ placeholder={t("sharedSearch")}
variant="filled"
/>
+ {filterTerm.length > 0 && (
+ <IconButton onClick={() => clearFilter() }>
+ <CloseIcon />
+ </IconButton>
+ )}
<IconButton onClick={() => history.push('/device')}>
<AddIcon />
</IconButton>
- {!isTablet && (
- <IconButton onClick={handleClose}>
- <CloseIcon />
- </IconButton>
- )}
</Toolbar>
</Paper>
<div className={classes.deviceList}>
diff --git a/modern/src/MainToolbar.js b/modern/src/MainToolbar.js
index 1e4dabe..73fdf51 100644
--- a/modern/src/MainToolbar.js
+++ b/modern/src/MainToolbar.js
@@ -5,9 +5,9 @@ import { useDispatch, useSelector } from 'react-redux';
import AppBar from '@material-ui/core/AppBar';
import Toolbar from '@material-ui/core/Toolbar';
import Typography from '@material-ui/core/Typography';
-import Button from '@material-ui/core/Button';
import IconButton from '@material-ui/core/IconButton';
import MenuIcon from '@material-ui/icons/Menu';
+import CloseIcon from '@material-ui/icons/Close';
import Drawer from '@material-ui/core/Drawer';
import List from '@material-ui/core/List';
import ListItem from '@material-ui/core/ListItem';
@@ -17,7 +17,6 @@ import MapIcon from '@material-ui/icons/Map';
import PersonIcon from '@material-ui/icons/Person';
import DescriptionIcon from '@material-ui/icons/Description';
import ReplayIcon from '@material-ui/icons/Replay';
-import { sessionActions } from './store';
import * as selectors from './common/selectors';
import { useTranslation } from './LocalizationProvider';
@@ -40,7 +39,6 @@ const useStyles = makeStyles((theme) => ({
const MainToolbar = () => {
const classes = useStyles();
const history = useHistory();
- const dispatch = useDispatch();
const t = useTranslation();
const userId = useSelector(selectors.getUserId);
@@ -50,12 +48,8 @@ const MainToolbar = () => {
const openDrawer = () => { setDrawer(true); };
const closeDrawer = () => { setDrawer(false); };
- const handleLogout = async () => {
- const response = await fetch('/api/session', { method: 'DELETE' });
- if (response.ok) {
- dispatch(sessionActions.updateUser(null));
- history.push('/login');
- }
+ const handleClose = async () => {
+ history.push ('/');
};
return (
@@ -70,9 +64,14 @@ const MainToolbar = () => {
<MenuIcon />
</IconButton>
<Typography variant="h6" color="inherit" className={classes.flex}>
- Traccar
+ ETBSA
</Typography>
- <Button color="inherit" onClick={handleLogout}>{t('loginLogout')}</Button>
+ <IconButton
+ color="inherit"
+ onClick={handleClose}
+ >
+ <CloseIcon />
+ </IconButton>
</Toolbar>
</AppBar>
<Drawer open={drawer} onClose={closeDrawer}>
diff --git a/modern/src/StartPage.js b/modern/src/StartPage.js
index 1e204c2..91b93c7 100644
--- a/modern/src/StartPage.js
+++ b/modern/src/StartPage.js
@@ -18,7 +18,7 @@ const useStyles = makeStyles((theme) => ({
[theme.breakpoints.down('md')]: {
width: theme.dimensions.sidebarWidthTablet,
},
- [theme.breakpoints.down('xs')]: {
+ [theme.breakpoints.down('xl')]: {
width: '0px',
},
},
@@ -29,7 +29,7 @@ const useStyles = makeStyles((theme) => ({
alignItems: 'center',
flex: 1,
boxShadow: '-2px 0px 16px rgba(0, 0, 0, 0.25)',
- [theme.breakpoints.up('lg')]: {
+ [theme.breakpoints.up('xl')]: {
padding: theme.spacing(0, 25, 0, 0),
},
},
@@ -43,6 +43,7 @@ const useStyles = makeStyles((theme) => ({
bottom: theme.spacing(1),
right: theme.spacing(1.5),
fontSize: 'x-small',
+ display: 'none',
},
}));
@@ -54,7 +55,7 @@ const StartPage = ({ children }) => {
<>
<main className={classes.root}>
<div className={classes.sidebar}>
- {!useMediaQuery(theme.breakpoints.down('md'))
+ {!useMediaQuery(theme.breakpoints.down('xl'))
&& (
<svg height="64" width="240">
<use xlinkHref="/logo.svg#img" />
diff --git a/modern/src/common/deviceCategories.js b/modern/src/common/deviceCategories.js
index f5d749a..69e4eb5 100644
--- a/modern/src/common/deviceCategories.js
+++ b/modern/src/common/deviceCategories.js
@@ -1,6 +1,7 @@
export default [
'default',
'animal',
+ 'backhoe',
'bicycle',
'boat',
'bus',
diff --git a/modern/src/common/formatter.js b/modern/src/common/formatter.js
index 0ff4e74..f8a55da 100644
--- a/modern/src/common/formatter.js
+++ b/modern/src/common/formatter.js
@@ -4,9 +4,12 @@ export const formatBoolean = (value, t) => (value ? t('sharedYes') : t('sharedNo
export const formatNumber = (value, precision = 1) => Number(value.toFixed(precision));
-export const formatDate = (value, format = 'YYYY-MM-DD HH:mm') => moment(value).format(format);
+export const formatDate = (value, locale) => new Intl.DateTimeFormat(locale, {
+ dateStyle: 'medium',
+ timeStyle: 'short',
+}).format(Date.parse(value));
-export const formatPosition = (value, key, t) => {
+export const formatPosition = (value, key, t, locale = 'es') => {
if (value != null && typeof value === 'object') {
value = value[key];
}
@@ -15,7 +18,7 @@ export const formatPosition = (value, key, t) => {
case 'deviceTime':
case 'serverTime':
case 'eventTime':
- return moment(value).format('LLL');
+ return formatDate(value, locale);
case 'latitude':
case 'longitude':
return value.toFixed(5);
@@ -47,15 +50,7 @@ export const formatDistance = (value, unit, t) => {
};
export const formatSpeed = (value, unit, t) => {
- switch (unit) {
- case 'kmh':
- return `${(value * 1.852).toFixed(2)} ${t('sharedKmh')}`;
- case 'mph':
- return `${(value * 1.15078).toFixed(2)} ${t('sharedMph')}`;
- case 'kn':
- default:
- return `${(value * 1).toFixed(2)} ${t('sharedKn')}`;
- }
+ return `${(value * 1).toFixed(0)} ${t('sharedKmh')}`;
};
export const formatVolume = (value, unit, t) => {
@@ -70,7 +65,10 @@ export const formatVolume = (value, unit, t) => {
}
};
-export const formatHours = (value) => moment.duration(value).humanize();
+export const formatHours = (value, t) => {
+ moment.locale('es');
+ return `${moment.duration(value).asHours().toFixed(0)} ${t('sharedHours')}`;
+}
export const formatCoordinate = (key, value, unit) => {
let hemisphere;
diff --git a/modern/src/common/selectors.js b/modern/src/common/selectors.js
index 0c4c02e..ad42c30 100644
--- a/modern/src/common/selectors.js
+++ b/modern/src/common/selectors.js
@@ -4,4 +4,8 @@ export const getUserId = (state) => state.session.user?.id;
export const getDevices = (state) => Object.values(state.devices.items);
+export const getFilteredDevices = (state) => Object.values(state.devices.filteredItems);
+
+export const getFilterTerm = (state) => state.devices.filterTerm;
+
export const getPosition = (id) => (state) => state.positions.items[id];
diff --git a/modern/src/components/BottomMenu.js b/modern/src/components/BottomMenu.js
index a1e9625..59ad96e 100644
--- a/modern/src/components/BottomMenu.js
+++ b/modern/src/components/BottomMenu.js
@@ -10,7 +10,7 @@ import ShuffleIcon from '@material-ui/icons/Shuffle';
import MapIcon from '@material-ui/icons/Map';
import LogoutIcon from '@material-ui/icons/ExitToApp';
-import { sessionActions } from '../store';
+import { sessionActions, uiActions } from '../store';
import { useTranslation } from '../LocalizationProvider';
const useStyles = makeStyles((theme) => ({
@@ -20,10 +20,10 @@ const useStyles = makeStyles((theme) => ({
width: '100%',
position: 'fixed',
zIndex: 1301,
- [theme.breakpoints.up('lg')]: {
+ [theme.breakpoints.up('md')]: {
left: theme.spacing(1.5),
bottom: theme.spacing(1.5),
- width: theme.dimensions.drawerWidthDesktop,
+ width: '450px',
},
},
}));
@@ -37,6 +37,9 @@ const BottomMenu = () => {
const handleSelection = async (_, value) => {
switch (value) {
+ case 0:
+ dispatch(uiActions.setCollapsed(true));
+ break;
case 1:
history.push('/reports/route');
break;
@@ -47,6 +50,7 @@ const BottomMenu = () => {
await fetch('/api/session', { method: 'DELETE' });
history.push('/login');
dispatch(sessionActions.updateUser(null));
+ window.location.reload();
break;
default:
break;
diff --git a/modern/src/components/registration/LoginForm.js b/modern/src/components/registration/LoginForm.js
index bbb5d5f..9c1fbb4 100644
--- a/modern/src/components/registration/LoginForm.js
+++ b/modern/src/components/registration/LoginForm.js
@@ -63,14 +63,9 @@ const LoginForm = () => {
return (
<StartPage>
<Grid container direction="column" spacing={2}>
- {useMediaQuery(theme.breakpoints.down('md'))
- && (
- <Grid item className={classes.logoContainer}>
- <svg height="64" width="240">
- <use xlinkHref="/logo.svg#img" />
- </svg>
- </Grid>
- )}
+ <Grid item className={classes.logoContainer}>
+ <img src="/logo.svg" height="64" width="240" />
+ </Grid>
<Grid item>
<TextField
required
diff --git a/modern/src/index.js b/modern/src/index.js
index 155bf62..32cf990 100644
--- a/modern/src/index.js
+++ b/modern/src/index.js
@@ -16,4 +16,4 @@ ReactDOM.render((
</Provider>
), document.getElementById('root'));
-serviceWorker.register();
+serviceWorker.unregister();
diff --git a/modern/src/map/Map.js b/modern/src/map/Map.js
index dcf5a92..8c9bf51 100644
--- a/modern/src/map/Map.js
+++ b/modern/src/map/Map.js
@@ -8,10 +8,9 @@ import { SwitcherControl } from './switcher/switcher';
import deviceCategories from '../common/deviceCategories';
import { prepareIcon, loadImage } from './mapUtil';
import {
- styleCarto, styleLocationIq, styleMapbox, styleMapTiler, styleOsm,
+ styleLocationIq, styleCarto, styleOsm, styleGmapsStreets, styleGmapsSatellite, styleGmapsHybrid
} from './mapStyles';
import { useAttributePreference } from '../common/preferences';
-import palette from '../theme/palette';
import { useTranslation } from '../LocalizationProvider';
const element = document.createElement('div');
@@ -20,6 +19,8 @@ element.style.height = '100%';
export const map = new maplibregl.Map({
container: element,
+ center: [-100.360, 23.191],
+ zoom: 5
});
let ready = false;
@@ -43,18 +44,16 @@ const initMap = async () => {
if (ready) return;
if (!map.hasImage('background')) {
const background = await loadImage('images/background.svg');
- map.addImage('background', await prepareIcon(background), {
+ map.addImage('background', prepareIcon(background), {
pixelRatio: window.devicePixelRatio,
});
await Promise.all(deviceCategories.map(async (category) => {
const results = [];
- ['green', 'red', 'gray'].forEach((color) => {
- results.push(loadImage(`images/icon/${category}.svg`).then((icon) => {
- map.addImage(`${category}-${color}`, prepareIcon(background, icon, palette.common[color]), {
- pixelRatio: window.devicePixelRatio,
- });
- }));
- });
+ results.push(loadImage(`images/icon/${category.toLowerCase()}.png`).then((icon) => {
+ map.addImage(`${category.toLowerCase()}-map`, prepareIcon(background, icon, null), {
+ pixelRatio: window.devicePixelRatio,
+ });
+ }));
await Promise.all(results);
}));
}
@@ -62,7 +61,7 @@ const initMap = async () => {
};
map.addControl(new maplibregl.NavigationControl({
- showCompass: false,
+ showCompass: false
}));
const switcher = new SwitcherControl(
@@ -70,7 +69,7 @@ const switcher = new SwitcherControl(
() => {
const waiting = () => {
if (!map.loaded()) {
- setTimeout(waiting, 100);
+ setTimeout(waiting, 2000);
} else {
initMap();
}
@@ -98,17 +97,13 @@ const Map = ({ children }) => {
useEffect(() => {
switcher.updateStyles([
{ id: 'locationIqStreets', title: t('mapLocationIqStreets'), uri: styleLocationIq('streets', locationIqKey) },
- { id: 'locationIqEarth', title: t('mapLocationIqEarth'), uri: styleLocationIq('earth', locationIqKey) },
- { id: 'locationIqHybrid', title: t('mapLocationIqHybrid'), uri: styleLocationIq('hybrid', locationIqKey) },
{ id: 'osm', title: t('mapOsm'), uri: styleOsm() },
{ id: 'carto', title: t('mapCarto'), uri: styleCarto() },
- { id: 'mapboxStreets', title: t('mapMapboxStreets'), uri: styleMapbox('streets-v11') },
- { id: 'mapboxOutdoors', title: t('mapMapboxOutdoors'), uri: styleMapbox('outdoors-v11') },
- { id: 'mapboxSatellite', title: t('mapMapboxSatellite'), uri: styleMapbox('satellite-v9') },
- { id: 'mapTilerBasic', title: t('mapMapTilerBasic'), uri: styleMapTiler('basic', mapTilerKey) },
- { id: 'mapTilerHybrid', title: t('mapMapTilerHybrid'), uri: styleMapTiler('hybrid', mapTilerKey) },
- ], 'locationIqStreets');
- }, [mapTilerKey]);
+ { id: 'gmapsStreets', title: t('mapGmapsStreets'), uri: styleGmapsStreets() },
+ { id: 'gmapsSatellite', title: t('mapGmapsSatellite'), uri: styleGmapsSatellite() },
+ { id: 'gmapsHybrid', title: t('mapGmapsHybrid'), uri: styleGmapsHybrid() },
+ ], 'gmapsStreets');
+ }, [locationIqKey]);
useEffect(() => {
const listener = (ready) => setMapReady(ready);
diff --git a/modern/src/map/PositionsMap.js b/modern/src/map/PositionsMap.js
index 8d10053..b702400 100644
--- a/modern/src/map/PositionsMap.js
+++ b/modern/src/map/PositionsMap.js
@@ -18,19 +18,24 @@ const PositionsMap = ({ positions }) => {
const devices = useSelector((state) => state.devices.items);
const deviceColor = (device) => {
- switch (device.status) {
- case 'online':
+ const position = positions[device.id];
+ if (position) {
+ if (position.attributes.ignition) {
return 'green';
- case 'offline':
- return 'red';
- default:
+ } else if (position.attributes.ignition === undefined) {
return 'gray';
+ } else {
+ return 'red';
+ }
+ } else {
+ return 'gray';
}
};
const createFeature = (devices, position) => {
const device = devices[position.deviceId];
return {
+ position: position,
deviceId: position.deviceId,
name: device.name,
category: device.category || 'default',
@@ -48,15 +53,20 @@ const PositionsMap = ({ positions }) => {
coordinates[0] += event.lngLat.lng > coordinates[0] ? 360 : -360;
}
+ console.log(event);
+
+ const position = JSON.parse(feature.properties.position);
const placeholder = document.createElement('div');
ReactDOM.render(
<Provider store={store}>
<ThemeProvider theme={theme}>
- <StatusView
- deviceId={feature.properties.deviceId}
- onShowDetails={(positionId) => history.push(`/position/${positionId}`)}
- onShowHistory={() => history.push('/replay')}
- onEditClick={(deviceId) => history.push(`/device/${deviceId}`)}
+ <StatusView
+ position={position}
+ deviceId={feature.properties.deviceId}
+ onShowDetails={(positionId) => history.push(`/position/${positionId}`)}
+ onShowHistory={(deviceId) => history.push(`/replay/${deviceId}`)}
+ onEditClick={(deviceId) => history.push(`/device/${deviceId}`)}
+ onCommandsClick={(deviceId) => history.push(`/device/${deviceId}/commands`) }
/>
</ThemeProvider>
</Provider>,
@@ -104,18 +114,19 @@ const PositionsMap = ({ positions }) => {
source: id,
filter: ['!', ['has', 'point_count']],
layout: {
- 'icon-image': '{category}-{color}',
+ 'icon-image': ['concat', ['downcase', ['get', 'category']], '-map'],
'icon-allow-overlap': true,
'text-field': '{name}',
'text-allow-overlap': true,
'text-anchor': 'bottom',
'text-offset': [0, -2],
- 'text-font': ['Roboto Regular'],
+ 'text-font': ['Roboto Bold'],
'text-size': 12,
},
paint: {
+ 'text-color': 'black',
'text-halo-color': 'white',
- 'text-halo-width': 1,
+ 'text-halo-width': 2,
},
});
map.addLayer({
diff --git a/modern/src/map/SelectedDeviceMap.js b/modern/src/map/SelectedDeviceMap.js
index 6384717..d05394b 100644
--- a/modern/src/map/SelectedDeviceMap.js
+++ b/modern/src/map/SelectedDeviceMap.js
@@ -16,10 +16,10 @@ const SelectedDeviceMap = () => {
useEffect(() => {
if (mapCenter) {
- map.easeTo({ center: mapCenter.position });
+ map.easeTo({ center: mapCenter.position, zoom:18 });
}
}, [mapCenter]);
-
+
return null;
};
diff --git a/modern/src/map/StatusView.js b/modern/src/map/StatusView.js
index 5526e14..b892e77 100644
--- a/modern/src/map/StatusView.js
+++ b/modern/src/map/StatusView.js
@@ -4,17 +4,18 @@ import {
} from '@material-ui/core';
import List from '@material-ui/core/List';
import ListItem from '@material-ui/core/ListItem';
-import ListItemSecondaryAction from '@material-ui/core/ListItemSecondaryAction';
import ListItemText from '@material-ui/core/ListItemText';
import { useSelector } from 'react-redux';
-import ReplayIcon from '@material-ui/icons/Replay';
-import ExitToAppIcon from '@material-ui/icons/ExitToApp';
import EditIcon from '@material-ui/icons/Edit';
+import SendIcon from '@material-ui/icons/Send';
import DeleteIcon from '@material-ui/icons/Delete';
+import LinkIcon from '@material-ui/icons/Link';
+import InfoIcon from '@material-ui/icons/Info';
+import PlayCircleFilledIcon from '@material-ui/icons/PlayCircleFilled';
import {
- formatPosition, getStatusColor, getBatteryStatus, formatDistance, formatSpeed,
+ formatSpeed, formatHours, formatPosition
} from '../common/formatter';
import { useAttributePreference } from '../common/preferences';
import RemoveDialog from '../RemoveDialog';
@@ -27,19 +28,23 @@ const useStyles = makeStyles((theme) => ({
},
...theme.palette.colors,
listItemContainer: {
- maxWidth: '240px',
+ maxWidth: '300px',
},
+ listItemRoot: {
+ paddingTop: '0px',
+ paddingBottom: '0px',
+ }
}));
const StatusView = ({
- deviceId, onShowDetails, onShowHistory, onEditClick,
+ position, deviceId, onShowDetails, onShowHistory, onEditClick, onCommandsClick,
}) => {
const classes = useStyles();
const t = useTranslation();
const [removeDialogShown, setRemoveDialogShown] = useState(false);
+ const session = useSelector((state) => state.session);
const device = useSelector((state) => state.devices.items[deviceId]);
- const position = useSelector(getPosition(deviceId));
const distanceUnit = useAttributePreference('distanceUnit');
const speedUnit = useAttributePreference('speedUnit');
@@ -54,6 +59,11 @@ const StatusView = ({
onEditClick(deviceId);
};
+ const handleCommandsClick = (e) => {
+ e.preventDefault();
+ onCommandsClick(deviceId);
+ }
+
const handleRemove = () => {
setRemoveDialogShown(true);
};
@@ -62,72 +72,71 @@ const StatusView = ({
setRemoveDialogShown(false);
};
+ const handleGotoLink = () => {
+ const url = `https://maps.google.com/maps?q=${position.latitude},${position.longitude}&z=18`;
+ window.open(url, "_blank");
+ }
+
return (
<>
<Paper className={classes.paper} elevation={0} square>
<Grid container direction="column">
<Grid item>
<List>
- <ListItem classes={{ container: classes.listItemContainer }}>
- <ListItemText primary={t('deviceStatus')} />
- <ListItemSecondaryAction>
- <span className={classes[getStatusColor(device.status)]}>{device.status}</span>
- </ListItemSecondaryAction>
- </ListItem>
- <ListItem classes={{ container: classes.listItemContainer }}>
- <ListItemText primary={t('positionSpeed')} />
- <ListItemSecondaryAction>
- {formatSpeed(position.speed, speedUnit, t)}
- </ListItemSecondaryAction>
+ <ListItem classes={{ container: classes.listItemContainer, root: classes.listItemRoot }} >
+ <ListItemText primary={t('positionDatetime')} secondary={formatPosition(position, 'fixTime', t)} />
</ListItem>
- {position.attributes.batteryLevel && (
- <ListItem classes={{ container: classes.listItemContainer }}>
- <ListItemText primary={t('positionBattery')} />
- <ListItemSecondaryAction>
- <span className={classes[getBatteryStatus(position.attributes.batteryLevel)]}>
- {formatPosition(position.attributes.batteryLevel, 'batteryLevel', t)}
- </span>
- </ListItemSecondaryAction>
- </ListItem>
- )}
- <ListItem classes={{ container: classes.listItemContainer }}>
- <ListItemText primary={t('positionDistance')} />
- <ListItemSecondaryAction>
- {formatDistance(position.attributes.totalDistance, distanceUnit, t)}
- </ListItemSecondaryAction>
- </ListItem>
- <ListItem classes={{ container: classes.listItemContainer }}>
- <ListItemText primary={t('positionCourse')} />
- <ListItemSecondaryAction>
- {formatPosition(position.course, 'course', t)}
- </ListItemSecondaryAction>
+ <ListItem classes={{ container: classes.listItemContainer, root: classes.listItemRoot }}>
+ <ListItemText primary={t('positionSpeed')} secondary={formatSpeed(position.speed, speedUnit, t)} />
</ListItem>
+ {device.category
+ && (device.category.toLowerCase() === 'backhoe' || device.category.toLowerCase() === 'tractor')
+ && position.attributes.hours
+ && (
+ <ListItem classes={{ container: classes.listItemContainer, root: classes.listItemRoot }}>
+ <ListItemText primary={t('positionHours')} secondary={formatHours(position.attributes.hours, t)} />
+ </ListItem>)}
+ {position.address && (
+ <ListItem classes={{ container: classes.listItemContainer, root: classes.listItemRoot }}>
+ <ListItemText primary={t('positionAddress')} secondary={position.address} />
+ </ListItem>)}
</List>
</Grid>
<Grid item container>
<Grid item>
- <Button color="secondary" onClick={handleClick}>More Info</Button>
- </Grid>
- <Grid item>
- <IconButton onClick={onShowHistory}>
- <ReplayIcon />
+ <IconButton onClick={handleClick}>
+ <InfoIcon />
</IconButton>
</Grid>
<Grid item>
- <IconButton>
- <ExitToAppIcon />
+ <IconButton onClick={() => onShowHistory(deviceId)}>
+ <PlayCircleFilledIcon />
</IconButton>
</Grid>
<Grid item>
- <IconButton onClick={handleEditClick}>
- <EditIcon />
+ <IconButton onClick={handleGotoLink}>
+ <LinkIcon />
</IconButton>
</Grid>
<Grid item>
- <IconButton onClick={handleRemove} className={classes.red}>
- <DeleteIcon />
+ <IconButton onClick={handleCommandsClick}>
+ <SendIcon />
</IconButton>
</Grid>
+ {!session.server.deviceReadonly && (
+ <>
+ <Grid item>
+ <IconButton onClick={handleEditClick}>
+ <EditIcon />
+ </IconButton>
+ </Grid>
+ <Grid item>
+ <IconButton onClick={handleRemove} className={classes.red}>
+ <DeleteIcon />
+ </IconButton>
+ </Grid>
+ </>
+ )}
</Grid>
</Grid>
</Paper>
diff --git a/modern/src/map/mapStyles.js b/modern/src/map/mapStyles.js
index 86813a1..a6e84fd 100644
--- a/modern/src/map/mapStyles.js
+++ b/modern/src/map/mapStyles.js
@@ -53,3 +53,11 @@ export const styleMapbox = (style) => `mapbox://styles/mapbox/${style}`;
export const styleMapTiler = (style, key) => `https://api.maptiler.com/maps/${style}/style.json?key=${key}`;
export const styleLocationIq = (style, key) => `https://tiles.locationiq.com/v3/${style}/vector.json?key=${key}`;
+
+// Google Maps
+
+export const styleGmapsStreets = () => styleCustom('https://mt0.google.com/vt/lyrs=m&hl=en&x={x}&y={y}&z={z}&s=Ga', '');
+
+export const styleGmapsSatellite = () => styleCustom('https://mt0.google.com/vt/lyrs=s&hl=en&x={x}&y={y}&z={z}&s=Ga', '');
+
+export const styleGmapsHybrid = () => styleCustom('https://mt0.google.com/vt/lyrs=y&hl=en&x={x}&y={y}&z={z}&s=Ga', '');
diff --git a/modern/src/map/mapUtil.js b/modern/src/map/mapUtil.js
index 2aa86c6..e93c146 100644
--- a/modern/src/map/mapUtil.js
+++ b/modern/src/map/mapUtil.js
@@ -39,14 +39,10 @@ export const prepareIcon = (background, icon, color) => {
context.drawImage(background, 0, 0, canvas.width, canvas.height);
if (icon) {
- const iconRatio = 0.5;
+ const iconRatio = 0.7;
const imageWidth = canvas.width * iconRatio;
const imageHeight = canvas.height * iconRatio;
- if (navigator.userAgent.indexOf('Firefox') > 0) {
- context.drawImage(icon, (canvas.width - imageWidth) / 2, (canvas.height - imageHeight) / 2, imageWidth, imageHeight);
- } else {
- context.drawImage(canvasTintImage(icon, color), (canvas.width - imageWidth) / 2, (canvas.height - imageHeight) / 2, imageWidth, imageHeight);
- }
+ context.drawImage(icon, (canvas.width - imageWidth) / 2, (canvas.height - imageHeight) / 2, imageWidth, imageHeight);
}
return context.getImageData(0, 0, canvas.width, canvas.height);
diff --git a/modern/src/reports/ReplayPage.js b/modern/src/reports/ReplayPage.js
index bb32daa..fa94a06 100644
--- a/modern/src/reports/ReplayPage.js
+++ b/modern/src/reports/ReplayPage.js
@@ -1,15 +1,21 @@
import React, { useState } from 'react';
+import { useParams } from 'react-router-dom';
import {
- Accordion, AccordionDetails, AccordionSummary, Container, makeStyles, Paper, Slider, Tooltip, Typography,
+ Accordion, AccordionDetails, AccordionSummary, Container, makeStyles, Paper, Slider, Tooltip, Typography, IconButton, Box
} from '@material-ui/core';
+
import ExpandMoreIcon from '@material-ui/icons/ExpandMore';
+import SkipNextIcon from '@material-ui/icons/SkipNext';
+import SkipPreviousIcon from '@material-ui/icons/SkipPrevious';
+
import MainToolbar from '../MainToolbar';
import Map from '../map/Map';
import ReplayPathMap from '../map/ReplayPathMap';
import PositionsMap from '../map/PositionsMap';
-import { formatPosition } from '../common/formatter';
+import { formatPosition, formatSpeed } from '../common/formatter';
import ReportFilter from './ReportFilter';
import { useTranslation } from '../LocalizationProvider';
+import { useAttributePreference } from '../common/preferences';
const useStyles = makeStyles((theme) => ({
root: {
@@ -41,8 +47,11 @@ const TimeLabel = ({ children, open, value }) => (
const ReplayPage = () => {
const classes = useStyles();
+ const { id } = useParams();
const t = useTranslation();
+ const speedUnit = useAttributePreference('speedUnit');
+
const [expanded, setExpanded] = useState(true);
const [positions, setPositions] = useState([]);
const [index, setIndex] = useState(0);
@@ -68,18 +77,39 @@ const ReplayPage = () => {
<Container maxWidth="sm" className={classes.controlPanel}>
{!!positions.length
&& (
- <Paper className={classes.controlContent}>
- <Slider
- max={positions.length - 1}
- step={null}
- marks={positions.map((_, index) => ({ value: index }))}
- value={index}
- onChange={(_, index) => setIndex(index)}
- valueLabelDisplay="auto"
- valueLabelFormat={(i) => (i < positions.length ? formatPosition(positions[i], 'fixTime', t) : '')}
- ValueLabelComponent={TimeLabel}
- />
- </Paper>
+ <Paper className={classes.controlContent}>
+ <Box maxWidth="sm" display="flex">
+ {/* Previous position button */}
+ <IconButton color="primary" disabled={index === 0} onClick={() => setIndex(index - 1)}>
+ <SkipPreviousIcon />
+ </IconButton>
+
+ <Box flexGrow={1} textAlign="center">
+ {/* Date time */}
+ <Typography variant="button">{formatPosition(positions[index], 'fixTime', t)}</Typography>
+ {/* Speed */}
+ {positions[index].speed != undefined &&
+ <>
+ <br/><Typography variant="secondary">{formatSpeed(positions[index].speed, speedUnit, t)}</Typography>
+ </>}
+ </Box>
+ {/* Speed */}
+ {/* Next position button*/}
+ <IconButton color="primary" disabled={index === positions.length - 1} onClick={() => setIndex(index + 1)}>
+ <SkipNextIcon />
+ </IconButton>
+ </Box>
+ <Slider
+ max={positions.length - 1}
+ step={null}
+ marks={positions.map((_, index) => ({ value: index }))}
+ value={index}
+ onChange={(_, index) => setIndex(index)}
+ valueLabelDisplay="auto"
+ valueLabelFormat={(i) => (i < positions.length ? formatPosition(positions[i], 'fixTime', t) : '')}
+ ValueLabelComponent={TimeLabel}
+ />
+ </Paper>
)}
<div>
<Accordion expanded={expanded} onChange={() => setExpanded(!expanded)}>
@@ -89,7 +119,7 @@ const ReplayPage = () => {
</Typography>
</AccordionSummary>
<AccordionDetails className={classes.configForm}>
- <ReportFilter handleSubmit={handleSubmit} showOnly />
+ <ReportFilter handleSubmit={handleSubmit} showOnly defaultSelected={id} />
</AccordionDetails>
</Accordion>
</div>
diff --git a/modern/src/reports/ReportFilter.js b/modern/src/reports/ReportFilter.js
index 23c7fc0..25b0af7 100644
--- a/modern/src/reports/ReportFilter.js
+++ b/modern/src/reports/ReportFilter.js
@@ -6,11 +6,11 @@ import { useSelector } from 'react-redux';
import moment from 'moment';
import { useTranslation } from '../LocalizationProvider';
-const ReportFilter = ({ children, handleSubmit, showOnly }) => {
+const ReportFilter = ({ children, handleSubmit, showOnly, defaultSelected }) => {
const t = useTranslation();
const devices = useSelector((state) => Object.values(state.devices.items));
- const [deviceId, setDeviceId] = useState();
+ const [deviceId, setDeviceId] = useState(defaultSelected);
const [period, setPeriod] = useState('today');
const [from, setFrom] = useState(moment().subtract(1, 'hour'));
const [to, setTo] = useState(moment());
@@ -65,9 +65,11 @@ const ReportFilter = ({ children, handleSubmit, showOnly }) => {
<FormControl variant="filled" fullWidth>
<InputLabel>{t('reportDevice')}</InputLabel>
<Select value={deviceId} onChange={(e) => setDeviceId(e.target.value)}>
- {devices.map((device) => (
- <MenuItem value={device.id}>{device.name}</MenuItem>
- ))}
+ {devices
+ .sort((a, b) => a.name.localeCompare(b.name))
+ .map((device) => (
+ <MenuItem value={device.id}>{device.name}</MenuItem>
+ ))}
</Select>
</FormControl>
</Grid>
diff --git a/modern/src/setupProxy.js b/modern/src/setupProxy.js
index cd6a2fa..bc0daf0 100644
--- a/modern/src/setupProxy.js
+++ b/modern/src/setupProxy.js
@@ -3,6 +3,6 @@
const proxy = require('http-proxy-middleware');
module.exports = (app) => {
- app.use(proxy('/api/socket', { target: `ws://${process.env.REACT_APP_URL_NAME}`, ws: true }));
- app.use(proxy('/api', { target: `http://${process.env.REACT_APP_URL_NAME}` }));
-};
+ app.use(proxy('/api/socket', { target: `wss://${process.env.REACT_APP_URL_NAME}`, changeOrigin: true, ws: true }));
+ app.use(proxy('/api', { target: `https://${process.env.REACT_APP_URL_NAME}`, changeOrigin: true }));
+}; \ No newline at end of file
diff --git a/modern/src/store/devices.js b/modern/src/store/devices.js
index cca23cb..f63602a 100644
--- a/modern/src/store/devices.js
+++ b/modern/src/store/devices.js
@@ -1,9 +1,11 @@
-import { createSlice } from '@reduxjs/toolkit';
+import { createSlice, current } from '@reduxjs/toolkit';
const { reducer, actions } = createSlice({
name: 'devices',
initialState: {
items: {},
+ filterTerm: '',
+ filteredItems: {},
selectedId: null,
},
reducers: {
@@ -17,6 +19,20 @@ const { reducer, actions } = createSlice({
select(state, action) {
state.selectedId = action.payload.id;
},
+ unselect(state, action) {
+ state.selectedId = null;
+ },
+ setFilter(state, action) {
+ state.filterTerm = action.payload;
+ const items = Object.entries(current(state).items);
+ state.filteredItems = Object.fromEntries(items.filter(([k, v]) => {
+ return v.name.toLowerCase().includes(action.payload.toLowerCase());
+ }));
+ },
+ clearFilter(state, action) {
+ state.filterTerm = '';
+ state.filteredItems = {};
+ },
remove(state, action) {
delete state.items[action.payload];
},
diff --git a/modern/src/store/index.js b/modern/src/store/index.js
index 6e2bb20..ebd3f43 100644
--- a/modern/src/store/index.js
+++ b/modern/src/store/index.js
@@ -7,6 +7,7 @@ import { geofencesReducer as geofences } from './geofences';
import { groupsReducer as groups } from './groups';
import { driversReducer as drivers } from './drivers';
import { maintenancesReducer as maintenances } from './maintenances';
+import { uiReducer as ui } from './ui';
const reducer = combineReducers({
session,
@@ -16,6 +17,7 @@ const reducer = combineReducers({
groups,
drivers,
maintenances,
+ ui
});
export { sessionActions } from './session';
@@ -25,5 +27,6 @@ export { geofencesActions } from './geofences';
export { groupsActions } from './groups';
export { driversActions } from './drivers';
export { maintenancesActions } from './maintenances';
+export { uiActions } from './ui';
export default configureStore({ reducer });
diff --git a/modern/src/store/ui.js b/modern/src/store/ui.js
new file mode 100644
index 0000000..0783492
--- /dev/null
+++ b/modern/src/store/ui.js
@@ -0,0 +1,16 @@
+import { createSlice } from '@reduxjs/toolkit';
+
+const { reducer, actions } = createSlice({
+ name: 'ui',
+ initialState: {
+ collapsed: true
+ },
+ reducers: {
+ setCollapsed(state, action) {
+ state.collapsed = action.payload;
+ },
+ },
+});
+
+export { actions as uiActions };
+export { reducer as uiReducer };
diff --git a/modern/src/theme/index.js b/modern/src/theme/index.js
index dc0a35b..02865c2 100644
--- a/modern/src/theme/index.js
+++ b/modern/src/theme/index.js
@@ -1,9 +1,9 @@
-import { createMuiTheme } from '@material-ui/core/styles';
+import { createTheme } from '@material-ui/core/styles';
import palette from './palette';
import overrides from './overrides';
import dimensions from './dimensions';
-const theme = createMuiTheme({
+const theme = createTheme({
palette,
overrides,
dimensions,