diff --git a/README.md b/README.md index cd228ae60..df13d1b34 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,7 @@ More project documentation can be found on the [Repository Wiki](https://github. 12. Run `npm install` 13. Build the frontend using `npx vue-cli-service build --mode development` - _Note: if you are working on the frontend, you may instead use `npx vue-cli-service build --mode development --watch` in another terminal to continuously watch for changes and rebuild._ + - _Note 2: if you are running the newest version of macOS and see an error involving 64-bit support, try using node version 10.16.3._ 14. Go back up to the project root directory and build Shuttle Tracker by running `go build -o shuttletracker ./cmd/shuttletracker` 15. Start the app by running `./shuttletracker` 16. Add yourself as an administrator by using `./shuttletracker admins --add RCS_ID`, replacing `RCS_ID` with your RCS ID. See the "Administrators" section below for more information. diff --git a/api/api.go b/api/api.go index 1658b4183..eddae426e 100644 --- a/api/api.go +++ b/api/api.go @@ -122,6 +122,9 @@ func New(cfg Config, ms shuttletracker.ModelService, msg shuttletracker.MessageS }) }) + // TV panel display + r.Get("/tvpanel", api.IndexHandler) + // Fusion r.Mount("/fusion", api.fm.router(cli.casauth)) diff --git a/frontend/package-lock.json b/frontend/package-lock.json index a7ed57a77..05e9b0942 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -4648,6 +4648,30 @@ "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==", "dev": true }, + "axios": { + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.0.tgz", + "integrity": "sha512-1uvKqKQta3KBxIz14F2v06AEHZ/dIoeKfbTRkK1E5oqjDnuEerLmYTgJB5AiQZHJcljpg1TuRzdjDR06qNk0DQ==", + "requires": { + "follow-redirects": "1.5.10", + "is-buffer": "^2.0.2" + }, + "dependencies": { + "follow-redirects": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz", + "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==", + "requires": { + "debug": "=3.1.0" + } + }, + "is-buffer": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz", + "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==" + } + } + }, "babel-code-frame": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", @@ -6481,7 +6505,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, "requires": { "ms": "2.0.0" } @@ -9226,6 +9249,11 @@ } } }, + "http": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/http/-/http-0.0.0.tgz", + "integrity": "sha1-huYybSnF0Dnen6xYSkVon5KfT3I=" + }, "http-deceiver": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz", @@ -11130,8 +11158,7 @@ "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, "multicast-dns": { "version": "6.2.3", diff --git a/frontend/package.json b/frontend/package.json index ebac8d616..a18f4c364 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -16,8 +16,10 @@ "@types/leaflet-routing-machine": "^3.2.1", "@types/webpack-env": "^1.13.9", "ajv": "^6.5.4", + "axios": "^0.19.0", "buefy": "^0.7.2", "bulma": "^0.7.2", + "http": "0.0.0", "leaflet": "^1.3.4", "leaflet-rotatedmarker": "^0.2.0", "leaflet-routing-machine": "^3.2.12", diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 1d0df1586..563a8e518 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -5,23 +5,18 @@ - diff --git a/frontend/src/components/tvpanel.vue b/frontend/src/components/tvpanel.vue new file mode 100644 index 000000000..417efa7f1 --- /dev/null +++ b/frontend/src/components/tvpanel.vue @@ -0,0 +1,62 @@ + + + + + diff --git a/frontend/src/components/tvpanel/ETAs.vue b/frontend/src/components/tvpanel/ETAs.vue new file mode 100644 index 000000000..cb6cef2cd --- /dev/null +++ b/frontend/src/components/tvpanel/ETAs.vue @@ -0,0 +1,127 @@ + + + + + diff --git a/frontend/src/components/tvpanel/Header.vue b/frontend/src/components/tvpanel/Header.vue new file mode 100644 index 000000000..cce15a9e9 --- /dev/null +++ b/frontend/src/components/tvpanel/Header.vue @@ -0,0 +1,65 @@ + + + + + diff --git a/frontend/src/components/tvpanel/Map.vue b/frontend/src/components/tvpanel/Map.vue new file mode 100644 index 000000000..64d498a3f --- /dev/null +++ b/frontend/src/components/tvpanel/Map.vue @@ -0,0 +1,274 @@ + + + + + diff --git a/frontend/src/components/tvpanel/News.vue b/frontend/src/components/tvpanel/News.vue new file mode 100644 index 000000000..d8030964c --- /dev/null +++ b/frontend/src/components/tvpanel/News.vue @@ -0,0 +1,47 @@ + + + + + diff --git a/frontend/src/components/tvpanel/TimeDisplay.vue b/frontend/src/components/tvpanel/TimeDisplay.vue new file mode 100644 index 000000000..f0954b86f --- /dev/null +++ b/frontend/src/components/tvpanel/TimeDisplay.vue @@ -0,0 +1,91 @@ + + + + + diff --git a/frontend/src/components/tvpanel/assets/TV Panel Wireframe.png b/frontend/src/components/tvpanel/assets/TV Panel Wireframe.png new file mode 100644 index 000000000..66b21421e Binary files /dev/null and b/frontend/src/components/tvpanel/assets/TV Panel Wireframe.png differ diff --git a/frontend/src/index.ts b/frontend/src/index.ts index 17c1535b7..9afa24019 100644 --- a/frontend/src/index.ts +++ b/frontend/src/index.ts @@ -5,6 +5,7 @@ import about from './components/about.vue'; import schedules from '@/components/schedules.vue'; import settings from '@/components/settings.vue'; import etas from '@/components/etas.vue'; +import tvpanel from '@/components/tvpanel.vue'; import Resources from '@/resources'; Vue.use(Router); @@ -38,5 +39,10 @@ export default new Router({ name: 'settings', component: settings, }, + { + path: '/tvpanel', + name: 'tvpanel', + component: tvpanel, + }, ], }); diff --git a/go.mod b/go.mod index 4f8b66c75..f0a19e304 100644 --- a/go.mod +++ b/go.mod @@ -21,4 +21,4 @@ require ( golang.org/x/sys v0.0.0-20190318195719-6c81ef8f67ca // indirect gopkg.in/cas.v2 v2.1.0 gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect -) \ No newline at end of file +)