Compare commits
No commits in common. "main" and "aw-client-side-classes" have entirely different histories.
main
...
aw-client-
53
package-lock.json
generated
53
package-lock.json
generated
@ -3446,15 +3446,6 @@
|
|||||||
"integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==",
|
"integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==",
|
||||||
"optional": true
|
"optional": true
|
||||||
},
|
},
|
||||||
"bindings": {
|
|
||||||
"version": "1.5.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
|
|
||||||
"integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
|
|
||||||
"optional": true,
|
|
||||||
"requires": {
|
|
||||||
"file-uri-to-path": "1.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"bluebird": {
|
"bluebird": {
|
||||||
"version": "3.7.2",
|
"version": "3.7.2",
|
||||||
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz",
|
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz",
|
||||||
@ -6352,12 +6343,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"file-uri-to-path": {
|
|
||||||
"version": "1.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
|
|
||||||
"integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"filesize": {
|
"filesize": {
|
||||||
"version": "6.1.0",
|
"version": "6.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/filesize/-/filesize-6.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/filesize/-/filesize-6.1.0.tgz",
|
||||||
@ -10111,11 +10096,6 @@
|
|||||||
"minimist": "^1.2.5"
|
"minimist": "^1.2.5"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"moment": {
|
|
||||||
"version": "2.29.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz",
|
|
||||||
"integrity": "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ=="
|
|
||||||
},
|
|
||||||
"move-concurrently": {
|
"move-concurrently": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz",
|
||||||
@ -10153,12 +10133,6 @@
|
|||||||
"resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz",
|
"resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz",
|
||||||
"integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA=="
|
"integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA=="
|
||||||
},
|
},
|
||||||
"nan": {
|
|
||||||
"version": "2.14.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz",
|
|
||||||
"integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==",
|
|
||||||
"optional": true
|
|
||||||
},
|
|
||||||
"nanoid": {
|
"nanoid": {
|
||||||
"version": "3.1.16",
|
"version": "3.1.16",
|
||||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.16.tgz",
|
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.16.tgz",
|
||||||
@ -12281,11 +12255,6 @@
|
|||||||
"whatwg-fetch": "^3.4.1"
|
"whatwg-fetch": "^3.4.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"react-axios": {
|
|
||||||
"version": "2.0.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/react-axios/-/react-axios-2.0.3.tgz",
|
|
||||||
"integrity": "sha512-63kY2iupdRgbvPq9G8xmM0NWUnt2Q5YmpotMoLQsxKOzKXKZg2Lo6CzF/bcZvtmv3WnfjBU6Bg8nZQO28eIAZw=="
|
|
||||||
},
|
|
||||||
"react-dev-utils": {
|
"react-dev-utils": {
|
||||||
"version": "11.0.0",
|
"version": "11.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/react-dev-utils/-/react-dev-utils-11.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/react-dev-utils/-/react-dev-utils-11.0.0.tgz",
|
||||||
@ -12391,16 +12360,6 @@
|
|||||||
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
|
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
|
||||||
"integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
|
"integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
|
||||||
},
|
},
|
||||||
"react-native-push-notification": {
|
|
||||||
"version": "6.1.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/react-native-push-notification/-/react-native-push-notification-6.1.3.tgz",
|
|
||||||
"integrity": "sha512-qNbFCkObCXwSFQbK6hJyx1Bym1D7V4XM8iN2L6eL3GAdNLmeBTdLdx3mPbKJtuaDJ1+deniFTQ2rz6hU4ELOXA=="
|
|
||||||
},
|
|
||||||
"react-push-notification": {
|
|
||||||
"version": "1.3.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/react-push-notification/-/react-push-notification-1.3.0.tgz",
|
|
||||||
"integrity": "sha512-hyYKZqwtNOgRP74fAafVIivEr99vUtH0nDgcWkPKd302BhMuUMr5wuuEX236bSbCoM4nxlOge1m0CKIEtWBqLA=="
|
|
||||||
},
|
|
||||||
"react-refresh": {
|
"react-refresh": {
|
||||||
"version": "0.8.3",
|
"version": "0.8.3",
|
||||||
"resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.8.3.tgz",
|
"resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.8.3.tgz",
|
||||||
@ -15293,11 +15252,7 @@
|
|||||||
"version": "1.2.13",
|
"version": "1.2.13",
|
||||||
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz",
|
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz",
|
||||||
"integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==",
|
"integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==",
|
||||||
"optional": true,
|
"optional": true
|
||||||
"requires": {
|
|
||||||
"bindings": "^1.5.0",
|
|
||||||
"nan": "^2.12.1"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"glob-parent": {
|
"glob-parent": {
|
||||||
"version": "3.1.0",
|
"version": "3.1.0",
|
||||||
@ -15883,11 +15838,7 @@
|
|||||||
"version": "1.2.13",
|
"version": "1.2.13",
|
||||||
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz",
|
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz",
|
||||||
"integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==",
|
"integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==",
|
||||||
"optional": true,
|
"optional": true
|
||||||
"requires": {
|
|
||||||
"bindings": "^1.5.0",
|
|
||||||
"nan": "^2.12.1"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"glob-parent": {
|
"glob-parent": {
|
||||||
"version": "3.1.0",
|
"version": "3.1.0",
|
||||||
|
@ -7,12 +7,8 @@
|
|||||||
"@testing-library/react": "^11.1.2",
|
"@testing-library/react": "^11.1.2",
|
||||||
"@testing-library/user-event": "^12.2.2",
|
"@testing-library/user-event": "^12.2.2",
|
||||||
"axios": "^0.21.0",
|
"axios": "^0.21.0",
|
||||||
"moment": "^2.29.1",
|
|
||||||
"react": "^17.0.1",
|
"react": "^17.0.1",
|
||||||
"react-axios": "^2.0.3",
|
|
||||||
"react-dom": "^17.0.1",
|
"react-dom": "^17.0.1",
|
||||||
"react-native-push-notification": "^6.1.3",
|
|
||||||
"react-push-notification": "^1.3.0",
|
|
||||||
"react-router-dom": "^5.2.0",
|
"react-router-dom": "^5.2.0",
|
||||||
"react-scripts": "4.0.0",
|
"react-scripts": "4.0.0",
|
||||||
"web-vitals": "^0.2.4"
|
"web-vitals": "^0.2.4"
|
||||||
|
@ -1,53 +0,0 @@
|
|||||||
{
|
|
||||||
"DepartureBoard": {
|
|
||||||
"noNamespaceSchemaLocation": "http://api.vasttrafik.se/v1/hafasRestDepartureBoard.xsd",
|
|
||||||
"servertime": "09:38",
|
|
||||||
"serverdate": "2020-12-11",
|
|
||||||
"Departures": [
|
|
||||||
{
|
|
||||||
"name": "Buss MEXP",
|
|
||||||
"sname": "MEXP",
|
|
||||||
"journeyNumber": "22",
|
|
||||||
"type": "BUS",
|
|
||||||
"stopid": "9022014014751002",
|
|
||||||
"stop": "Guddeby",
|
|
||||||
"time": "09:40",
|
|
||||||
"date": "2020-12-11",
|
|
||||||
"journeyid": "9015014621000022",
|
|
||||||
"direction": "Marstrand",
|
|
||||||
"track": "B",
|
|
||||||
"rtTime": "09:44",
|
|
||||||
"rtDate": "2020-12-11",
|
|
||||||
"fgColor": "#006C93",
|
|
||||||
"bgColor": "#FFFFFF",
|
|
||||||
"stroke": "Solid",
|
|
||||||
"accessibility": "wheelChair",
|
|
||||||
"JourneyDetailRef": {
|
|
||||||
"ref": "https://api.vasttrafik.se/bin/rest.exe/v2/journeyDetail?ref=715722%2F247121%2F629948%2F76401%2F80%3Fdate%3D2020-12-11%26station_evaId%3D14751002%26station_type%3Ddep%26format%3Djson%26"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Buss 927",
|
|
||||||
"sname": "927",
|
|
||||||
"journeyNumber": "2",
|
|
||||||
"type": "BUS",
|
|
||||||
"stopid": "9022014014751002",
|
|
||||||
"stop": "Guddeby",
|
|
||||||
"time": "12:29",
|
|
||||||
"date": "2020-12-11",
|
|
||||||
"journeyid": "9015014692700002",
|
|
||||||
"direction": "Tjuvkil",
|
|
||||||
"track": "B",
|
|
||||||
"rtTime": "12:30",
|
|
||||||
"rtDate": "2020-12-11",
|
|
||||||
"fgColor": "#006C93",
|
|
||||||
"bgColor": "#FFFFFF",
|
|
||||||
"stroke": "Solid",
|
|
||||||
"accessibility": "wheelChair",
|
|
||||||
"JourneyDetailRef": {
|
|
||||||
"ref": "https://api.vasttrafik.se/bin/rest.exe/v2/journeyDetail?ref=286581%2F125303%2F109682%2F40686%2F80%3Fdate%3D2020-12-11%26station_evaId%3D14751002%26station_type%3Ddep%26format%3Djson%26"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,53 +0,0 @@
|
|||||||
{
|
|
||||||
"DepartureBoard": {
|
|
||||||
"noNamespaceSchemaLocation": "http://api.vasttrafik.se/v1/hafasRestDepartureBoard.xsd",
|
|
||||||
"servertime": "09:41",
|
|
||||||
"serverdate": "2020-12-11",
|
|
||||||
"Departures": [
|
|
||||||
{
|
|
||||||
"name": "Buss MEXP",
|
|
||||||
"sname": "MEXP",
|
|
||||||
"journeyNumber": "22",
|
|
||||||
"type": "BUS",
|
|
||||||
"stopid": "9022014014010002",
|
|
||||||
"stop": "Hålta kyrka",
|
|
||||||
"time": "09:47",
|
|
||||||
"date": "2020-12-11",
|
|
||||||
"journeyid": "9015014621000022",
|
|
||||||
"direction": "Marstrand",
|
|
||||||
"track": "B",
|
|
||||||
"rtTime": "09:50",
|
|
||||||
"rtDate": "2020-12-11",
|
|
||||||
"fgColor": "#006C93",
|
|
||||||
"bgColor": "#FFFFFF",
|
|
||||||
"stroke": "Solid",
|
|
||||||
"accessibility": "wheelChair",
|
|
||||||
"JourneyDetailRef": {
|
|
||||||
"ref": "https://api.vasttrafik.se/bin/rest.exe/v2/journeyDetail?ref=514476%2F180039%2F54148%2F144419%2F80%3Fdate%3D2020-12-11%26station_evaId%3D14010002%26station_type%3Ddep%26format%3Djson%26"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Buss 927",
|
|
||||||
"sname": "927",
|
|
||||||
"journeyNumber": "2",
|
|
||||||
"type": "BUS",
|
|
||||||
"stopid": "9022014014010002",
|
|
||||||
"stop": "Hålta kyrka",
|
|
||||||
"time": "12:38",
|
|
||||||
"date": "2020-12-11",
|
|
||||||
"journeyid": "9015014692700002",
|
|
||||||
"direction": "Tjuvkil",
|
|
||||||
"track": "B",
|
|
||||||
"rtTime": "12:38",
|
|
||||||
"rtDate": "2020-12-11",
|
|
||||||
"fgColor": "#006C93",
|
|
||||||
"bgColor": "#FFFFFF",
|
|
||||||
"stroke": "Solid",
|
|
||||||
"accessibility": "wheelChair",
|
|
||||||
"JourneyDetailRef": {
|
|
||||||
"ref": "https://api.vasttrafik.se/bin/rest.exe/v2/journeyDetail?ref=667647%2F252325%2F917844%2F236373%2F80%3Fdate%3D2020-12-11%26station_evaId%3D14010002%26station_type%3Ddep%26format%3Djson%26"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,53 +0,0 @@
|
|||||||
{
|
|
||||||
"DepartureBoard": {
|
|
||||||
"noNamespaceSchemaLocation": "http://api.vasttrafik.se/v1/hafasRestDepartureBoard.xsd",
|
|
||||||
"servertime": "09:44",
|
|
||||||
"serverdate": "2020-12-11",
|
|
||||||
"Departures": [
|
|
||||||
{
|
|
||||||
"name": "Buss MEXP",
|
|
||||||
"sname": "MEXP",
|
|
||||||
"journeyNumber": "22",
|
|
||||||
"type": "BUS",
|
|
||||||
"stopid": "9022014014614002",
|
|
||||||
"stop": "Stenskärsvägen",
|
|
||||||
"time": "09:52",
|
|
||||||
"date": "2020-12-11",
|
|
||||||
"journeyid": "9015014621000022",
|
|
||||||
"direction": "Marstrand",
|
|
||||||
"track": "B",
|
|
||||||
"rtTime": "09:57",
|
|
||||||
"rtDate": "2020-12-11",
|
|
||||||
"fgColor": "#006C93",
|
|
||||||
"bgColor": "#FFFFFF",
|
|
||||||
"stroke": "Solid",
|
|
||||||
"accessibility": "wheelChair",
|
|
||||||
"JourneyDetailRef": {
|
|
||||||
"ref": "https://api.vasttrafik.se/bin/rest.exe/v2/journeyDetail?ref=341064%2F122235%2F154456%2F36461%2F80%3Fdate%3D2020-12-11%26station_evaId%3D14614002%26station_type%3Ddep%26format%3Djson%26"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Buss 320",
|
|
||||||
"sname": "320",
|
|
||||||
"journeyNumber": "10",
|
|
||||||
"type": "BUS",
|
|
||||||
"stopid": "9022014014614002",
|
|
||||||
"stop": "Stenskärsvägen",
|
|
||||||
"time": "10:44",
|
|
||||||
"date": "2020-12-11",
|
|
||||||
"journeyid": "9015014632000010",
|
|
||||||
"direction": "Tjuvkil",
|
|
||||||
"track": "B",
|
|
||||||
"rtTime": "10:44",
|
|
||||||
"rtDate": "2020-12-11",
|
|
||||||
"fgColor": "#006C93",
|
|
||||||
"bgColor": "#FFFFFF",
|
|
||||||
"stroke": "Solid",
|
|
||||||
"accessibility": "wheelChair",
|
|
||||||
"JourneyDetailRef": {
|
|
||||||
"ref": "https://api.vasttrafik.se/bin/rest.exe/v2/journeyDetail?ref=931884%2F318653%2F795430%2F87087%2F80%3Fdate%3D2020-12-11%26station_evaId%3D14614002%26station_type%3Ddep%26format%3Djson%26"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,29 +0,0 @@
|
|||||||
{
|
|
||||||
"DepartureBoard": {
|
|
||||||
"noNamespaceSchemaLocation": "http://api.vasttrafik.se/v1/hafasRestDepartureBoard.xsd",
|
|
||||||
"servertime": "09:45",
|
|
||||||
"serverdate": "2020-12-11",
|
|
||||||
"Departures": [{
|
|
||||||
"name": "Buss 928",
|
|
||||||
"sname": "928",
|
|
||||||
"journeyNumber": "10",
|
|
||||||
"type": "BUS",
|
|
||||||
"stopid": "9022014014225001",
|
|
||||||
"stop": "Skrämmenborg",
|
|
||||||
"time": "15:19",
|
|
||||||
"date": "2020-12-11",
|
|
||||||
"journeyid": "9015014692800010",
|
|
||||||
"direction": "Kärna",
|
|
||||||
"track": "A",
|
|
||||||
"rtTime": "15:19",
|
|
||||||
"rtDate": "2020-12-11",
|
|
||||||
"fgColor": "#006C93",
|
|
||||||
"bgColor": "#FFFFFF",
|
|
||||||
"stroke": "Solid",
|
|
||||||
"accessibility": "wheelChair",
|
|
||||||
"JourneyDetailRef": {
|
|
||||||
"ref": "https://api.vasttrafik.se/bin/rest.exe/v2/journeyDetail?ref=110424%2F37130%2F997492%2F461938%2F80%3Fdate%3D2020-12-11%26station_evaId%3D14225001%26station_type%3Ddep%26format%3Djson%26"
|
|
||||||
}
|
|
||||||
}]
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,12 +0,0 @@
|
|||||||
{
|
|
||||||
"situationNumber": "RT1",
|
|
||||||
"severity":"normal",
|
|
||||||
"title":"Nabbensbergsvägen närmast Edsvägen helt avstängd och trafiken hänvisas istället via Korsebergsvägen. Samtidigt tas den tillfälliga förbifarten bort på Edsvägen och trafiken kommer att ledas förbi den nya cirkulationsplatsen i de två västra körfälten tills arbetet på Nabbensbergsvägen är klart Hastighet: 50km/h",
|
|
||||||
"time":"00:07",
|
|
||||||
"affectedStopPoints":[
|
|
||||||
{
|
|
||||||
"gid": "9022014014614001",
|
|
||||||
"name": "Stenskärsvägen"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
@ -1,20 +0,0 @@
|
|||||||
{
|
|
||||||
"situationNumber": "RT2",
|
|
||||||
"severity":"normal",
|
|
||||||
"title":"På grund av renovation av Nordreälvsbron i Kungälv från 10 november, 2019 till sommaren 2022 är det risk för förseningar på vissa Västtrafik bussar.",
|
|
||||||
"time":"00:09",
|
|
||||||
"affectedStopPoints":[
|
|
||||||
{
|
|
||||||
"gid": "9022014014751001",
|
|
||||||
"name": "Guddeby"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"gid": "9022014014010001",
|
|
||||||
"name": "Hålta kyrka"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"gid": "9022014014614001",
|
|
||||||
"name": "Stenskärsvägen"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
@ -1,36 +0,0 @@
|
|||||||
{
|
|
||||||
"LocationList": {
|
|
||||||
"noNamespaceSchemaLocation": "http://api.vasttrafik.se/v1/hafasRestLocation.xsd",
|
|
||||||
"servertime": "09:34",
|
|
||||||
"serverdate": "2020-12-11",
|
|
||||||
"StopLocation": [
|
|
||||||
{
|
|
||||||
"name": "Guddeby",
|
|
||||||
"id": "9022014014751001",
|
|
||||||
"lat": "57.874665",
|
|
||||||
"lon": "11.903884",
|
|
||||||
"track": "A"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Guddeby",
|
|
||||||
"id": "9021014014751000",
|
|
||||||
"lat": "57.874710",
|
|
||||||
"lon": "11.903929"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Guddeby",
|
|
||||||
"id": "9022014014751002",
|
|
||||||
"lat": "57.874746",
|
|
||||||
"lon": "11.903965",
|
|
||||||
"track": "B"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Stället",
|
|
||||||
"id": "9022014014744001",
|
|
||||||
"lat": "57.869784",
|
|
||||||
"lon": "11.904172",
|
|
||||||
"track": "A"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,36 +0,0 @@
|
|||||||
{
|
|
||||||
"LocationList": {
|
|
||||||
"noNamespaceSchemaLocation": "http://api.vasttrafik.se/v1/hafasRestLocation.xsd",
|
|
||||||
"servertime": "09:35",
|
|
||||||
"serverdate": "2020-12-11",
|
|
||||||
"StopLocation": [
|
|
||||||
{
|
|
||||||
"name": "Hålta kyrka",
|
|
||||||
"id": "9022014014010001",
|
|
||||||
"lat": "57.895125",
|
|
||||||
"lon": "11.827854",
|
|
||||||
"track": "A"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Hålta kyrka",
|
|
||||||
"id": "9021014014010000",
|
|
||||||
"lat": "57.895206",
|
|
||||||
"lon": "11.827647"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Hålta kyrka",
|
|
||||||
"id": "9022014014010002",
|
|
||||||
"lat": "57.895278",
|
|
||||||
"lon": "11.827440",
|
|
||||||
"track": "B"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Hålta skola",
|
|
||||||
"id": "9022014014015001",
|
|
||||||
"lat": "57.896015",
|
|
||||||
"lon": "11.824555",
|
|
||||||
"track": "A"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,36 +0,0 @@
|
|||||||
{
|
|
||||||
"LocationList": {
|
|
||||||
"noNamespaceSchemaLocation": "http://api.vasttrafik.se/v1/hafasRestLocation.xsd",
|
|
||||||
"servertime": "09:36",
|
|
||||||
"serverdate": "2020-12-11",
|
|
||||||
"StopLocation": [
|
|
||||||
{
|
|
||||||
"name": "Stenskärsvägen",
|
|
||||||
"id": "9022014014614001",
|
|
||||||
"lat": "57.894594",
|
|
||||||
"lon": "11.740128",
|
|
||||||
"track": "A"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Stenskärsvägen",
|
|
||||||
"id": "9022014014614002",
|
|
||||||
"lat": "57.894729",
|
|
||||||
"lon": "11.739984",
|
|
||||||
"track": "B"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Stenskärsvägen",
|
|
||||||
"id": "9021014014614000",
|
|
||||||
"lat": "57.894738",
|
|
||||||
"lon": "11.739858"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Tjuvkilsboden",
|
|
||||||
"id": "9022014014615002",
|
|
||||||
"lat": "57.892743",
|
|
||||||
"lon": "11.743490",
|
|
||||||
"track": "B"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,35 +0,0 @@
|
|||||||
{
|
|
||||||
"LocationList": {
|
|
||||||
"noNamespaceSchemaLocation": "http://api.vasttrafik.se/v1/hafasRestLocation.xsd",
|
|
||||||
"servertime": "09:37",
|
|
||||||
"serverdate": "2020-12-11",
|
|
||||||
"StopLocation": [
|
|
||||||
{
|
|
||||||
"name": "Kuröd",
|
|
||||||
"id": "9022014014762001",
|
|
||||||
"lat": "57.856687",
|
|
||||||
"lon": "11.864727",
|
|
||||||
"track": "A"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Kuröd",
|
|
||||||
"id": "9021014014762000",
|
|
||||||
"lat": "57.856831",
|
|
||||||
"lon": "11.864260"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Kuröd",
|
|
||||||
"id": "9022014014762002",
|
|
||||||
"lat": "57.856966",
|
|
||||||
"lon": "11.863774",
|
|
||||||
"track": "B"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Skrämmenborg",
|
|
||||||
"id": "9021014014225000",
|
|
||||||
"lat": "57.863528",
|
|
||||||
"lon": "11.867406"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "Användare 1",
|
|
||||||
"deviceId": "1",
|
|
||||||
"stoppointgid": "9022014014751001"
|
|
||||||
}
|
|
@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "Användare 2",
|
|
||||||
"deviceId": "2",
|
|
||||||
"stoppointgid": "9022014014010001"
|
|
||||||
}
|
|
@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "Användare 3",
|
|
||||||
"deviceId": "3",
|
|
||||||
"stoppointgid": "9022014014614001"
|
|
||||||
}
|
|
@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "Användare 4",
|
|
||||||
"deviceId": "4",
|
|
||||||
"stoppointgid": "9022014014762001"
|
|
||||||
}
|
|
68
src/App.js
68
src/App.js
@ -1,38 +1,28 @@
|
|||||||
import "./variables.css";
|
import './variables.css';
|
||||||
import "./App.css";
|
import './App.css';
|
||||||
|
|
||||||
import React, { Component } from "react";
|
import React, { Component } from 'react';
|
||||||
import { BrowserRouter as Router, Route, Link } from "react-router-dom";
|
import { BrowserRouter as Router, Route } from 'react-router-dom';
|
||||||
import Snackbar from "@material-ui/core/Snackbar";
|
|
||||||
import IconButton from "@material-ui/core/IconButton";
|
|
||||||
|
|
||||||
import globalData from './GlobalData.js';
|
import NavigationDrawer from './components/NavigationDrawer.js'
|
||||||
import BottomMenu from "./components/BottomMenu.js";
|
import BottomMenu from './components/BottomMenu.js'
|
||||||
|
import AccessToken from './components/AccessToken.js'
|
||||||
|
import NearbyStation from './components/NearbyStation';
|
||||||
|
|
||||||
import Tickets from "./components/pages/Tickets.js";
|
import Tickets from './components/pages/Tickets.js';
|
||||||
import TicketsBuy from "./components/pages/TicketsBuy.js";
|
import TicketsBuy from './components/pages/TicketsBuy.js';
|
||||||
import Travel from "./components/pages/Travel.js";
|
import Travel from './components/pages/Travel.js';
|
||||||
import TrafficInfo from "./components/pages/TrafficInfo.js";
|
import TrafficInfo from './components/pages/TrafficInfo.js';
|
||||||
|
|
||||||
import "./variables.css";
|
|
||||||
import warningIcon from './img/warning.svg';
|
|
||||||
import closeIcon from './img/close.svg';
|
|
||||||
|
|
||||||
|
import './variables.css';
|
||||||
|
|
||||||
class App extends Component {
|
class App extends Component {
|
||||||
currentPageName = () => {
|
|
||||||
if (globalData.currentPage.constructor !== undefined)
|
|
||||||
return globalData.currentPage.constructor.name;
|
|
||||||
else
|
|
||||||
return "";
|
|
||||||
};
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
globalData.root = this;
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Router>
|
<Router>
|
||||||
<div className="App">
|
<div className="App">
|
||||||
|
<NavigationDrawer />
|
||||||
|
|
||||||
<Route path="/" exact component={TicketsBuy} />
|
<Route path="/" exact component={TicketsBuy} />
|
||||||
<Route path="/tickets" exact component={Tickets} />
|
<Route path="/tickets" exact component={Tickets} />
|
||||||
<Route path="/ticketsBuy" exact component={TicketsBuy} />
|
<Route path="/ticketsBuy" exact component={TicketsBuy} />
|
||||||
@ -40,35 +30,9 @@ class App extends Component {
|
|||||||
<Route path="/traffic" exact component={TrafficInfo} />
|
<Route path="/traffic" exact component={TrafficInfo} />
|
||||||
|
|
||||||
<BottomMenu />
|
<BottomMenu />
|
||||||
|
|
||||||
<Snackbar
|
|
||||||
anchorOrigin={{ vertical: "bottom", horizontal: "center" }}
|
|
||||||
open={globalData.snackbarVisible}
|
|
||||||
autoHideDuration={3000}
|
|
||||||
onClose={() => globalData.snackbarVisible = false}
|
|
||||||
message={
|
|
||||||
<div id="snackDisruptInfo">
|
|
||||||
<img src={warningIcon} alt="" />
|
|
||||||
<span id="message-id">Trafikstörning upptäckt</span>
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
action={[
|
|
||||||
<IconButton
|
|
||||||
key="close"
|
|
||||||
aria-label="Close"
|
|
||||||
color="inherit"
|
|
||||||
onClick={() => { globalData.snackbarVisible = false; globalData.root.forceUpdate() }}
|
|
||||||
>
|
|
||||||
{this.currentPageName() !== "TrafficInfo" &&
|
|
||||||
<Link to="/traffic">Visa trafikinfo</Link>
|
|
||||||
}
|
|
||||||
<img src={closeIcon} alt="" />
|
|
||||||
</IconButton>,
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</Router>
|
</Router>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,21 +0,0 @@
|
|||||||
import User from './classes/User.js';
|
|
||||||
import Disruption from './classes/Disruption.js'
|
|
||||||
import Coordinates from './classes/Coordinates.js';
|
|
||||||
import Stop from './classes/Stop.js'
|
|
||||||
|
|
||||||
let globalData = {
|
|
||||||
users : [],
|
|
||||||
user: new User(
|
|
||||||
"Exempelanvändare",
|
|
||||||
"123",
|
|
||||||
new Coordinates(),
|
|
||||||
"123"
|
|
||||||
),
|
|
||||||
disruption: new Disruption(
|
|
||||||
),
|
|
||||||
stop: new Stop(
|
|
||||||
),
|
|
||||||
currentPage: ""
|
|
||||||
};
|
|
||||||
|
|
||||||
export default globalData;
|
|
@ -1,20 +0,0 @@
|
|||||||
import axios from 'axios';
|
|
||||||
|
|
||||||
class AccessToken {
|
|
||||||
credentials = 'NXR5N2d4bUFmUWxVSERIZG03a2dhcVh3SzVJYTp3cElPVVJuSkpjVHRPNnJPUlltWVlQcTR3WGth'
|
|
||||||
device = '123'
|
|
||||||
|
|
||||||
constructor() {
|
|
||||||
const headers = {
|
|
||||||
'Content-Type': 'application/x-www-form-urlencoded',
|
|
||||||
'Authorization': 'Basic ' + this.credentials
|
|
||||||
};
|
|
||||||
|
|
||||||
axios.post('https://api.vasttrafik.se/token','grant_type=client_credentials&scope=device_'+this.device, {headers} )
|
|
||||||
.then(response => {
|
|
||||||
this.token = response.data.access_token
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default AccessToken
|
|
@ -3,20 +3,15 @@
|
|||||||
|
|
||||||
lineName : String (Linjenamnet)
|
lineName : String (Linjenamnet)
|
||||||
finalStop : Stop (Ändhållplats)
|
finalStop : Stop (Ändhållplats)
|
||||||
originalTime : String (Ursprunglig Avgångstid)
|
time : String (Avgångstid)
|
||||||
newTime : String (Ny Avgångstid)
|
|
||||||
trafficInfo : String (Trafikinformation)
|
trafficInfo : String (Trafikinformation)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class Departure {
|
class Departure {
|
||||||
constructor(lineName, finalStop, originalTime) {
|
constructor(lineName, finalStop, time, trafficInfo) {
|
||||||
this.sname = lineName;
|
this.lineName = lineName;
|
||||||
this.direction = finalStop;
|
this.finalStop = finalStop;
|
||||||
this.time = originalTime;
|
this.time = time;
|
||||||
}
|
|
||||||
|
|
||||||
timeUpdate(time, trafficInfo) {
|
|
||||||
this.newTime = time;
|
|
||||||
this.trafficInfo = trafficInfo;
|
this.trafficInfo = trafficInfo;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
|
|
||||||
class Disruption {
|
|
||||||
constructor(situationNumber, severity, title, affectedStopPoints) {
|
|
||||||
this.situationNumber = situationNumber;
|
|
||||||
this.severity = severity;
|
|
||||||
this.title = title;
|
|
||||||
this.affectedStopPoints = affectedStopPoints;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Disruption;
|
|
@ -7,25 +7,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
class Stop {
|
class Stop {
|
||||||
constructor(name, id, lat, lon, locations, departures) {
|
constructor(name, locations, departures) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.id = id;
|
|
||||||
this.lat = lat;
|
|
||||||
this.lon = lon;
|
|
||||||
this.locations = locations;
|
this.locations = locations;
|
||||||
this.departures = departures;
|
this.departures = departures;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
Från västtrafiks api ett element i listan av hållplatser ser ut som följande
|
|
||||||
"id": "string",
|
|
||||||
"lon": "string",
|
|
||||||
"idx": "string",
|
|
||||||
"weight": "string",
|
|
||||||
"name": "string",
|
|
||||||
"track": "string",
|
|
||||||
"lat": "string"
|
|
||||||
*/
|
|
||||||
|
|
||||||
export default Stop;
|
export default Stop;
|
@ -1,19 +1,14 @@
|
|||||||
/*
|
/*
|
||||||
Denna klass är en modell för användare.
|
Denna klass är en modell för användare.
|
||||||
|
|
||||||
name : String (Användarnamn)
|
deviceId : String (Enhetens ID)
|
||||||
deviceId : Int (Enhetens ID)
|
|
||||||
location : Coordinates (Användarens koordinater)
|
location : Coordinates (Användarens koordinater)
|
||||||
track : String (Nuvarande hållplatsläge)
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class User {
|
class User {
|
||||||
constructor(name, deviceId, location, stoppointgid, track) {
|
constructor(deviceId, location) {
|
||||||
this.name = name;
|
|
||||||
this.deviceId = deviceId;
|
this.deviceId = deviceId;
|
||||||
this.location = location;
|
this.location = location;
|
||||||
this.stoppointgid = stoppointgid;
|
|
||||||
this.track = track;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
65
src/components/AccessToken.js
Normal file
65
src/components/AccessToken.js
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import axios from 'axios';
|
||||||
|
|
||||||
|
var globToken = ''
|
||||||
|
|
||||||
|
const GetToken = () => {
|
||||||
|
const vars = {
|
||||||
|
credentials: 'NXR5N2d4bUFmUWxVSERIZG03a2dhcVh3SzVJYTp3cElPVVJuSkpjVHRPNnJPUlltWVlQcTR3WGth',
|
||||||
|
token: undefined,
|
||||||
|
device: '123',
|
||||||
|
}
|
||||||
|
|
||||||
|
const headers = {
|
||||||
|
'Content-Type': 'application/x-www-form-urlencoded',
|
||||||
|
'Authorization': 'Basic ' + vars.credentials
|
||||||
|
};
|
||||||
|
|
||||||
|
axios.post('https://api.vasttrafik.se/token','grant_type=client_credentials&scope=device_'+vars.device, { headers })
|
||||||
|
.then(response => {
|
||||||
|
console.log(response);
|
||||||
|
globToken = response.data.access_token
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
class AccessToken extends React.Component {
|
||||||
|
state = {
|
||||||
|
token: 'No Token',
|
||||||
|
}
|
||||||
|
|
||||||
|
handleChange = event => {
|
||||||
|
this.setState({ token: event.target.value});
|
||||||
|
}
|
||||||
|
|
||||||
|
handleSubmit = event => {
|
||||||
|
event.preventDefault();
|
||||||
|
|
||||||
|
this.setState({
|
||||||
|
credentials: 'Attempting to send token'
|
||||||
|
});
|
||||||
|
GetToken();
|
||||||
|
}
|
||||||
|
|
||||||
|
handleFetch = event => {
|
||||||
|
event.preventDefault();
|
||||||
|
this.setState({token: globToken})
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<form onSubmit={this.handleSubmit}>
|
||||||
|
<button type="submit">Get Token</button>
|
||||||
|
</form>
|
||||||
|
<h1>
|
||||||
|
{this.state.token}
|
||||||
|
</h1>
|
||||||
|
<form onSubmit={this.handleFetch}>
|
||||||
|
<button type="submit">fetch</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default AccessToken
|
@ -1,30 +1,14 @@
|
|||||||
import React, { Component } from 'react';
|
import React, {Component} from 'react';
|
||||||
|
|
||||||
import './css/Button.css';
|
|
||||||
|
|
||||||
|
|
||||||
class Button extends Component {
|
class Button extends Component {
|
||||||
// Multiple onClick functions
|
|
||||||
onClick = () => {
|
|
||||||
if (this.props.onClick !== null
|
|
||||||
&& this.props.onClick !== undefined) {
|
|
||||||
if (Array.isArray(this.props.onClick)) {
|
|
||||||
this.props.onClick.forEach(func => {
|
|
||||||
func();
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
console.log("Error when parsing Button onClick functions. Make sure the functions are passed as an array.");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<button className={this.props.className} onClick={this.onClick}>
|
<a href={this.props.destination}>
|
||||||
{this.props.children}
|
{this.props.title}
|
||||||
</button>
|
</a>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// TODO Add css
|
||||||
export default Button;
|
export default Button
|
||||||
|
@ -1,57 +0,0 @@
|
|||||||
import React from 'react';
|
|
||||||
import axios from 'axios';
|
|
||||||
import AccessToken from '../classes/AccessToken'
|
|
||||||
|
|
||||||
class Diruption extends React.Component {
|
|
||||||
state = {
|
|
||||||
gid: '9022014005700002',
|
|
||||||
disruptions: [],
|
|
||||||
token: undefined,
|
|
||||||
tokenClass: new AccessToken()
|
|
||||||
}
|
|
||||||
|
|
||||||
handleChangeGid = event => {
|
|
||||||
this.setState({ lat: event.target.value});
|
|
||||||
}
|
|
||||||
|
|
||||||
handleSubmit = event => {
|
|
||||||
event.preventDefault();
|
|
||||||
|
|
||||||
const headers = {
|
|
||||||
'Authorization': 'Bearer ' + this.state.tokenClass.token
|
|
||||||
};
|
|
||||||
|
|
||||||
axios.get('https://api.vasttrafik.se/ts/v1/traffic-situations/stoppoint/'+this.state.gid, { headers })
|
|
||||||
//axios.get('https://api.vasttrafik.se/ts/v1/traffic-situations/stoppoint/9022014005700002', { headers })
|
|
||||||
.then(response => {
|
|
||||||
this.setState({
|
|
||||||
disruptions: response.data
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
<form onSubmit={this.handleSubmit}>
|
|
||||||
<label>
|
|
||||||
Stoppoint Gid:
|
|
||||||
<input type="text" name="gid" onChange={this.handleChangeGid} />
|
|
||||||
</label>
|
|
||||||
<button type="submit">Find traffic disruptions</button>
|
|
||||||
</form>
|
|
||||||
<h1>
|
|
||||||
{this.state.gid}
|
|
||||||
</h1>
|
|
||||||
{this.state.disruptions.map((item) =>
|
|
||||||
<div>
|
|
||||||
<h1>
|
|
||||||
{item.description}
|
|
||||||
</h1>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
export default Diruption
|
|
@ -1,127 +0,0 @@
|
|||||||
import moment from "moment";
|
|
||||||
|
|
||||||
import globalData from '../GlobalData.js';
|
|
||||||
import Button from './Button.js';
|
|
||||||
|
|
||||||
import user1 from '../APIexamples/user1.json'
|
|
||||||
import user2 from '../APIexamples/user2.json'
|
|
||||||
import user3 from '../APIexamples/user3.json'
|
|
||||||
import user4 from '../APIexamples/user4.json'
|
|
||||||
|
|
||||||
import locationuser1 from '../APIexamples/locationuser1.json'
|
|
||||||
import locationuser2 from '../APIexamples/locationuser2.json'
|
|
||||||
import locationuser3 from '../APIexamples/locationuser3.json'
|
|
||||||
import locationuser4 from '../APIexamples/locationuser4.json'
|
|
||||||
|
|
||||||
import departureuser1 from '../APIexamples/departureuser1.json'
|
|
||||||
import departureuser2 from '../APIexamples/departureuser2.json'
|
|
||||||
import departureuser3 from '../APIexamples/departureuser3.json'
|
|
||||||
import departureuser4 from '../APIexamples/departureuser4.json'
|
|
||||||
|
|
||||||
import ex1 from '../APIexamples/disruption1.json'
|
|
||||||
import ex2 from '../APIexamples/disruption2.json'
|
|
||||||
|
|
||||||
|
|
||||||
class DisruptionButton extends Button {
|
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
this.state = {
|
|
||||||
jsonLocation: this.props.path,
|
|
||||||
disruption: "",
|
|
||||||
u1: user1,
|
|
||||||
u2: user2,
|
|
||||||
u3: user3,
|
|
||||||
u4: user4,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
updatePage = () => {
|
|
||||||
globalData.currentPage.forceUpdate();
|
|
||||||
}
|
|
||||||
|
|
||||||
showMomentTime = (time) => {
|
|
||||||
return (time.format("HH:mm"))
|
|
||||||
}
|
|
||||||
|
|
||||||
genUsers = () => {
|
|
||||||
if (globalData.users.length < 2) {
|
|
||||||
this.state.first = true;
|
|
||||||
this.state.u1.stop = locationuser1.LocationList.StopLocation[0];
|
|
||||||
this.state.u1.stop.departures = departureuser1.DepartureBoard.Departures;
|
|
||||||
this.state.u2.stop = locationuser2.LocationList.StopLocation[0];
|
|
||||||
this.state.u2.stop.departures = departureuser2.DepartureBoard.Departures;
|
|
||||||
this.state.u3.stop = locationuser3.LocationList.StopLocation[0];
|
|
||||||
this.state.u3.stop.departures = departureuser3.DepartureBoard.Departures;
|
|
||||||
this.state.u4.stop = locationuser4.LocationList.StopLocation[0];
|
|
||||||
this.state.u4.stop.departures = departureuser4.DepartureBoard.Departures;
|
|
||||||
globalData.users = [
|
|
||||||
this.state.u1,
|
|
||||||
this.state.u2,
|
|
||||||
this.state.u3,
|
|
||||||
this.state.u4
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
genDisrupt = () => {
|
|
||||||
this.genUsers()
|
|
||||||
|
|
||||||
this.state.disruption = undefined
|
|
||||||
if (this.state.jsonLocation === "ex1") {
|
|
||||||
for (let stopPoint of ex1.affectedStopPoints) {
|
|
||||||
for (let user of globalData.users) {
|
|
||||||
if (stopPoint.gid === user.stoppointgid) {
|
|
||||||
this.state.disruption = ex1;
|
|
||||||
var old1t = moment(user.stop.departures[0].time, "HH:mm");
|
|
||||||
old1t.add(ex1.time, "HH:mm");
|
|
||||||
user.stop.departures[0].newTime = this.showMomentTime(old1t);
|
|
||||||
user.stop.departures[0].trafficInfo = ex1.title;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (stopPoint.gid === globalData.user.stoppointgid) {
|
|
||||||
this.state.disruption = ex1;
|
|
||||||
var old2t = moment(globalData.stop.departures[0].time, "HH:mm");
|
|
||||||
old2t.add(ex1.time, "HH:mm");
|
|
||||||
globalData.stop.departures[0].newTime = this.showMomentTime(old2t);
|
|
||||||
globalData.stop.departures[0].trafficInfo = ex1.title;
|
|
||||||
globalData.snackbarVisible = true; globalData.root.forceUpdate();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if (this.state.jsonLocation === "ex2") {
|
|
||||||
for (let stopPoint of ex2.affectedStopPoints) {
|
|
||||||
for (let user of globalData.users) {
|
|
||||||
if (stopPoint.gid === user.stoppointgid) {
|
|
||||||
this.state.disruption = ex2;
|
|
||||||
var old3t = moment(user.stop.departures[0].time, "HH:mm");
|
|
||||||
old3t.add(ex2.time, "HH:mm");
|
|
||||||
user.stop.departures[0].newTime = this.showMomentTime(old3t);
|
|
||||||
user.stop.departures[0].trafficInfo = ex2.title;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (stopPoint.gid === globalData.user.stoppointgid) {
|
|
||||||
this.state.disruption = ex2;
|
|
||||||
var old4t = moment(globalData.stop.departures[0].time, "HH:mm");
|
|
||||||
old4t.add(ex2.time, "HH:mm");
|
|
||||||
globalData.stop.departures[0].newTime = this.showMomentTime(old4t);
|
|
||||||
globalData.stop.departures[0].trafficInfo = ex2.title;
|
|
||||||
globalData.snackbarVisible = true; globalData.root.forceUpdate();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
globalData.disruption = this.state.disruption
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
<Button onClick={this.props.onClick.concat([this.genDisrupt, this.updatePage])} className="disruptBtn">
|
|
||||||
{this.props.children}
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
export default DisruptionButton;
|
|
@ -1,45 +0,0 @@
|
|||||||
|
|
||||||
import globalData from '../GlobalData.js';
|
|
||||||
|
|
||||||
import locationuser1 from '../APIexamples/locationuser1.json'
|
|
||||||
import locationuser2 from '../APIexamples/locationuser2.json'
|
|
||||||
import locationuser3 from '../APIexamples/locationuser3.json'
|
|
||||||
import locationuser4 from '../APIexamples/locationuser4.json'
|
|
||||||
|
|
||||||
import StopSelectButton from './StopSelectButton.js';
|
|
||||||
import Button from './Button.js';
|
|
||||||
import disruptIcon from '../img/flash.svg';
|
|
||||||
|
|
||||||
class FindStops extends Button {
|
|
||||||
state = {
|
|
||||||
locations : []
|
|
||||||
}
|
|
||||||
findStops = () => {
|
|
||||||
if(globalData.user.deviceId === "1"){
|
|
||||||
this.state.locations = locationuser1.LocationList.StopLocation
|
|
||||||
}else if (globalData.user.deviceId === "2"){
|
|
||||||
this.state.locations = locationuser2.LocationList.StopLocation
|
|
||||||
}else if (globalData.user.deviceId === "3"){
|
|
||||||
this.state.locations = locationuser3.LocationList.StopLocation
|
|
||||||
}else if (globalData.user.deviceId === "4"){
|
|
||||||
this.state.locations = locationuser4.LocationList.StopLocation
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<Button onClick={[this.findStops]} className="disruptBtn">
|
|
||||||
<img src={disruptIcon} alt="" />
|
|
||||||
<span>Select nearby stops</span>
|
|
||||||
</Button>
|
|
||||||
{this.state.locations.map((item) =>
|
|
||||||
<StopSelectButton stop={item}/>
|
|
||||||
)}
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
export default FindStops;
|
|
@ -1,31 +1,14 @@
|
|||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
|
|
||||||
import NavigationDrawer from './NavigationDrawer.js';
|
|
||||||
|
|
||||||
import './css/Header.css';
|
import './css/Header.css';
|
||||||
|
|
||||||
import navIcon from '../img/menu.svg'
|
import navIcon from '../img/menu.svg'
|
||||||
|
|
||||||
class Header extends Component {
|
class Header extends Component {
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
this.navDrawerElem = React.createRef();
|
|
||||||
}
|
|
||||||
|
|
||||||
handleClick = () => {
|
|
||||||
this.navDrawerElem.current.toggle();
|
|
||||||
};
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<>
|
<header>
|
||||||
<NavigationDrawer ref={this.navDrawerElem} />
|
<button id="navBtn"><img src={navIcon} /></button>
|
||||||
|
<h1 id="pageTitle">{this.props.title}</h1>
|
||||||
<header>
|
</header>
|
||||||
<button id="navBtn"><img src={navIcon} alt="" onClick={this.handleClick} /></button>
|
|
||||||
<h1 id="pageTitle">{this.props.title}</h1>
|
|
||||||
</header>
|
|
||||||
</>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@ import './css/MainArea.css';
|
|||||||
class MainArea extends Component {
|
class MainArea extends Component {
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<main style={this.props.style}>
|
<main>
|
||||||
{this.props.children}
|
{this.props.children}
|
||||||
</main>
|
</main>
|
||||||
);
|
);
|
||||||
|
@ -1,21 +1,20 @@
|
|||||||
import Button from './Button.js';
|
import React, { Component } from 'react';
|
||||||
|
|
||||||
|
class MenuButton extends Component {
|
||||||
class MenuButton extends Button {
|
|
||||||
render() {
|
render() {
|
||||||
if (this.props.childOrderReverse) {
|
if (this.props.childOrderReverse) {
|
||||||
return (
|
return (
|
||||||
<Button className="menuButton">
|
<button>
|
||||||
<span>{this.props.label}</span>
|
<span>{this.props.label}</span>
|
||||||
<img src={this.props.icon} alt="" />
|
<img src={this.props.icon}/>
|
||||||
</Button>
|
</button>
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return (
|
return (
|
||||||
<Button className="menuButton">
|
<button>
|
||||||
<img src={this.props.icon} alt="" />
|
<img src={this.props.icon}/>
|
||||||
<span>{this.props.label}</span>
|
<span>{this.props.label}</span>
|
||||||
</Button>
|
</button>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,87 +1,10 @@
|
|||||||
|
import './css/NavigationDrawer.css';
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
|
|
||||||
import globalData from '../GlobalData.js';
|
|
||||||
import DisruptionButton from "./DisruptionButton.js";
|
|
||||||
import SelectUserButton from "./SelectUserButton.js"
|
|
||||||
import Popup from './Popup.js';
|
|
||||||
import Button from './Button.js';
|
|
||||||
|
|
||||||
import './css/NavigationDrawer.css';
|
|
||||||
|
|
||||||
import userIcon from '../img/user.svg';
|
|
||||||
import disruptIcon from '../img/flash.svg';
|
|
||||||
|
|
||||||
|
|
||||||
class NavigationDrawer extends Component {
|
class NavigationDrawer extends Component {
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
this.popupElem = React.createRef();
|
|
||||||
}
|
|
||||||
|
|
||||||
state = {
|
|
||||||
open: false
|
|
||||||
};
|
|
||||||
|
|
||||||
toggle = () => {
|
|
||||||
if (this.state.open)
|
|
||||||
this.close();
|
|
||||||
else
|
|
||||||
this.open();
|
|
||||||
};
|
|
||||||
|
|
||||||
open = () => {
|
|
||||||
this.setState({
|
|
||||||
open: true
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
close = () => {
|
|
||||||
this.setState({
|
|
||||||
open: false
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
showPopup = () => {
|
|
||||||
this.popupElem.current.show();
|
|
||||||
};
|
|
||||||
|
|
||||||
hidePopup = () => {
|
|
||||||
this.popupElem.current.hide();
|
|
||||||
};
|
|
||||||
|
|
||||||
updatePage = () => {
|
|
||||||
globalData.currentPage.render();
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<>
|
<div id="navDrawer"></div>
|
||||||
<Popup ref={this.popupElem}>
|
|
||||||
<h3>Välj scenario:</h3>
|
|
||||||
<ul>
|
|
||||||
<li><DisruptionButton path={"ex1"} onClick={[this.hidePopup]}>Störningsscenario 1</DisruptionButton></li>
|
|
||||||
<li><DisruptionButton path={"ex2"} onClick={[this.hidePopup]}>Störningsscenario 2</DisruptionButton></li>
|
|
||||||
</ul>
|
|
||||||
</Popup>
|
|
||||||
|
|
||||||
<div id="navDrawer" className={`${this.state.open ? "open" : ""}`}>
|
|
||||||
<header>
|
|
||||||
<img src={userIcon} alt="" />
|
|
||||||
<span>{globalData.user.name}</span>
|
|
||||||
<span>example@gmail.com</span>
|
|
||||||
</header>
|
|
||||||
<div id="navList">
|
|
||||||
<SelectUserButton path={"user1"} username="Guddeby"/>
|
|
||||||
<SelectUserButton path={"user2"} username="Hålta kyrka"/>
|
|
||||||
<SelectUserButton path={"user3"} username="Stenskärsvägen"/>
|
|
||||||
<SelectUserButton path={"user4"} username="Kuröd"/>
|
|
||||||
<Button onClick={[this.showPopup, this.close]} className="disruptBtn"><img src={disruptIcon} alt="" />Generera Störning</Button>
|
|
||||||
</div>
|
|
||||||
<hr />
|
|
||||||
<span id="version">Projektgrupp 3 - Utmaning 7</span>
|
|
||||||
</div>
|
|
||||||
<div id="clickArea" className={`${this.state.open ? "" : "hidden"}`} onClick={this.close} />
|
|
||||||
</>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import AccessToken from '../classes/AccessToken';
|
|
||||||
import StopComponent from './StopComponent';
|
|
||||||
import Stop from '../classes/Stop';
|
|
||||||
|
|
||||||
class NearbyStation extends React.Component {
|
class NearbyStation extends React.Component {
|
||||||
state = {
|
state = {
|
||||||
@ -10,7 +7,7 @@ class NearbyStation extends React.Component {
|
|||||||
long: '12.0',
|
long: '12.0',
|
||||||
stops: [],
|
stops: [],
|
||||||
token: undefined,
|
token: undefined,
|
||||||
tokenClass: new AccessToken()
|
device: '123',
|
||||||
}
|
}
|
||||||
|
|
||||||
handleChangeLat = event => {
|
handleChangeLat = event => {
|
||||||
@ -21,15 +18,22 @@ class NearbyStation extends React.Component {
|
|||||||
this.setState({ long: event.target.value});
|
this.setState({ long: event.target.value});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
handleChangeToken = event => {
|
||||||
|
this.setState({ token: event.target.value})
|
||||||
|
}
|
||||||
|
|
||||||
handleSubmit = event => {
|
handleSubmit = event => {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
const headers = {
|
const headers = {
|
||||||
'Authorization': 'Bearer ' + this.state.tokenClass.token
|
'Authorization': 'Bearer ' + this.state.token
|
||||||
};
|
};
|
||||||
|
|
||||||
axios.get('https://api.vasttrafik.se/bin/rest.exe/v2/location.nearbystops?originCoordLat='+this.state.lat+'&originCoordLong='+this.state.long+'&maxNo=5&format=json', { headers })
|
console.log('Attempted connection')
|
||||||
|
|
||||||
|
axios.get('https://api.vasttrafik.se/bin/rest.exe/v2/location.nearbystops?originCoordLat='+this.state.lat+'&originCoordLong='+this.state.long+'&maxNo=20&format=json', { headers })
|
||||||
.then(response => {
|
.then(response => {
|
||||||
|
console.log(response.data.LocationList.StopLocation)
|
||||||
this.setState({
|
this.setState({
|
||||||
stops: response.data.LocationList.StopLocation,
|
stops: response.data.LocationList.StopLocation,
|
||||||
})
|
})
|
||||||
@ -48,6 +52,10 @@ class NearbyStation extends React.Component {
|
|||||||
Longitude coord:
|
Longitude coord:
|
||||||
<input type="text" name="long" onChange={this.handleChangeLong} />
|
<input type="text" name="long" onChange={this.handleChangeLong} />
|
||||||
</label>
|
</label>
|
||||||
|
<label>
|
||||||
|
Token:
|
||||||
|
<input type="text" name="token" onChange={this.handleChangeToken} />
|
||||||
|
</label>
|
||||||
<button type="submit">Stops</button>
|
<button type="submit">Stops</button>
|
||||||
</form>
|
</form>
|
||||||
<h1>
|
<h1>
|
||||||
@ -57,11 +65,32 @@ class NearbyStation extends React.Component {
|
|||||||
{this.state.long}
|
{this.state.long}
|
||||||
</h1>
|
</h1>
|
||||||
{this.state.stops.map((item) =>
|
{this.state.stops.map((item) =>
|
||||||
<StopComponent stop={item} />
|
<div>
|
||||||
|
<h1>
|
||||||
|
{item.name},
|
||||||
|
{item.id},
|
||||||
|
{item.lat},
|
||||||
|
{item.lon},
|
||||||
|
{item.track}
|
||||||
|
</h1>
|
||||||
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default NearbyStation
|
export default NearbyStation
|
||||||
|
|
||||||
|
//https://api.vasttrafik.se/bin/rest.exe/v2/location.nearbystops?originCoordLat=57.5987&originCoordLong=11.9454&maxNo=20&format=json
|
||||||
|
|
||||||
|
//https://api.vasttrafik.se/bin/rest.exe/v2/location.nearbystops
|
||||||
|
|
||||||
|
|
||||||
|
//'https://reqres.in/api/articles'
|
||||||
|
|
||||||
|
//'https://api.vasttrafik.se/token'
|
||||||
|
|
||||||
|
//grant_type=client_credentials&scope=<device_id>
|
||||||
|
|
||||||
|
//BPvMjPidHckBtETZxr3dHP1rptQa
|
||||||
|
//z5MFCS_wwmqprc0s4iLZWBAUJdga
|
@ -1,36 +0,0 @@
|
|||||||
import React, { Component } from 'react';
|
|
||||||
|
|
||||||
import './css/Popup.css';
|
|
||||||
|
|
||||||
|
|
||||||
class Popup extends Component {
|
|
||||||
state = {
|
|
||||||
visible: false
|
|
||||||
};
|
|
||||||
|
|
||||||
show = () => {
|
|
||||||
this.setState({
|
|
||||||
visible: true
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
hide = () => {
|
|
||||||
this.setState({
|
|
||||||
visible: false
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
render() {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<div className={`${this.state.visible ? "" : "hidden"}` + " popupClose"} onClick={this.hide} />
|
|
||||||
|
|
||||||
<div className={`${this.state.visible ? "visible" : ""}` + " popup " + this.props.className}>
|
|
||||||
{this.props.children}
|
|
||||||
</div>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default Popup;
|
|
@ -1,90 +0,0 @@
|
|||||||
import globalData from '../GlobalData.js';
|
|
||||||
|
|
||||||
import user1 from '../APIexamples/user1.json'
|
|
||||||
import user2 from '../APIexamples/user2.json'
|
|
||||||
import user3 from '../APIexamples/user3.json'
|
|
||||||
import user4 from '../APIexamples/user4.json'
|
|
||||||
|
|
||||||
import locationuser1 from '../APIexamples/locationuser1.json'
|
|
||||||
import locationuser2 from '../APIexamples/locationuser2.json'
|
|
||||||
import locationuser3 from '../APIexamples/locationuser3.json'
|
|
||||||
import locationuser4 from '../APIexamples/locationuser4.json'
|
|
||||||
|
|
||||||
import departureuser1 from '../APIexamples/departureuser1.json'
|
|
||||||
import departureuser2 from '../APIexamples/departureuser2.json'
|
|
||||||
import departureuser3 from '../APIexamples/departureuser3.json'
|
|
||||||
import departureuser4 from '../APIexamples/departureuser4.json'
|
|
||||||
|
|
||||||
import Button from './Button.js';
|
|
||||||
import userIcon from '../img/userDark.svg';
|
|
||||||
|
|
||||||
|
|
||||||
class SelectUserButton extends Button {
|
|
||||||
state = {
|
|
||||||
first: false,
|
|
||||||
u1: user1,
|
|
||||||
u2: user2,
|
|
||||||
u3: user3,
|
|
||||||
u4: user4,
|
|
||||||
}
|
|
||||||
|
|
||||||
genUsers = () => {
|
|
||||||
if (globalData.users.length < 2) {
|
|
||||||
this.state.first = true;
|
|
||||||
this.state.u1.stop = locationuser1.LocationList.StopLocation[0];
|
|
||||||
this.state.u1.stop.departures = departureuser1.DepartureBoard.Departures;
|
|
||||||
this.state.u2.stop = locationuser2.LocationList.StopLocation[0];
|
|
||||||
this.state.u2.stop.departures = departureuser2.DepartureBoard.Departures;
|
|
||||||
this.state.u3.stop = locationuser3.LocationList.StopLocation[0];
|
|
||||||
this.state.u3.stop.departures = departureuser3.DepartureBoard.Departures;
|
|
||||||
this.state.u4.stop = locationuser4.LocationList.StopLocation[0];
|
|
||||||
this.state.u4.stop.departures = departureuser4.DepartureBoard.Departures;
|
|
||||||
globalData.users = [
|
|
||||||
this.state.u1,
|
|
||||||
this.state.u2,
|
|
||||||
this.state.u3,
|
|
||||||
this.state.u4
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
selectUser = () => {
|
|
||||||
this.genUsers()
|
|
||||||
if(this.props.path === "user1"){
|
|
||||||
globalData.user = user1
|
|
||||||
globalData.user.track = locationuser1.LocationList.StopLocation[0].track
|
|
||||||
globalData.stop = locationuser1.LocationList.StopLocation[0]
|
|
||||||
globalData.stop.departures = departureuser1.DepartureBoard.Departures
|
|
||||||
}else if (this.props.path === "user2"){
|
|
||||||
globalData.user = user2
|
|
||||||
globalData.user.track = locationuser2.LocationList.StopLocation[0].track
|
|
||||||
globalData.stop = locationuser2.LocationList.StopLocation[0]
|
|
||||||
globalData.stop.departures = departureuser2.DepartureBoard.Departures
|
|
||||||
}else if (this.props.path === "user3"){
|
|
||||||
globalData.user = user3
|
|
||||||
globalData.user.track = locationuser3.LocationList.StopLocation[0].track
|
|
||||||
globalData.stop = locationuser3.LocationList.StopLocation[0]
|
|
||||||
globalData.stop.departures = departureuser3.DepartureBoard.Departures
|
|
||||||
}else if (this.props.path === "user4"){
|
|
||||||
globalData.user = user4
|
|
||||||
globalData.user.track = locationuser4.LocationList.StopLocation[0].track
|
|
||||||
globalData.stop = locationuser4.LocationList.StopLocation[0]
|
|
||||||
globalData.stop.departures = departureuser4.DepartureBoard.Departures
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
updatePage = () => {
|
|
||||||
globalData.currentPage.forceUpdate();
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
return (
|
|
||||||
<Button onClick={[this.selectUser, this.updatePage]} className="disruptBtn">
|
|
||||||
<img src={userIcon} alt="" />
|
|
||||||
{this.props.username}
|
|
||||||
</Button>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default SelectUserButton;
|
|
@ -1,61 +0,0 @@
|
|||||||
import React from 'react';
|
|
||||||
import axios from 'axios';
|
|
||||||
import AccessToken from '../classes/AccessToken'
|
|
||||||
|
|
||||||
class StationDisruption extends React.Component {
|
|
||||||
state = {
|
|
||||||
gid: '9022014005700002',
|
|
||||||
lat: '57.7',
|
|
||||||
long: '12.0',
|
|
||||||
disruptions: [],
|
|
||||||
token: undefined,
|
|
||||||
tokenClass: new AccessToken()
|
|
||||||
}
|
|
||||||
|
|
||||||
handleChangeGid = event => {
|
|
||||||
this.setState({ lat: event.target.value});
|
|
||||||
}
|
|
||||||
|
|
||||||
handleSubmit = event => {
|
|
||||||
event.preventDefault();
|
|
||||||
|
|
||||||
const headers = {
|
|
||||||
'Authorization': 'Bearer ' + this.state.tokenClass.token
|
|
||||||
};
|
|
||||||
|
|
||||||
axios.get('https://api.vasttrafik.se/bin/rest.exe/v2/location.nearbystops?originCoordLat='+this.state.lat+'&originCoordLong='+this.state.long+'&maxNo=5&format=json', { headers })
|
|
||||||
.then(response => {
|
|
||||||
})
|
|
||||||
axios.get('https://api.vasttrafik.se/ts/v1/traffic-situations/stoppoint/'+this.state.gid, { headers })
|
|
||||||
.then(response => {
|
|
||||||
this.setState({
|
|
||||||
disruptions: response.data
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
<form onSubmit={this.handleSubmit}>
|
|
||||||
<label>
|
|
||||||
Stoppoint Gid:
|
|
||||||
<input type="text" name="gid" onChange={this.handleChangeGid} />
|
|
||||||
</label>
|
|
||||||
<button type="submit">Find traffic disruptions</button>
|
|
||||||
</form>
|
|
||||||
<h1>
|
|
||||||
{this.state.gid}
|
|
||||||
</h1>
|
|
||||||
{this.state.disruptions.map((item) =>
|
|
||||||
<div>
|
|
||||||
<h1>
|
|
||||||
{item.description}
|
|
||||||
</h1>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
export default StationDisruption
|
|
@ -1,19 +0,0 @@
|
|||||||
import React, {Component} from 'react';
|
|
||||||
|
|
||||||
class StopComponent extends Component {
|
|
||||||
render() {
|
|
||||||
return (
|
|
||||||
<div>
|
|
||||||
<h1>
|
|
||||||
{this.props.stop.name},
|
|
||||||
{this.props.stop.id},
|
|
||||||
{this.props.stop.lat},
|
|
||||||
{this.props.stop.lon},
|
|
||||||
{this.props.stop.track}
|
|
||||||
</h1>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// TODO Add css
|
|
||||||
export default StopComponent
|
|
@ -1,22 +0,0 @@
|
|||||||
import React, {Component} from 'react';
|
|
||||||
import globalData from '../GlobalData';
|
|
||||||
import Button from './Button.js';
|
|
||||||
|
|
||||||
class StopSelectButton extends Component {
|
|
||||||
|
|
||||||
selectStop = () => {
|
|
||||||
globalData.stop = this.props.stop
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<Button onClick={[this.selectStop]}>
|
|
||||||
<span>{this.props.stop.name}</span>
|
|
||||||
</Button>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// TODO Add css
|
|
||||||
export default StopSelectButton
|
|
@ -1,69 +1,16 @@
|
|||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
|
|
||||||
import Button from './Button.js';
|
|
||||||
import Popup from './Popup.js';
|
|
||||||
import globalData from '../GlobalData.js';
|
|
||||||
|
|
||||||
import './css/StopTitle.css';
|
import './css/StopTitle.css';
|
||||||
|
|
||||||
|
|
||||||
class StopTitle extends Component {
|
class StopTitle extends Component {
|
||||||
constructor(props) {
|
|
||||||
super(props);
|
|
||||||
this.popupElem = React.createRef();
|
|
||||||
}
|
|
||||||
|
|
||||||
showPopup = () => {
|
|
||||||
this.popupElem.current.show();
|
|
||||||
};
|
|
||||||
|
|
||||||
hidePopup = () => {
|
|
||||||
this.popupElem.current.hide();
|
|
||||||
};
|
|
||||||
|
|
||||||
setTrackA = () => {
|
|
||||||
globalData.user.track = "A";
|
|
||||||
};
|
|
||||||
|
|
||||||
setTrackB = () => {
|
|
||||||
globalData.user.track = "B";
|
|
||||||
};
|
|
||||||
|
|
||||||
updatePage = () => {
|
|
||||||
globalData.currentPage.forceUpdate();
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div id="stopTitle">
|
<div id="stopTitle">
|
||||||
<Popup ref={this.popupElem} className="">
|
<h1>{this.props.stop.name}</h1>
|
||||||
<h3>Välj läge:</h3>
|
<div>
|
||||||
<ul>
|
<h3>{this.props.stop.locations[0]}</h3>
|
||||||
<>
|
<button>Byt Läge</button>
|
||||||
<li><Button onClick={[this.setTrackA, this.updatePage, this.hidePopup]}>{"Läge A"}</Button></li>
|
</div>
|
||||||
<li><Button onClick={[this.setTrackB, this.updatePage, this.hidePopup]}>{"Läge B"}</Button></li>
|
|
||||||
</>
|
|
||||||
</ul>
|
|
||||||
</Popup>
|
|
||||||
|
|
||||||
<h1>{this.props.stop.name !== undefined ?
|
|
||||||
this.props.stop.name
|
|
||||||
: "Hållplats saknas"
|
|
||||||
}</h1>
|
|
||||||
|
|
||||||
{this.props.stop.name !== undefined && this.props.stop.track !== undefined ?
|
|
||||||
<div>
|
|
||||||
<h3>
|
|
||||||
<span>{"Läge " + globalData.user.track}</span>
|
|
||||||
</h3>
|
|
||||||
<Button className="changeTrackBtn" onClick={[this.showPopup]}>Byt Läge</Button>
|
|
||||||
</div>
|
|
||||||
:
|
|
||||||
(this.props.stop.name !== undefined ?
|
|
||||||
<></>
|
|
||||||
: <h3>Vänligen aktivera platsåtkomst</h3>
|
|
||||||
)
|
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import { Link } from 'react-router-dom';
|
|
||||||
|
|
||||||
import './css/TrafficInfo.css';
|
import './css/TrafficInfo.css';
|
||||||
|
|
||||||
@ -7,74 +6,35 @@ import busIcon from '../img/bus.svg';
|
|||||||
import warningIcon from '../img/warning.svg';
|
import warningIcon from '../img/warning.svg';
|
||||||
|
|
||||||
class TrafficEntry extends Component {
|
class TrafficEntry extends Component {
|
||||||
state = {
|
|
||||||
expanded: false
|
|
||||||
};
|
|
||||||
|
|
||||||
toggle = () => {
|
|
||||||
if (this.state.expanded)
|
|
||||||
this.collapse();
|
|
||||||
else
|
|
||||||
this.expand();
|
|
||||||
};
|
|
||||||
|
|
||||||
expand = () => {
|
|
||||||
this.setState({
|
|
||||||
expanded: true
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
collapse = () => {
|
|
||||||
this.setState({
|
|
||||||
expanded: false
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
let trafficInfo = this.props.departure.trafficInfo;
|
let trafficInfo = this.props.departure.info;
|
||||||
let lineInterference = trafficInfo !== "" && trafficInfo !== null && trafficInfo !== undefined;
|
let lineInterference = trafficInfo != "" && trafficInfo != null;
|
||||||
|
let infoElem = <></>;
|
||||||
|
|
||||||
|
if (trafficInfo != "" && trafficInfo != null)
|
||||||
|
infoElem = <p>{trafficInfo} <u>Visa mer</u></p>
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="trafficEntry">
|
<div class="trafficEntry">
|
||||||
<div>
|
<div>
|
||||||
<div className="timeColumn">
|
<div class="timeColumn">
|
||||||
{!lineInterference &&
|
<span>{this.props.departure.time}</span>
|
||||||
<span>{this.props.departure.time}</span>
|
|
||||||
}
|
|
||||||
{lineInterference &&
|
{lineInterference &&
|
||||||
<>
|
<img src={warningIcon}></img>
|
||||||
<div style={{display: "flex", flexDirection: "column"}}>
|
|
||||||
<span style={{color: "red", fontWeight: "bold"}}>{this.props.departure.newTime}</span>
|
|
||||||
<span style={{textDecoration: "line-through"}}>{this.props.departure.time}</span>
|
|
||||||
</div>
|
|
||||||
<img src={warningIcon} alt=""></img>
|
|
||||||
</>
|
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
<div className="lineColumn">
|
<div class="lineColumn">
|
||||||
<div>
|
<div>
|
||||||
<span className="lineName">{this.props.departure.sname}</span>
|
<span class="lineName">{this.props.departure.lineName}</span>
|
||||||
<img src={busIcon} alt=""></img>
|
<img src={busIcon}></img>
|
||||||
<span className="destination">{"Mot " + this.props.departure.direction}</span>
|
<span class="destination">{this.props.departure.destination}</span>
|
||||||
</div>
|
</div>
|
||||||
{lineInterference &&
|
{infoElem}
|
||||||
<div className="infoWrapper" onClick={this.toggle}>
|
|
||||||
<p className={`${this.state.expanded ? "expanded" : ""}`}>
|
|
||||||
{trafficInfo}
|
|
||||||
<span style={{display: (this.state.expanded ? "inline" : "none"), marginLeft: "5px" }}><u>Visa mindre</u></span>
|
|
||||||
</p>
|
|
||||||
<span style={{display: (this.state.expanded ? "none" : "block") }}><u>Visa mer</u></span>
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{lineInterference &&
|
{lineInterference &&
|
||||||
<Link to={
|
<button>Hitta annan resväg</button>
|
||||||
{ pathname: "/travel"
|
|
||||||
, to: this.props.departure.direction
|
|
||||||
}
|
|
||||||
}>Hitta annan resväg</Link>
|
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -8,22 +8,18 @@ class TrafficList extends Component {
|
|||||||
render() {
|
render() {
|
||||||
let entries = [];
|
let entries = [];
|
||||||
|
|
||||||
if (this.props.departures) {
|
this.props.departures.forEach(departure => {
|
||||||
let i = 0; // React requires elems in array to have associated unique key
|
entries.push(
|
||||||
|
<TrafficEntry departure={departure} />
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
this.props.departures.forEach(departure => {
|
// Add separator between every element
|
||||||
entries.push(
|
const intersperse = (arr, sep) => arr.reduce((a,v)=>[...a,v,sep],[]).slice(0,-1);
|
||||||
<TrafficEntry key={i++} departure={departure} />
|
entries = intersperse(entries, (<hr />));
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
// Add separator between every element
|
// Add separator after the last element
|
||||||
const intersperse = (arr, sep) => arr.reduce((a,v)=>[...a,v,sep],[]).slice(0,-1);
|
entries.push(<hr />);
|
||||||
entries = intersperse(entries, (<hr key={i++} />));
|
|
||||||
|
|
||||||
// Add separator after the last element
|
|
||||||
entries.push(<hr key={i++} />);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div id="trafficList">
|
<div id="trafficList">
|
||||||
|
@ -5,10 +5,10 @@ class TripSelector extends Component {
|
|||||||
return (
|
return (
|
||||||
<form>
|
<form>
|
||||||
<label>Från:</label>
|
<label>Från:</label>
|
||||||
<input type="text" placeholder="Hållplats/Adress/Plats" defaultValue={this.props.from}/>
|
<input type="text" placeholder="Hållplats/Adress/Plats" />
|
||||||
<hr/>
|
<hr/>
|
||||||
<label>Till:</label>
|
<label for="lname">Till:</label>
|
||||||
<input type="text" placeholder="Hållplats/Adress/Plats" defaultValue={this.props.to} />
|
<input type="text" placeholder="Hållplats/Adress/Plats" />
|
||||||
</form>
|
</form>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#bottomMenu {
|
#bottomMenu {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 9vh;
|
height: 9vh;
|
||||||
min-height: 70px;
|
min-height: 60px;
|
||||||
background: white;
|
background: white;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-evenly;
|
justify-content: space-evenly;
|
||||||
@ -22,7 +22,6 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-evenly;
|
justify-content: space-evenly;
|
||||||
word-break: break-word;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#bottomMenu button:active {
|
#bottomMenu button:active {
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
button:active {
|
|
||||||
background: rgba(0, 0, 0, 0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
a:active {
|
|
||||||
background: rgba(0, 0, 0, 0.1);
|
|
||||||
}
|
|
@ -3,7 +3,7 @@ header {
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 15px 15px 12vh 15px;
|
padding: 15px 15px 15vh 15px;
|
||||||
top: 0;
|
top: 0;
|
||||||
background: linear-gradient(90deg, var(--colorVT1), var(--colorVT2));
|
background: linear-gradient(90deg, var(--colorVT1), var(--colorVT2));
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,5 @@ main {
|
|||||||
flex: 1 1 auto;
|
flex: 1 1 auto;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-flow: column;
|
flex-flow: column;
|
||||||
justify-content: flex-start;
|
justify-content: space-evenly;
|
||||||
overflow: hidden scroll;
|
|
||||||
}
|
}
|
@ -1,83 +0,0 @@
|
|||||||
|
|
||||||
#navDrawer {
|
|
||||||
width: 70vw;
|
|
||||||
height: 100%;
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
left: -70vw;
|
|
||||||
background: white;
|
|
||||||
overflow: hidden;
|
|
||||||
z-index: 10;
|
|
||||||
transition: .35s;
|
|
||||||
display: flex;
|
|
||||||
flex-flow: column;
|
|
||||||
}
|
|
||||||
|
|
||||||
.open {
|
|
||||||
left: 0 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
#navDrawer header {
|
|
||||||
width: 100%;
|
|
||||||
padding: 4vh 0;
|
|
||||||
color: white;
|
|
||||||
font-size: 16px;
|
|
||||||
flex-basis: 15vh;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: space-evenly;
|
|
||||||
}
|
|
||||||
|
|
||||||
#navDrawer header img {
|
|
||||||
width: 35px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#navList {
|
|
||||||
flex-basis: 70vh;
|
|
||||||
display: flex;
|
|
||||||
flex-flow: column;
|
|
||||||
align-items: flex-start;
|
|
||||||
}
|
|
||||||
|
|
||||||
.disruptBtn {
|
|
||||||
height: 50px;
|
|
||||||
width: 100%;
|
|
||||||
padding: 0 0 0 5vw;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
align-self: flex-start;
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.disruptBtn:active {
|
|
||||||
background: rgba(0, 0, 0, 0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.disruptBtn img {
|
|
||||||
height: 55%;
|
|
||||||
margin-right: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#clickArea {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
background: rgba(0, 0, 0, 0.75);
|
|
||||||
position: fixed;
|
|
||||||
z-index: 5;
|
|
||||||
transition: .15s;
|
|
||||||
}
|
|
||||||
|
|
||||||
#navDrawer hr {
|
|
||||||
width: 90%;
|
|
||||||
margin: 0 10px 5px 0;
|
|
||||||
align-self: flex-end;
|
|
||||||
opacity: 0.5;
|
|
||||||
flex-basis: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
#version {
|
|
||||||
align-self: flex-end;
|
|
||||||
margin-right: 10px;
|
|
||||||
font-size: 14px;
|
|
||||||
color: var(--colorDiscrete);
|
|
||||||
min-height: 50px;
|
|
||||||
}
|
|
@ -1,56 +0,0 @@
|
|||||||
.popup {
|
|
||||||
position: fixed;
|
|
||||||
top: 50%;
|
|
||||||
left: 50%;
|
|
||||||
transform: translate(-50%, -50%) scale(0);
|
|
||||||
transform-origin: center;
|
|
||||||
background: white;
|
|
||||||
display: flex !important;
|
|
||||||
flex-direction: column !important;
|
|
||||||
width: 55vw;
|
|
||||||
height: 39vh;
|
|
||||||
padding: 3vh 5vw;
|
|
||||||
box-shadow: var(--boxShadow);
|
|
||||||
border-radius: var(--borderRadius);
|
|
||||||
transition: .35s;
|
|
||||||
z-index: 11;
|
|
||||||
}
|
|
||||||
|
|
||||||
.visible {
|
|
||||||
pointer-events: all;
|
|
||||||
transform: translate(-50%, -50%) scale(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
.popup h3 {
|
|
||||||
margin-bottom: 20px;
|
|
||||||
display: block;
|
|
||||||
font-size: 1.17em;
|
|
||||||
font-weight: bold !important;
|
|
||||||
text-align: center;
|
|
||||||
color: black !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.popup ul {
|
|
||||||
list-style: none;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.popup li button {
|
|
||||||
width: 100% !important;
|
|
||||||
height: 50px;
|
|
||||||
padding: 8% 0 !important;
|
|
||||||
font-size: 16px !important;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.popupClose {
|
|
||||||
width: 100vw;
|
|
||||||
height: 100vh;
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
background: rgba(0, 0, 0, 0.75);
|
|
||||||
z-index: 11;
|
|
||||||
}
|
|
@ -7,41 +7,22 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: space-evenly;
|
justify-content: space-evenly;
|
||||||
padding: 0 5vw;
|
padding: 0 5vw;
|
||||||
z-index: 4;
|
|
||||||
max-width: 80vw;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#stopTitle h1, #stopTitle h3 {
|
#stopTitle h1, #stopTitle h3 {
|
||||||
font-weight: 100;
|
font-weight: 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
#stopTitle h1 {
|
|
||||||
font-size: 3.5vh;
|
|
||||||
}
|
|
||||||
|
|
||||||
#stopTitle h3 {
|
|
||||||
font-size: 5vw;
|
|
||||||
color: var(--colorDiscrete);
|
|
||||||
}
|
|
||||||
|
|
||||||
@media screen and (min-width: 400px) {
|
|
||||||
#stopTitle h1 {
|
|
||||||
font-size: 4vh;
|
|
||||||
}
|
|
||||||
|
|
||||||
#stopTitle h3 {
|
|
||||||
font-size: 20px;
|
|
||||||
color: var(--colorDiscrete);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#stopTitle div {
|
#stopTitle div {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
align-items: center;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.changeTrackBtn {
|
#stopTitle h3 {
|
||||||
|
color: rgba(0, 0, 0, 0.4);
|
||||||
|
}
|
||||||
|
|
||||||
|
#stopTitle button {
|
||||||
width: auto;
|
width: auto;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
@ -53,6 +34,6 @@
|
|||||||
border-radius: calc(var(--topMenuHeight) / 15);
|
border-radius: calc(var(--topMenuHeight) / 15);
|
||||||
}
|
}
|
||||||
|
|
||||||
.changeTrackBtn:active {
|
#stopTitle button:active {
|
||||||
background: rgba(0, 0, 0, 0.3);
|
background: rgba(0, 0, 0, 0.3);
|
||||||
}
|
}
|
@ -6,7 +6,7 @@
|
|||||||
justify-content: space-evenly;
|
justify-content: space-evenly;
|
||||||
}
|
}
|
||||||
|
|
||||||
#topMenu .menuButton {
|
#topMenu button {
|
||||||
width: var(--topMenuHeight);
|
width: var(--topMenuHeight);
|
||||||
height: calc(var(--topMenuHeight) / 1.3);
|
height: calc(var(--topMenuHeight) / 1.3);
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -17,7 +17,7 @@
|
|||||||
box-shadow: var(--boxShadow);
|
box-shadow: var(--boxShadow);
|
||||||
}
|
}
|
||||||
|
|
||||||
#topMenu .menuButton:active {
|
#topMenu button:active {
|
||||||
background: rgb(235, 235, 235);
|
background: rgb(235, 235, 235);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#trafficList {
|
#trafficList {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
margin-top: 40px;
|
margin-top: 40px;
|
||||||
padding-bottom: 40px;
|
|
||||||
background: white;
|
background: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -11,35 +10,22 @@
|
|||||||
justify-content: space-evenly;
|
justify-content: space-evenly;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
padding: 8vw 0;
|
padding: 6vw 0;
|
||||||
background: white;
|
background: white;
|
||||||
font-size: 3.5vw;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.trafficEntry div {
|
.trafficEntry div {
|
||||||
width: 90%;
|
width: 90%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: flex-start;
|
justify-content: space-evenly;
|
||||||
margin-bottom: 2vh;
|
margin-bottom: 8px;
|
||||||
}
|
|
||||||
|
|
||||||
.trafficEntry div:only-child {
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.trafficEntry div:only-child > .timeColumn,
|
|
||||||
.trafficEntry div:only-child > .lineColumn {
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.trafficEntry div:only-child > .timeColumn {
|
|
||||||
justify-content: center !important;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.trafficEntry div p {
|
.trafficEntry div p {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
padding: 2vh 0 0 0;
|
font-size: 3.5vw;
|
||||||
|
padding: 3vw 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.trafficEntry div div {
|
.trafficEntry div div {
|
||||||
@ -47,62 +33,30 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
.trafficEntry div div div {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
justify-content: space-around;
|
|
||||||
align-items: flex-end;
|
|
||||||
}
|
|
||||||
|
|
||||||
.timeColumn div:first-child, .lineColumn div:first-child {
|
|
||||||
height: 5.5vh;
|
|
||||||
}
|
|
||||||
|
|
||||||
.timeColumn {
|
.timeColumn {
|
||||||
flex-basis: 20%;
|
flex-basis: 15%;
|
||||||
justify-content: flex-start !important;
|
justify-content: flex-start;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.timeColumn div {
|
|
||||||
align-items: center !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.timeColumn img {
|
.timeColumn img {
|
||||||
width: 3.5vw;
|
width: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.lineColumn {
|
.lineColumn {
|
||||||
flex-basis: 75%;
|
flex-basis: 75%;
|
||||||
max-width: 75%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.lineColumn div {
|
|
||||||
margin-bottom: 0px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.lineColumn img {
|
.lineColumn img {
|
||||||
flex-basis: 25%;
|
width: 30px;
|
||||||
height: 9vw;
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.infoWrapper p {
|
.trafficEntry div div div {
|
||||||
text-overflow: ellipsis;
|
display: flex;
|
||||||
overflow: hidden;
|
flex-direction: row;
|
||||||
flex-basis: 75%;
|
justify-content: flex-start;
|
||||||
flex-grow: 1;
|
align-items: flex-end;
|
||||||
display: block;
|
|
||||||
white-space: nowrap;
|
|
||||||
max-height: 4.5vw;
|
|
||||||
}
|
|
||||||
|
|
||||||
.infoWrapper span {
|
|
||||||
flex-basis: 25%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.expanded {
|
|
||||||
white-space: normal !important;
|
|
||||||
max-height: none !important;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.lineName {
|
.lineName {
|
||||||
@ -110,23 +64,16 @@
|
|||||||
color: white;
|
color: white;
|
||||||
font-size: 6vw;
|
font-size: 6vw;
|
||||||
font-weight: 100;
|
font-weight: 100;
|
||||||
padding: 1vw 2.5vw;
|
margin-right: 10px;
|
||||||
border-radius: var(--borderRadius);
|
padding: 1vw 4vw;
|
||||||
font-family: 'Roboto Light';
|
|
||||||
height: 7vw;
|
|
||||||
flex-basis: 35%;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.destination {
|
.destination {
|
||||||
flex-basis: 40%;
|
font-size: 100%;
|
||||||
height: 9vw;
|
|
||||||
font-size: 4vw;
|
|
||||||
text-align: left;
|
text-align: left;
|
||||||
display: flex;
|
|
||||||
align-items: flex-end;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.trafficEntry a {
|
.trafficEntry button {
|
||||||
width: 90%;
|
width: 90%;
|
||||||
font-size: 4vw;
|
font-size: 4vw;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
@ -134,6 +81,4 @@
|
|||||||
padding: 4vw 0;
|
padding: 4vw 0;
|
||||||
border-radius: var(--borderRadius);
|
border-radius: var(--borderRadius);
|
||||||
box-shadow: var(--boxShadow);
|
box-shadow: var(--boxShadow);
|
||||||
text-decoration: none;
|
|
||||||
border: 1px solid rgba(0, 0, 0, 0.2);
|
|
||||||
}
|
}
|
@ -2,16 +2,13 @@ import React, { Component } from 'react';
|
|||||||
|
|
||||||
import Header from '../Header.js';
|
import Header from '../Header.js';
|
||||||
import MainArea from '../MainArea.js';
|
import MainArea from '../MainArea.js';
|
||||||
import globalData from '../../GlobalData.js';
|
|
||||||
|
|
||||||
class Tickets extends Component {
|
class Tickets extends Component {
|
||||||
render() {
|
render() {
|
||||||
globalData.currentPage = this;
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Header title="Biljetter" />
|
<Header title="Biljetter" />
|
||||||
<MainArea style={{justifyContent: "space-evenly"}}>
|
<MainArea>
|
||||||
<p>Du har inga biljetter</p>
|
<p>Du har inga biljetter</p>
|
||||||
</MainArea>
|
</MainArea>
|
||||||
</>
|
</>
|
||||||
|
@ -9,12 +9,8 @@ import clockIcon from '../../img/clock.svg';
|
|||||||
import calendarIcon from '../../img/calendar.svg';
|
import calendarIcon from '../../img/calendar.svg';
|
||||||
import recurringIcon from '../../img/redo.svg';
|
import recurringIcon from '../../img/redo.svg';
|
||||||
|
|
||||||
import globalData from '../../GlobalData.js';
|
|
||||||
|
|
||||||
class TicketsBuy extends Component {
|
class TicketsBuy extends Component {
|
||||||
render() {
|
render() {
|
||||||
globalData.currentPage = this;
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Header title="Köp biljett" />
|
<Header title="Köp biljett" />
|
||||||
@ -23,7 +19,7 @@ class TicketsBuy extends Component {
|
|||||||
<MenuButton label="Periodbiljett" icon={calendarIcon} />
|
<MenuButton label="Periodbiljett" icon={calendarIcon} />
|
||||||
<MenuButton label="Dygnsbiljett" icon={recurringIcon} />
|
<MenuButton label="Dygnsbiljett" icon={recurringIcon} />
|
||||||
</TopMenu>
|
</TopMenu>
|
||||||
<MainArea style={{justifyContent: "space-evenly"}}>
|
<MainArea>
|
||||||
<p>Du har inga tidigare köp</p>
|
<p>Du har inga tidigare köp</p>
|
||||||
</MainArea>
|
</MainArea>
|
||||||
</>
|
</>
|
||||||
|
@ -1,26 +1,34 @@
|
|||||||
import React, { Component } from "react";
|
import React, { Component } from 'react';
|
||||||
|
|
||||||
import Header from "../Header.js";
|
import Header from '../Header.js';
|
||||||
import TopMenu from "../TopMenu.js";
|
import TopMenu from '../TopMenu.js';
|
||||||
import MainArea from "../MainArea.js";
|
import MainArea from '../MainArea.js';
|
||||||
import StopTitle from "../StopTitle.js";
|
import StopTitle from '../StopTitle.js';
|
||||||
import TrafficList from "../TrafficList.js";
|
import TrafficList from '../TrafficList.js';
|
||||||
|
|
||||||
import globalData from '../../GlobalData.js';
|
|
||||||
|
|
||||||
|
import Stop from '../../classes/Stop.js';
|
||||||
|
import Departure from '../../classes/Departure.js';
|
||||||
|
|
||||||
class TrafficInfo extends Component {
|
class TrafficInfo extends Component {
|
||||||
render() {
|
render() {
|
||||||
globalData.currentPage = this;
|
let testStop =
|
||||||
|
new Stop(
|
||||||
|
"Lemmingsgatan",
|
||||||
|
["Läge A", "Läge B", "Läge C"],
|
||||||
|
[
|
||||||
|
new Departure("519", "Mot Heden", "11:59", "Trafikolycka vid Partille Centrum."),
|
||||||
|
new Departure("58", "Mot Västra Eriksberg", "12:07")
|
||||||
|
],
|
||||||
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Header title="Trafikinfo" />
|
<Header title="Trafikinfo" />
|
||||||
<TopMenu>
|
<TopMenu>
|
||||||
<StopTitle stop={globalData.stop} />
|
<StopTitle stop={testStop} />
|
||||||
</TopMenu>
|
</TopMenu>
|
||||||
<MainArea>
|
<MainArea>
|
||||||
<TrafficList departures={globalData.stop.departures} />
|
<TrafficList departures={testStop.departures} />
|
||||||
</MainArea>
|
</MainArea>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
@ -7,22 +7,15 @@ import TripSelector from '../TripSelector.js';
|
|||||||
|
|
||||||
import '../css/TripSelector.css';
|
import '../css/TripSelector.css';
|
||||||
|
|
||||||
import globalData from '../../GlobalData.js';
|
|
||||||
|
|
||||||
class Travel extends Component {
|
class Travel extends Component {
|
||||||
render() {
|
render() {
|
||||||
globalData.currentPage = this;
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Header title="Reseplanering" />
|
<Header title="Reseplanering" />
|
||||||
<TopMenu>
|
<TopMenu>
|
||||||
<TripSelector
|
<TripSelector />
|
||||||
from={this.props.location.from}
|
|
||||||
to={this.props.location.to}
|
|
||||||
/>
|
|
||||||
</TopMenu>
|
</TopMenu>
|
||||||
<MainArea style={{justifyContent: "space-evenly"}}>
|
<MainArea>
|
||||||
</MainArea>
|
</MainArea>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!-- Generator: Adobe Illustrator 24.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
||||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
||||||
viewBox="0 0 329 329" style="enable-background:new 0 0 329 329;" xml:space="preserve">
|
|
||||||
<path d="M194.6,164.8L322.7,36.7c8.3-8.3,8.3-21.8,0-30.1s-21.8-8.3-30.1,0l-128.1,128L36.4,6.5c-8.3-8.3-21.8-8.3-30.1,0
|
|
||||||
s-8.3,21.8,0,30.1l128.1,128.1L6.3,292.9c-8.3,8.3-8.3,21.8,0,30.1c4.2,4.2,9.6,6.2,15.1,6.2s10.9-2.1,15.1-6.2l128.1-128.1
|
|
||||||
l128,128.1c4.2,4.2,9.6,6.2,15.1,6.2s10.9-2.1,15.1-6.2c8.3-8.3,8.3-21.8,0-30.1L194.6,164.8z"/>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 691 B |
@ -1,44 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
||||||
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
||||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
||||||
viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
|
|
||||||
<g>
|
|
||||||
<g>
|
|
||||||
<path d="M400.268,175.599c-1.399-3.004-4.412-4.932-7.731-4.932h-101.12l99.797-157.568c1.664-2.628,1.766-5.956,0.265-8.678
|
|
||||||
C389.977,1.69,387.109,0,384.003,0H247.47c-3.234,0-6.187,1.826-7.637,4.719l-128,256c-1.323,2.637-1.178,5.777,0.375,8.294
|
|
||||||
c1.562,2.517,4.301,4.053,7.262,4.053h87.748l-95.616,227.089c-1.63,3.883-0.179,8.388,3.413,10.59
|
|
||||||
c1.382,0.845,2.918,1.254,4.446,1.254c2.449,0,4.864-1.05,6.537-3.029l273.067-324.267
|
|
||||||
C401.206,182.161,401.667,178.611,400.268,175.599z"/>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
<g>
|
|
||||||
</g>
|
|
||||||
<g>
|
|
||||||
</g>
|
|
||||||
<g>
|
|
||||||
</g>
|
|
||||||
<g>
|
|
||||||
</g>
|
|
||||||
<g>
|
|
||||||
</g>
|
|
||||||
<g>
|
|
||||||
</g>
|
|
||||||
<g>
|
|
||||||
</g>
|
|
||||||
<g>
|
|
||||||
</g>
|
|
||||||
<g>
|
|
||||||
</g>
|
|
||||||
<g>
|
|
||||||
</g>
|
|
||||||
<g>
|
|
||||||
</g>
|
|
||||||
<g>
|
|
||||||
</g>
|
|
||||||
<g>
|
|
||||||
</g>
|
|
||||||
<g>
|
|
||||||
</g>
|
|
||||||
<g>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 1005 B |
@ -1,22 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!-- Generator: Adobe Illustrator 24.3.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
||||||
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
||||||
viewBox="0 0 460.8 460.8" style="enable-background:new 0 0 460.8 460.8;" xml:space="preserve">
|
|
||||||
<style type="text/css">
|
|
||||||
.st0{fill:#FFFFFF;}
|
|
||||||
</style>
|
|
||||||
<g>
|
|
||||||
<g>
|
|
||||||
<path class="st0" d="M230.4,0c-65.8,0-119.6,53.8-119.6,119.6s53.8,119.6,119.6,119.6s119.6-53.8,119.6-119.6S296.3,0,230.4,0z"/>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
<g>
|
|
||||||
<g>
|
|
||||||
<path class="st0" d="M435.8,334.9c-3.1-7.8-7.3-15.2-12-21.9c-24-35.5-61.1-59-102.9-64.8c-5.2-0.5-11,0.5-15.2,3.7
|
|
||||||
c-21.9,16.2-48.1,24.6-75.2,24.6s-53.3-8.4-75.2-24.6c-4.2-3.1-9.9-4.7-15.2-3.7c-41.8,5.7-79.4,29.3-102.9,64.8
|
|
||||||
c-4.7,6.8-8.9,14.6-12,21.9c-1.6,3.1-1,6.8,0.5,9.9c4.2,7.3,9.4,14.6,14.1,20.9c7.3,9.9,15.2,18.8,24,27.2
|
|
||||||
c7.3,7.3,15.7,14.1,24,20.9c41.3,30.8,90.9,47,142.1,47s100.8-16.2,142.1-47c8.4-6.3,16.7-13.6,24-20.9c8.4-8.4,16.7-17.2,24-27.2
|
|
||||||
c5.2-6.8,9.9-13.6,14.1-20.9C436.8,341.7,437.3,338,435.8,334.9z"/>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 1.1 KiB |
@ -1,19 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<!-- Generator: Adobe Illustrator 24.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
||||||
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
|
||||||
viewBox="0 0 460.8 460.8" style="enable-background:new 0 0 460.8 460.8;" xml:space="preserve">
|
|
||||||
<g>
|
|
||||||
<g>
|
|
||||||
<path d="M230.4,0c-65.8,0-119.6,53.8-119.6,119.6s53.8,119.6,119.6,119.6S350,185.4,350,119.6S296.3,0,230.4,0z"/>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
<g>
|
|
||||||
<g>
|
|
||||||
<path d="M435.8,334.9c-3.1-7.8-7.3-15.2-12-21.9c-24-35.5-61.1-59-102.9-64.8c-5.2-0.5-11,0.5-15.2,3.7
|
|
||||||
c-21.9,16.2-48.1,24.6-75.2,24.6s-53.3-8.4-75.2-24.6c-4.2-3.1-9.9-4.7-15.2-3.7c-41.8,5.7-79.4,29.3-102.9,64.8
|
|
||||||
c-4.7,6.8-8.9,14.6-12,21.9c-1.6,3.1-1,6.8,0.5,9.9c4.2,7.3,9.4,14.6,14.1,20.9c7.3,9.9,15.2,18.8,24,27.2
|
|
||||||
c7.3,7.3,15.7,14.1,24,20.9c41.3,30.8,90.9,47,142.1,47s100.8-16.2,142.1-47c8.4-6.3,16.7-13.6,24-20.9c8.4-8.4,16.7-17.2,24-27.2
|
|
||||||
c5.2-6.8,9.9-13.6,14.1-20.9C436.8,341.7,437.3,338,435.8,334.9z"/>
|
|
||||||
</g>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 1.0 KiB |
@ -28,81 +28,3 @@ button {
|
|||||||
background: none;
|
background: none;
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hidden {
|
|
||||||
opacity: 0;
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.MuiSnackbar-root {
|
|
||||||
width: 90%;
|
|
||||||
left: 50% !important;
|
|
||||||
bottom: 90px !important;
|
|
||||||
transform: translateX(-50%);
|
|
||||||
}
|
|
||||||
|
|
||||||
.MuiSnackbarContent-root {
|
|
||||||
background: white !important;
|
|
||||||
color: black !important;
|
|
||||||
justify-content: space-between;
|
|
||||||
padding: 3.5vw 4vw !important;
|
|
||||||
border: 1px solid rgba(0, 0, 0, 0.2);
|
|
||||||
}
|
|
||||||
|
|
||||||
.MuiSnackbarContent-action {
|
|
||||||
flex-basis: 38%;
|
|
||||||
justify-content: flex-end;
|
|
||||||
margin-left: 0 !important;
|
|
||||||
margin-right: 0 !important;
|
|
||||||
padding-left: 0 !important;
|
|
||||||
height: 7.5vw;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.MuiButtonBase-root{
|
|
||||||
width: 100%;
|
|
||||||
padding: 0 !important;
|
|
||||||
justify-content: space-between;
|
|
||||||
}
|
|
||||||
|
|
||||||
.MuiButtonBase-root:active {
|
|
||||||
background: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.MuiTouchRipple-root {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.MuiSnackbarContent-message {
|
|
||||||
flex-basis: 60%;
|
|
||||||
padding: 0 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.MuiIconButton-label {
|
|
||||||
justify-content: flex-end !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.MuiIconButton-label a {
|
|
||||||
align-items: center;
|
|
||||||
font-size: 3.5vw;
|
|
||||||
color: black;
|
|
||||||
text-decoration: none;
|
|
||||||
margin-right: 5vw;
|
|
||||||
}
|
|
||||||
|
|
||||||
.MuiIconButton-label img {
|
|
||||||
height: 3.5vw;
|
|
||||||
}
|
|
||||||
|
|
||||||
#snackDisruptInfo {
|
|
||||||
display: flex;
|
|
||||||
height: 7.5vw;
|
|
||||||
align-items: center;
|
|
||||||
font-size: 3.5vw;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
#snackDisruptInfo img {
|
|
||||||
height: 100%;
|
|
||||||
margin-right: 15px;
|
|
||||||
}
|
|
@ -5,8 +5,10 @@ import App from './App';
|
|||||||
import reportWebVitals from './reportWebVitals';
|
import reportWebVitals from './reportWebVitals';
|
||||||
|
|
||||||
ReactDOM.render(
|
ReactDOM.render(
|
||||||
<App />,
|
<React.StrictMode>
|
||||||
document.getElementById('root')
|
<App />
|
||||||
|
</React.StrictMode>,
|
||||||
|
document.getElementById('root')
|
||||||
);
|
);
|
||||||
|
|
||||||
// If you want to start measuring performance in your app, pass a function
|
// If you want to start measuring performance in your app, pass a function
|
||||||
|
7
src/logo.svg
Normal file
7
src/logo.svg
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 841.9 595.3">
|
||||||
|
<g fill="#61DAFB">
|
||||||
|
<path d="M666.3 296.5c0-32.5-40.7-63.3-103.1-82.4 14.4-63.6 8-114.2-20.2-130.4-6.5-3.8-14.1-5.6-22.4-5.6v22.3c4.6 0 8.3.9 11.4 2.6 13.6 7.8 19.5 37.5 14.9 75.7-1.1 9.4-2.9 19.3-5.1 29.4-19.6-4.8-41-8.5-63.5-10.9-13.5-18.5-27.5-35.3-41.6-50 32.6-30.3 63.2-46.9 84-46.9V78c-27.5 0-63.5 19.6-99.9 53.6-36.4-33.8-72.4-53.2-99.9-53.2v22.3c20.7 0 51.4 16.5 84 46.6-14 14.7-28 31.4-41.3 49.9-22.6 2.4-44 6.1-63.6 11-2.3-10-4-19.7-5.2-29-4.7-38.2 1.1-67.9 14.6-75.8 3-1.8 6.9-2.6 11.5-2.6V78.5c-8.4 0-16 1.8-22.6 5.6-28.1 16.2-34.4 66.7-19.9 130.1-62.2 19.2-102.7 49.9-102.7 82.3 0 32.5 40.7 63.3 103.1 82.4-14.4 63.6-8 114.2 20.2 130.4 6.5 3.8 14.1 5.6 22.5 5.6 27.5 0 63.5-19.6 99.9-53.6 36.4 33.8 72.4 53.2 99.9 53.2 8.4 0 16-1.8 22.6-5.6 28.1-16.2 34.4-66.7 19.9-130.1 62-19.1 102.5-49.9 102.5-82.3zm-130.2-66.7c-3.7 12.9-8.3 26.2-13.5 39.5-4.1-8-8.4-16-13.1-24-4.6-8-9.5-15.8-14.4-23.4 14.2 2.1 27.9 4.7 41 7.9zm-45.8 106.5c-7.8 13.5-15.8 26.3-24.1 38.2-14.9 1.3-30 2-45.2 2-15.1 0-30.2-.7-45-1.9-8.3-11.9-16.4-24.6-24.2-38-7.6-13.1-14.5-26.4-20.8-39.8 6.2-13.4 13.2-26.8 20.7-39.9 7.8-13.5 15.8-26.3 24.1-38.2 14.9-1.3 30-2 45.2-2 15.1 0 30.2.7 45 1.9 8.3 11.9 16.4 24.6 24.2 38 7.6 13.1 14.5 26.4 20.8 39.8-6.3 13.4-13.2 26.8-20.7 39.9zm32.3-13c5.4 13.4 10 26.8 13.8 39.8-13.1 3.2-26.9 5.9-41.2 8 4.9-7.7 9.8-15.6 14.4-23.7 4.6-8 8.9-16.1 13-24.1zM421.2 430c-9.3-9.6-18.6-20.3-27.8-32 9 .4 18.2.7 27.5.7 9.4 0 18.7-.2 27.8-.7-9 11.7-18.3 22.4-27.5 32zm-74.4-58.9c-14.2-2.1-27.9-4.7-41-7.9 3.7-12.9 8.3-26.2 13.5-39.5 4.1 8 8.4 16 13.1 24 4.7 8 9.5 15.8 14.4 23.4zM420.7 163c9.3 9.6 18.6 20.3 27.8 32-9-.4-18.2-.7-27.5-.7-9.4 0-18.7.2-27.8.7 9-11.7 18.3-22.4 27.5-32zm-74 58.9c-4.9 7.7-9.8 15.6-14.4 23.7-4.6 8-8.9 16-13 24-5.4-13.4-10-26.8-13.8-39.8 13.1-3.1 26.9-5.8 41.2-7.9zm-90.5 125.2c-35.4-15.1-58.3-34.9-58.3-50.6 0-15.7 22.9-35.6 58.3-50.6 8.6-3.7 18-7 27.7-10.1 5.7 19.6 13.2 40 22.5 60.9-9.2 20.8-16.6 41.1-22.2 60.6-9.9-3.1-19.3-6.5-28-10.2zM310 490c-13.6-7.8-19.5-37.5-14.9-75.7 1.1-9.4 2.9-19.3 5.1-29.4 19.6 4.8 41 8.5 63.5 10.9 13.5 18.5 27.5 35.3 41.6 50-32.6 30.3-63.2 46.9-84 46.9-4.5-.1-8.3-1-11.3-2.7zm237.2-76.2c4.7 38.2-1.1 67.9-14.6 75.8-3 1.8-6.9 2.6-11.5 2.6-20.7 0-51.4-16.5-84-46.6 14-14.7 28-31.4 41.3-49.9 22.6-2.4 44-6.1 63.6-11 2.3 10.1 4.1 19.8 5.2 29.1zm38.5-66.7c-8.6 3.7-18 7-27.7 10.1-5.7-19.6-13.2-40-22.5-60.9 9.2-20.8 16.6-41.1 22.2-60.6 9.9 3.1 19.3 6.5 28.1 10.2 35.4 15.1 58.3 34.9 58.3 50.6-.1 15.7-23 35.6-58.4 50.6zM320.8 78.4z"/>
|
||||||
|
<circle cx="420.9" cy="296.5" r="45.7"/>
|
||||||
|
<path d="M520.5 78.1z"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 2.6 KiB |
@ -3,7 +3,6 @@
|
|||||||
--colorVT2: rgb(25, 212, 245);
|
--colorVT2: rgb(25, 212, 245);
|
||||||
--colorBg: rgb(240, 248, 250);
|
--colorBg: rgb(240, 248, 250);
|
||||||
--colorLine: rgb(0, 108, 144);
|
--colorLine: rgb(0, 108, 144);
|
||||||
--colorDiscrete: rgba(0, 0, 0, 0.4);
|
|
||||||
|
|
||||||
--topMenuHeight: 15vh;
|
--topMenuHeight: 15vh;
|
||||||
--borderRadius: calc(var(--topMenuHeight) / 15);
|
--borderRadius: calc(var(--topMenuHeight) / 15);
|
||||||
|
Loading…
Reference in New Issue
Block a user