diff --git a/src/components/BarChart.vue b/src/components/BarChart.vue index ee872b2..49f6f98 100644 --- a/src/components/BarChart.vue +++ b/src/components/BarChart.vue @@ -1,13 +1,7 @@ + \ No newline at end of file diff --git a/src/components/pieChart.vue b/src/components/pieChart.vue index 6fd04ae..46def1f 100644 --- a/src/components/pieChart.vue +++ b/src/components/pieChart.vue @@ -1,9 +1,8 @@ \ No newline at end of file diff --git a/src/pages/LoginPage.vue b/src/pages/LoginPage.vue index 4417569..8c57503 100644 --- a/src/pages/LoginPage.vue +++ b/src/pages/LoginPage.vue @@ -164,7 +164,7 @@ export default { } #eyeImg:hover{ - transform: scale(1.3); + transform: scale(1.1); } h1 { diff --git a/src/pages/MapPage.vue b/src/pages/MapPage.vue index 7cfedcb..5ab8d94 100644 --- a/src/pages/MapPage.vue +++ b/src/pages/MapPage.vue @@ -508,8 +508,7 @@ export default { } .trainMapIcon:hover { - width:30px; - height:34px; + transform: scale(1.2); cursor: pointer; } @@ -593,7 +592,7 @@ export default { #publicMessageTicker { z-index: 3; - position: absolute; + position: fixed; bottom:0px; width:100%; background-color: rgb(255, 255, 125); diff --git a/src/pages/SignUpPage.vue b/src/pages/SignUpPage.vue index 587e37e..fd7797f 100644 --- a/src/pages/SignUpPage.vue +++ b/src/pages/SignUpPage.vue @@ -6,7 +6,7 @@

Sign Up

Email Address

-

Password (6 or more characters)

+

Password (6+ characters)

show @@ -129,7 +129,7 @@ export default { } #eyeImg:hover{ - transform: scale(1.3); + transform: scale(1.1); } h1 { diff --git a/src/store/new.js b/src/store/new.js deleted file mode 100644 index f6b8b07..0000000 --- a/src/store/new.js +++ /dev/null @@ -1,171 +0,0 @@ -import { reactive } from 'vue' -import { fromLonLat } from 'ol/proj.js'; -import { getFunctions, httpsCallable, connectFunctionsEmulator } from "firebase/functions"; -import app from '../api/firebase'; - -export const store = reactive({ - // map and insights data - insights: {}, - latestTrain: {}, - earliestTrain: {}, - orderedTrains: [], - selectedTrain: {}, - selectedStation: {}, - allTrainsJSON: {}, - - // side bar - displaySelectedTrain: false, - displayedSelectedStation: false, - - // login status - loggedIn: false, - isWaitingForLoginStatus: true, - - setOrderedTrains(unorderedTrains) { - // sort in ascending order - unorderedTrains.sort((a, b) => { - return a.time - b.time - }) - this.orderedTrains = unorderedTrains - }, - - // method to populate the database for local testing - postTrainAndStationData(host) { - const functions = getFunctions(app); - if (host === '127.0.0.1' || host === 'localhost') { - connectFunctionsEmulator(functions, host, 5001); - } - - const postTrainData = httpsCallable(functions, 'postLiveTrainData'); - postTrainData().then(() => { - const postStationData = httpsCallable(functions, 'postStationData'); - postStationData().then(() => { - this.getTrainAndStationData(host) - }) - }) - .catch((error) => { - console.log(error.message) - //this.showToast(error.message, "red") - }) - }, - - // method to fetch live train and station data from Firestore - getTrainAndStationData(host) { - const functions = getFunctions(app); - if (host === '127.0.0.1' || host == 'localhost') { - connectFunctionsEmulator(functions, host, 5001); - } - const getTrainData = httpsCallable(functions, 'getLiveTrainData'); - getTrainData().then((response) => { - try { - if (!response.data) throw new Error("Error fetching live train data from the database") - var insights = { - "totalNumTrains": 0, - "numRunningTrains": 0, - "numLateRunningTrains": 0, - "numTrains": 0, - "numDarts": 0, - "totalNumStations": 0, - "numTrainStations": 0, - "numDartStations": 0 - }; - - var unorderedTrains = []; - var currentMessages = []; - var latest = null; - var earliest = null; - var currLatestTime = null; - var currEarliestTime = null; - - for (var i=0; i currLatestTime) { - latest = train; - currLatestTime = num; - } - } - // train is early or ontime - else { - if (!earliest) earliest = train; - // check for a new earliest train (early trains are -x mins late) - if (num < currEarliestTime) { - earliest = train; - currEarliestTime = num; - } - } - } - } - - // assign results after looping through JSON - insights["percentageLate"] = ((insights["numLateRunningTrains"] / insights["numRunningTrains"]) * 100).toFixed(2); - insights["percentageNotLate"] = (100 - insights["percentageLate"]).toFixed(2); - insights["latestTime"] = currLatestTime; - insights["earliestTime"] = currEarliestTime; - this.publicMessages = currentMessages; - - // assign the results to the Vue Store - store.setEarliestTrain(earliest); - store.setLatestTrain(latest); - store.setRawData(response.data); - store.setOrderedTrains(unorderedTrains); - - const getStationData = httpsCallable(functions, 'getStationData'); - getStationData().then((response) => { - if (!response.data) throw new Error("Error fetching station from the database"); - for (var i=0; i { - //loader.hide() - //this.showToast("Error fetching live data", "red") - }) - } -}) \ No newline at end of file