Merge pull request #41 from 0hAodha/testCICD

Add Firebase token to deploy.yml
This commit is contained in:
Conor McNamara
2023-03-09 15:06:42 +00:00
committed by GitHub
28 changed files with 2147 additions and 1007 deletions

View File

@ -19,4 +19,9 @@ jobs:
cd functions && npm ci
- name: Firebase deploy
run: npm run build && firebase deploy
run: npm run build
uses: w9jds/firebase-action@main
with:
args: deploy --only hosting
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}

1
dist/assets/InsightsPage-37912657.js vendored Normal file
View File

@ -0,0 +1 @@
import{s as n}from"./store-6f7621d4.js";import{N as u}from"./Navbar-6b07ba01.js";import{_ as p,r as _,o as e,c as a,a as g,b as s,t,d as o,F as l,e as m,p as T,f as b}from"./index-93b9eb88.js";const y={name:"InsightsPage",data(){return{insights:{},latestTrain:{},earliestTrain:{},rawData:{},orderedTrains:[],store:n}},components:{Navbar:u},created(){this.insights=n.insights,this.latestTrain=n.latestTrain,this.earliestTrain=n.earliestTrain,this.rawData=n.rawData,this.orderedTrains=n.orderedTrains}},h=i=>(T("data-v-b6ad733a"),i=i(),b(),i),f=h(()=>s("h1",null,"Insights",-1)),v={key:0},N={key:0},I={key:1},k=h(()=>s("h1",null,"Leaderboard",-1)),C={key:0},D={key:1};function S(i,w,x,L,d,P){const c=_("Navbar");return e(),a(l,null,[g(c),f,this.insights?(e(),a("div",v,[s("p",null,"Total number of trains: "+t(this.insights.totalNumTrains),1),s("p",null,"Number of actively running trains: "+t(this.insights.numRunningTrains),1),s("p",null,"Percentage late: "+t(this.insights.percentageLate)+"%",1),s("p",null,"Percentage early or ontime: "+t(this.insights.percentageNotLate)+"%",1),this.latestTrain.TrainCode?(e(),a("p",N,"Latest train: "+t(this.latestTrain.TrainCode[0])+", "+t(this.insights.latestTime)+" mins late",1)):o("",!0),this.earliestTrain.TrainCode?(e(),a("p",I,"Earliest train: "+t(this.earliestTrain.TrainCode[0])+", "+t(this.insights.earliestTime*-1)+" mins early",1)):o("",!0),s("p",null,"Mainland: "+t(this.insights.numMainland),1),s("p",null,"Suburban: "+t(this.insights.numSuburban),1),s("p",null,"Darts: "+t(this.insights.numDart),1)])):o("",!0),k,(e(!0),a(l,null,m(d.orderedTrains,r=>(e(),a("div",null,[s("h2",null,t(this.rawData[r.jsonIndex].TrainCode[0]),1),r.time>0?(e(),a("p",C,t(r.time)+" mins late",1)):(e(),a("p",D,t(r.time*-1)+" mins early",1))]))),256))],64)}const E=p(y,[["render",S],["__scopeId","data-v-b6ad733a"]]);export{E as default};

View File

@ -1 +0,0 @@
import{s as n,n as u}from"./navbar-764b96b5.js";import{_,r as p,o as e,c as a,a as g,b as s,t,d as o,F as l,e as m,p as T,f as b}from"./index-c8c418b0.js";const f={name:"InsightsPage",data(){return{insights:{},latestTrain:{},earliestTrain:{},rawData:{},orderedTrains:[],store:n}},components:{navbar:u},created(){this.insights=n.insights,this.latestTrain=n.latestTrain,this.earliestTrain=n.earliestTrain,this.rawData=n.rawData,this.orderedTrains=n.orderedTrains}},h=i=>(T("data-v-1daafc6b"),i=i(),b(),i),y=h(()=>s("h1",null,"Insights",-1)),v={key:0},I={key:0},k={key:1},C=h(()=>s("h1",null,"Leaderboard",-1)),D={key:0},N={key:1};function S(i,w,x,L,d,P){const c=p("navbar");return e(),a(l,null,[g(c),y,this.insights?(e(),a("div",v,[s("p",null,"Total number of trains: "+t(this.insights.totalNumTrains),1),s("p",null,"Number of actively running trains: "+t(this.insights.numRunningTrains),1),s("p",null,"Percentage late: "+t(this.insights.percentageLate)+"%",1),s("p",null,"Percentage early or ontime: "+t(this.insights.percentageNotLate)+"%",1),this.latestTrain.TrainCode?(e(),a("p",I,"Latest train: "+t(this.latestTrain.TrainCode[0])+", "+t(this.insights.latestTime)+" mins late",1)):o("",!0),this.earliestTrain.TrainCode?(e(),a("p",k,"Earliest train: "+t(this.earliestTrain.TrainCode[0])+", "+t(this.insights.earliestTime*-1)+" mins early",1)):o("",!0),s("p",null,"Mainland: "+t(this.insights.numMainland),1),s("p",null,"Suburban: "+t(this.insights.numSuburban),1),s("p",null,"Darts: "+t(this.insights.numDart),1)])):o("",!0),C,(e(!0),a(l,null,m(d.orderedTrains,r=>(e(),a("div",null,[s("h2",null,t(this.rawData[r.jsonIndex].TrainCode[0]),1),r.time>0?(e(),a("p",D,t(r.time)+" mins late",1)):(e(),a("p",N,t(r.time*-1)+" mins early",1))]))),256))],64)}const $=_(f,[["render",S],["__scopeId","data-v-1daafc6b"]]);export{$ as default};

1
dist/assets/InsightsPage-9f2265bd.css vendored Normal file
View File

@ -0,0 +1 @@
body[data-v-b6ad733a]{background-color:#2c6666}

View File

@ -1 +0,0 @@
.navbarLink[data-v-1daafc6b]{font-family:Franklin Gothic Medium,Arial Narrow,Arial,sans-serif;font-size:24px}body[data-v-1daafc6b]{background-color:#2c6666}

1
dist/assets/LoginPage-a53ab66f.js vendored Normal file
View File

@ -0,0 +1 @@
import{_ as g,h,l as v,r as d,o as w,c as f,a as p,b as o,m as c,v as u,w as b,F as x,i as k,k as N,p as y,f as E}from"./index-93b9eb88.js";import{N as I}from"./Navbar-6b07ba01.js";const L={name:"LoginPage",data(){return{email:"",password:""}},components:{Navbar:I},methods:{login(){const s=h(k);v(s,this.email,this.password).then(e=>{e.user,this.$router.push({path:"/secure"})}).catch(e=>{const l=e.code,r=e.message;console.log(l),console.log(r)})}}},n=s=>(y("data-v-67d86943"),s=s(),E(),s),P={id:"background"},V={class:"loginbox"},C=n(()=>o("img",{src:"https://cdn.discordapp.com/attachments/1017419092447207436/1063092138029625394/pixil-frame-0.png",class:"avatar"},null,-1)),A=n(()=>o("h1",null,"Login",-1)),B=n(()=>o("p",null,"Email Address",-1)),S=n(()=>o("p",null,"Password",-1));function D(s,e,l,r,a,i){const _=d("Navbar"),m=d("router-link");return w(),f(x,null,[p(_),o("div",P,[o("div",V,[C,A,B,c(o("input",{type:"email","onUpdate:modelValue":e[0]||(e[0]=t=>a.email=t),"aria-describedby":"emailHelp",placeholder:"Enter email"},null,512),[[u,a.email]]),S,c(o("input",{type:"password","onUpdate:modelValue":e[1]||(e[1]=t=>a.password=t),placeholder:"Enter password"},null,512),[[u,a.password]]),o("input",{onClick:e[2]||(e[2]=(...t)=>i.login&&i.login(...t)),type:"submit",name:"",value:"Login"}),o("a",null,[p(m,{to:"/signup"},{default:b(()=>[N("Don't have an account?")]),_:1})])])])],64)}const T=g(L,[["render",D],["__scopeId","data-v-67d86943"]]);export{T as default};

1
dist/assets/LoginPage-d42bd1fa.css vendored Normal file
View File

@ -0,0 +1 @@
#background[data-v-67d86943]{margin:0;padding:0;width:100%;height:100%;position:absolute;background-color:#e0e0e0;font-family:sans-serif}.loginbox[data-v-67d86943]{height:420px;width:320px;background:#000;color:#fff;top:50%;left:50%;position:absolute;transform:translate(-50%,-50%);box-sizing:border-box;padding:70px 30px}h1[data-v-67d86943]{margin:0;padding:0 0 20px;font-size:22px;text-align:center}.loginbox p[data-v-67d86943]{margin:0;padding:0;font-weight:700}.loginbox input[data-v-67d86943]{width:100%;margin-bottom:20px}.loginbox input[type=email][data-v-67d86943],input[type=password][data-v-67d86943]{border:none;border-bottom:1px solid #fff;background:transparent;outline:none;height:40px;color:#fff;font-size:16px}.loginbox input[type=submit][data-v-67d86943]:hover{cursor:pointer;background:#66a3ff;color:#000}.loginbox a[data-v-67d86943]{text-decoration:none;font-size:12px;line-height:20px;color:#a9a9a9}.loginbox a[data-v-67d86943]:hover{color:#ffc107}.loginbox input[type=submit][data-v-67d86943]{border:none;outline:none;height:40px;background:#0052cc;font-size:18px;border-radius:20px}.avatar[data-v-67d86943]{width:100px;height:100px;border-radius:50%;position:absolute;top:-50px;left:calc(50% - 50px)}

File diff suppressed because one or more lines are too long

1
dist/assets/MapPage-26750926.css vendored Normal file
View File

@ -0,0 +1 @@
#sidebarHeader[data-v-34a2bae4]{position:relative;top:0%;height:15%;width:100%;overflow:hidden}#sidebarDiv[data-v-34a2bae4]{position:absolute;height:80%;width:100%;color:#fff}#headerImage[data-v-34a2bae4]{height:80%;width:auto;overflow:hidden;position:relative;top:10px}#xButton[data-v-34a2bae4]{font-size:80%;font-family:Georgia;color:#fff;position:absolute;top:10px;right:10px}#xButton[data-v-34a2bae4]:hover{color:red}.overlay-content[data-v-8f7d73f5]{width:1%}.trainMapIcon[data-v-8f7d73f5]{width:28px;height:32px}#sidebar[data-v-8f7d73f5]{position:absolute;height:85%;width:20%;left:2%;top:12%;z-index:2;text-align:center;animation:gradient-8f7d73f5 15s ease infinite;background:linear-gradient(45deg,#000000,#111111,#222222,#333333,#444444,#555555);background-size:400%,400%;box-shadow:0 0 4px 2px #333;overflow:hidden;font-family:Franklin Gothic Medium,Arial Narrow,Arial,sans-serif}.slideLeft-enter-active[data-v-8f7d73f5],.slideLeft-leave-active[data-v-8f7d73f5]{transition:opacity .5s;transition:all .8s}.slideLeft-enter-from[data-v-8f7d73f5],.slideLeft-leave-to[data-v-8f7d73f5]{opacity:0;transform:translate(-100px)}@keyframes gradient-8f7d73f5{0%{background-position:0% 50%}50%{background-position:100% 50%}to{background-position:0% 50%}}#publicMessageTicker[data-v-8f7d73f5]{z-index:3;position:absolute;bottom:0px;width:100%;background-color:#ffff7d;color:#000;font-family:Franklin Gothic Medium,Arial Narrow,Arial,sans-serif;text-align:bottom;font-size:17px}

View File

@ -1 +0,0 @@
.overlay-content[data-v-0c5ec56d]{width:1%}.trainMapIcon[data-v-0c5ec56d]{width:28px;height:32px}.slideLeft-enter-active[data-v-0c5ec56d],.slideLeft-leave-active[data-v-0c5ec56d]{transition:opacity .5s;transition:all .8s}.slideLeft-enter-from[data-v-0c5ec56d],.slideLeft-leave-to[data-v-0c5ec56d]{opacity:0;transform:translate(-100px)}@keyframes gradient-0c5ec56d{0%{background-position:0% 50%}50%{background-position:100% 50%}to{background-position:0% 50%}}#sidebar[data-v-0c5ec56d]{position:absolute;height:85%;width:20%;left:2%;top:12%;z-index:2;text-align:center;animation:gradient-0c5ec56d 15s ease infinite;background:linear-gradient(45deg,#000000,#111111,#222222,#333333,#444444,#555555);background-size:400%,400%;box-shadow:0 0 4px 2px #333;overflow:hidden;font-family:Franklin Gothic Medium,Arial Narrow,Arial,sans-serif}#sidebarHeader[data-v-0c5ec56d]{position:relative;top:0%;height:15%;width:100%;overflow:hidden}#sidebarDiv[data-v-0c5ec56d]{position:absolute;height:80%;width:100%;color:#fff}#headerImage[data-v-0c5ec56d]{height:80%;width:auto;overflow:hidden;position:relative;top:10px}#xButton[data-v-0c5ec56d]{font-size:80%;font-family:Georgia;color:#fff;position:absolute;top:10px;right:10px}#xButton[data-v-0c5ec56d]:hover{color:red}#hoverButton[data-v-0c5ec56d]{z-index:3;position:absolute;bottom:0px;width:100%}

7
dist/assets/MapPage-66b44c57.js vendored Normal file

File diff suppressed because one or more lines are too long

1
dist/assets/Navbar-6b07ba01.js vendored Normal file
View File

@ -0,0 +1 @@
import{_ as p,h as l,i as u,j as f,s as k,r as v,o as n,c as i,b as c,a as t,w as s,k as o,d as _,p as b,f as m}from"./index-93b9eb88.js";const L={name:"Navbar",data(){return{isLoggedIn:!1}},created(){const a=l(u);f(a,d=>{d?this.isLoggedIn=!0:this.isLoggedIn=!1})},methods:{logout(){k(l(u)).then(()=>{this.$router.push("/")})}}},h=a=>(b("data-v-90353ff1"),a=a(),m(),a),I={class:"navbar navbar-light bg-light"},x={class:"container-fluid"},N=h(()=>c("img",{src:"https://cdn.discordapp.com/attachments/1017419092447207436/1063092138029625394/pixil-frame-0.png",alt:"mascot",width:"55",height:"40",class:"d-inline-block align-text-middle"},null,-1)),y=h(()=>c("b",null,"Irish Rail Tracker",-1)),C={class:"navbarLink"},S={class:"navbarLink"},w={key:0,class:"navbarLink"},V={key:1,class:"navbarLink"},B={key:2,class:"navbarLink"},A={key:3,class:"navbarLink"};function T(a,d,j,E,r,g){const e=v("router-link");return n(),i("nav",I,[c("div",x,[t(e,{to:"/",class:"navbar-brand"},{default:s(()=>[N,y]),_:1}),c("a",C,[t(e,{to:"/"},{default:s(()=>[o("Home")]),_:1})]),c("a",S,[t(e,{to:"/insights"},{default:s(()=>[o("Insights")]),_:1})]),r.isLoggedIn?(n(),i("a",w,[t(e,{to:"/secure"},{default:s(()=>[o("Secure")]),_:1})])):_("",!0),r.isLoggedIn?(n(),i("a",V,[t(e,{onClick:g.logout,to:"/"},{default:s(()=>[o("Logout")]),_:1},8,["onClick"])])):_("",!0),r.isLoggedIn?_("",!0):(n(),i("a",B,[t(e,{to:"/login"},{default:s(()=>[o("Login")]),_:1})])),r.isLoggedIn?_("",!0):(n(),i("a",A,[t(e,{to:"/signup"},{default:s(()=>[o("Sign Up")]),_:1})]))])])}const O=p(L,[["render",T],["__scopeId","data-v-90353ff1"]]);export{O as N};

1
dist/assets/Navbar-f25ac83d.css vendored Normal file
View File

@ -0,0 +1 @@
.navbarLink[data-v-90353ff1]{font-family:Franklin Gothic Medium,Arial Narrow,Arial,sans-serif;font-size:150%}

1
dist/assets/SecurePage-156dc9e7.js vendored Normal file
View File

@ -0,0 +1 @@
import{N as c}from"./Navbar-6b07ba01.js";import{_ as s,r,o as l,c as u,a as i,F as p,i as m,b as _}from"./index-93b9eb88.js";import{g as f,c as d,h}from"./index.esm2017-da4ff3a2.js";const g={name:"SecurePage",components:{Navbar:c},created(){const o=f(m);let e=window.location.hostname;(e==="127.0.0.1"||e==="localhost")&&d(o,e,5001),h(o,"securefunction")().then(t=>{console.log(t)})}},F=_("h1",null,"Secure",-1);function N(o,e,n,t,b,v){const a=r("Navbar");return l(),u(p,null,[i(a),F],64)}const S=s(g,[["render",N]]);export{S as default};

1
dist/assets/SignUpPage-51a5895d.css vendored Normal file
View File

@ -0,0 +1 @@
#background[data-v-925f3a88]{margin:0;padding:0;width:100%;height:100%;position:absolute;background-color:#e0e0e0;font-family:sans-serif}.loginbox[data-v-925f3a88]{height:420px;width:320px;background:#000;color:#fff;top:50%;left:50%;position:absolute;transform:translate(-50%,-50%);box-sizing:border-box;padding:70px 30px}h1[data-v-925f3a88]{margin:0;padding:0 0 20px;font-size:22px;text-align:center}.loginbox p[data-v-925f3a88]{margin:0;padding:0;font-weight:700}.loginbox input[data-v-925f3a88]{width:100%;margin-bottom:20px}.loginbox input[type=email][data-v-925f3a88],input[type=password][data-v-925f3a88]{border:none;border-bottom:1px solid #fff;background:transparent;outline:none;height:40px;color:#fff;font-size:16px}.loginbox input[type=submit][data-v-925f3a88]:hover{cursor:pointer;background:#66a3ff;color:#000}.loginbox a[data-v-925f3a88]{text-decoration:none;font-size:12px;line-height:20px;color:#a9a9a9}.loginbox a[data-v-925f3a88]:hover{color:#ffc107}.loginbox input[type=submit][data-v-925f3a88]{border:none;outline:none;height:40px;background:#0052cc;font-size:18px;border-radius:20px}.avatar[data-v-925f3a88]{width:100px;height:100px;border-radius:50%;position:absolute;top:-50px;left:calc(50% - 50px)}

1
dist/assets/SignUpPage-f56cbda8.js vendored Normal file
View File

@ -0,0 +1 @@
import{_ as g,h,H as v,r as i,o as f,c as w,a as d,b as s,m as c,v as u,w as b,F as x,i as S,k,p as y,f as N}from"./index-93b9eb88.js";import{N as U}from"./Navbar-6b07ba01.js";const E={name:"SignupPage",data(){return{email:"",password:""}},components:{Navbar:U},methods:{signup(){const a=h(S);v(a,this.email,this.password).then(e=>{e.user,this.$router.push({path:"/secure"})}).catch(e=>{const r=e.code,l=e.message;console.log(r),console.log(l)})}}},n=a=>(y("data-v-925f3a88"),a=a(),N(),a),P={id:"background"},V={class:"loginbox"},A=n(()=>s("img",{src:"https://cdn.discordapp.com/attachments/1017419092447207436/1063092138029625394/pixil-frame-0.png",class:"avatar"},null,-1)),C=n(()=>s("h1",null,"Sign Up",-1)),I=n(()=>s("p",null,"Email Address",-1)),B=n(()=>s("p",null,"Password",-1));function F(a,e,r,l,t,p){const _=i("Navbar"),m=i("router-link");return f(),w(x,null,[d(_),s("div",P,[s("div",V,[A,C,I,c(s("input",{type:"email","onUpdate:modelValue":e[0]||(e[0]=o=>t.email=o),"aria-describedby":"emailHelp",placeholder:"Enter email"},null,512),[[u,t.email]]),B,c(s("input",{type:"password","onUpdate:modelValue":e[1]||(e[1]=o=>t.password=o),placeholder:"Enter password"},null,512),[[u,t.password]]),s("input",{onClick:e[2]||(e[2]=(...o)=>p.signup&&p.signup(...o)),type:"submit",name:"",value:"Sign Up"}),s("a",null,[d(m,{to:"/login"},{default:b(()=>[k("Already have an account?")]),_:1})])])])],64)}const T=g(E,[["render",F],["__scopeId","data-v-925f3a88"]]);export{T as default};

2015
dist/assets/index-93b9eb88.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

106
dist/assets/index.esm2017-da4ff3a2.js vendored Normal file
View File

@ -0,0 +1,106 @@
import{y,C as I,z as N,A as D,B as g,D as C,E as O,G as _}from"./index-93b9eb88.js";/**
* @license
* Copyright 2017 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/const P="type.googleapis.com/google.protobuf.Int64Value",S="type.googleapis.com/google.protobuf.UInt64Value";function w(e,t){const n={};for(const r in e)e.hasOwnProperty(r)&&(n[r]=t(e[r]));return n}function h(e){if(e==null)return null;if(e instanceof Number&&(e=e.valueOf()),typeof e=="number"&&isFinite(e)||e===!0||e===!1||Object.prototype.toString.call(e)==="[object String]")return e;if(e instanceof Date)return e.toISOString();if(Array.isArray(e))return e.map(t=>h(t));if(typeof e=="function"||typeof e=="object")return w(e,t=>h(t));throw new Error("Data cannot be encoded in JSON: "+e)}function d(e){if(e==null)return e;if(e["@type"])switch(e["@type"]){case P:case S:{const t=Number(e.value);if(isNaN(t))throw new Error("Data cannot be decoded from JSON: "+e);return t}default:throw new Error("Data cannot be decoded from JSON: "+e)}return Array.isArray(e)?e.map(t=>d(t)):typeof e=="function"||typeof e=="object"?w(e,t=>d(t)):e}/**
* @license
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/const m="functions";/**
* @license
* Copyright 2017 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/const T={OK:"ok",CANCELLED:"cancelled",UNKNOWN:"unknown",INVALID_ARGUMENT:"invalid-argument",DEADLINE_EXCEEDED:"deadline-exceeded",NOT_FOUND:"not-found",ALREADY_EXISTS:"already-exists",PERMISSION_DENIED:"permission-denied",UNAUTHENTICATED:"unauthenticated",RESOURCE_EXHAUSTED:"resource-exhausted",FAILED_PRECONDITION:"failed-precondition",ABORTED:"aborted",OUT_OF_RANGE:"out-of-range",UNIMPLEMENTED:"unimplemented",INTERNAL:"internal",UNAVAILABLE:"unavailable",DATA_LOSS:"data-loss"};class u extends _{constructor(t,n,r){super(`${m}/${t}`,n||""),this.details=r}}function b(e){if(e>=200&&e<300)return"ok";switch(e){case 0:return"internal";case 400:return"invalid-argument";case 401:return"unauthenticated";case 403:return"permission-denied";case 404:return"not-found";case 409:return"aborted";case 429:return"resource-exhausted";case 499:return"cancelled";case 500:return"internal";case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline-exceeded"}return"unknown"}function v(e,t){let n=b(e),r=n,i;try{const o=t&&t.error;if(o){const s=o.status;if(typeof s=="string"){if(!T[s])return new u("internal","internal");n=T[s],r=s}const c=o.message;typeof c=="string"&&(r=c),i=o.details,i!==void 0&&(i=d(i))}}catch{}return n==="ok"?null:new u(n,r,i)}/**
* @license
* Copyright 2017 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/class L{constructor(t,n,r){this.auth=null,this.messaging=null,this.appCheck=null,this.auth=t.getImmediate({optional:!0}),this.messaging=n.getImmediate({optional:!0}),this.auth||t.get().then(i=>this.auth=i,()=>{}),this.messaging||n.get().then(i=>this.messaging=i,()=>{}),this.appCheck||r.get().then(i=>this.appCheck=i,()=>{})}async getAuthToken(){if(this.auth)try{const t=await this.auth.getToken();return t==null?void 0:t.accessToken}catch{return}}async getMessagingToken(){if(!(!this.messaging||!("Notification"in self)||Notification.permission!=="granted"))try{return await this.messaging.getToken()}catch{return}}async getAppCheckToken(){if(this.appCheck){const t=await this.appCheck.getToken();return t.error?null:t.token}return null}async getContext(){const t=await this.getAuthToken(),n=await this.getMessagingToken(),r=await this.getAppCheckToken();return{authToken:t,messagingToken:n,appCheckToken:r}}}/**
* @license
* Copyright 2017 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/const p="us-central1";function R(e){let t=null;return{promise:new Promise((n,r)=>{t=setTimeout(()=>{r(new u("deadline-exceeded","deadline-exceeded"))},e)}),cancel:()=>{t&&clearTimeout(t)}}}class F{constructor(t,n,r,i,o=p,s){this.app=t,this.fetchImpl=s,this.emulatorOrigin=null,this.contextProvider=new L(n,r,i),this.cancelAllRequests=new Promise(c=>{this.deleteService=()=>Promise.resolve(c())});try{const c=new URL(o);this.customDomain=c.origin,this.region=p}catch{this.customDomain=null,this.region=o}}_delete(){return this.deleteService()}_url(t){const n=this.app.options.projectId;return this.emulatorOrigin!==null?`${this.emulatorOrigin}/${n}/${this.region}/${t}`:this.customDomain!==null?`${this.customDomain}/${t}`:`https://${this.region}-${n}.cloudfunctions.net/${t}`}}function U(e,t,n){e.emulatorOrigin=`http://${t}:${n}`}function x(e,t,n){return r=>M(e,t,r,n||{})}async function $(e,t,n,r){n["Content-Type"]="application/json";let i;try{i=await r(e,{method:"POST",body:JSON.stringify(t),headers:n})}catch{return{status:0,json:null}}let o=null;try{o=await i.json()}catch{}return{status:i.status,json:o}}function M(e,t,n,r){const i=e._url(t);return G(e,i,n,r)}async function G(e,t,n,r){n=h(n);const i={data:n},o={},s=await e.contextProvider.getContext();s.authToken&&(o.Authorization="Bearer "+s.authToken),s.messagingToken&&(o["Firebase-Instance-ID-Token"]=s.messagingToken),s.appCheckToken!==null&&(o["X-Firebase-AppCheck"]=s.appCheckToken);const c=r.timeout||7e4,l=R(c),a=await Promise.race([$(t,i,o,e.fetchImpl),l.promise,e.cancelAllRequests]);if(l.cancel(),!a)throw new u("cancelled","Firebase Functions instance was deleted.");const E=v(a.status,a.json);if(E)throw E;if(!a.json)throw new u("internal","Response is not valid JSON object.");let f=a.json.data;if(typeof f>"u"&&(f=a.json.result),typeof f>"u")throw new u("internal","Response is missing data field.");return{data:d(f)}}const A="@firebase/functions",k="0.9.3";/**
* @license
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/const H="auth-internal",J="app-check-internal",V="messaging-internal";function B(e,t){const n=(r,{instanceIdentifier:i})=>{const o=r.getProvider("app").getImmediate(),s=r.getProvider(H),c=r.getProvider(V),l=r.getProvider(J);return new F(o,s,c,l,i,e)};y(new I(m,n,"PUBLIC").setMultipleInstances(!0)),N(A,k,t),N(A,k,"esm2017")}/**
* @license
* Copyright 2020 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/function K(e=O(),t=p){const r=D(g(e),m).getImmediate({identifier:t}),i=C("functions");return i&&X(r,...i),r}function X(e,t,n){U(g(e),t,n)}function q(e,t,n){return x(g(e),t,n)}B(fetch.bind(self));export{X as c,K as g,q as h};

View File

@ -1 +0,0 @@
import{_ as c,r,o as i,c as l,b as e,k as p,a as _,w as d,h as u,p as h,f}from"./index-c8c418b0.js";const m={name:"loginpage",methods:{submit(){this.$router.push("/")}}},t=o=>(h("data-v-9ffc39fa"),o=o(),f(),o),g={id:"background"},v={class:"loginbox"},x=t(()=>e("img",{src:"https://cdn.discordapp.com/attachments/1017419092447207436/1063092138029625394/pixil-frame-0.png",class:"avatar"},null,-1)),w=t(()=>e("h1",null,"Login Here",-1)),b=t(()=>e("p",null,"Username",-1)),k=t(()=>e("input",{type:"text",name:"",placeholder:"Enter Username"},null,-1)),y=t(()=>e("p",null,"Password",-1)),$=t(()=>e("input",{type:"password",name:"",placeholder:"Password"},null,-1)),I=t(()=>e("a",{href:"#"},"Lost your password?",-1)),B=t(()=>e("br",null,null,-1));function C(o,s,L,N,S,n){const a=r("router-link");return i(),l("div",g,[e("div",v,[x,w,e("form",null,[b,k,y,$,e("input",{type:"submit",name:"",value:"Login",onClick:s[0]||(s[0]=p(V=>n.submit(),["stop","prevent"]))}),I,B,e("a",null,[_(a,{to:"/signup"},{default:d(()=>[u("Don't have an account?")]),_:1})])])])])}const P=c(m,[["render",C],["__scopeId","data-v-9ffc39fa"]]);export{P as default};

View File

@ -1 +0,0 @@
#background[data-v-9ffc39fa]{margin:0;padding:0;width:100%;height:100%;position:absolute;background-color:#e0e0e0;font-family:sans-serif}.loginbox[data-v-9ffc39fa]{height:420px;width:320px;background:#000;color:#fff;top:50%;left:50%;position:absolute;transform:translate(-50%,-50%);box-sizing:border-box;padding:70px 30px}h1[data-v-9ffc39fa]{margin:0;padding:0 0 20px;font-size:22px;text-align:center}.loginbox p[data-v-9ffc39fa]{margin:0;padding:0;font-weight:700}.loginbox input[data-v-9ffc39fa]{width:100%;margin-bottom:20px}.loginbox input[type=text][data-v-9ffc39fa],input[type=password][data-v-9ffc39fa]{border:none;border-bottom:1px solid #fff;background:transparent;outline:none;height:40px;color:#fff;font-size:16px}.loginbox input[type=submit][data-v-9ffc39fa]:hover{cursor:pointer;background:#66a3ff;color:#000}.loginbox a[data-v-9ffc39fa]{text-decoration:none;font-size:12px;line-height:20px;color:#a9a9a9}.loginbox a[data-v-9ffc39fa]:hover{color:#ffc107}.loginbox input[type=submit][data-v-9ffc39fa]{border:none;outline:none;height:40px;background:#0052cc;font-size:18px;border-radius:20px}.avatar[data-v-9ffc39fa]{width:100px;height:100px;border-radius:50%;position:absolute;top:-50px;left:calc(50% - 50px)}

View File

@ -1 +0,0 @@
import{g as _,_ as d,r as l,o as h,c as p,b as a,a as e,w as n,h as i,p as v,f as g}from"./index-c8c418b0.js";const N=_({insights:{},latestTrain:{},earliestTrain:{},orderedTrains:[],rawData:{},setInsights(t){this.insights=t},setLatestTrain(t){this.latestTrain=t},setEarliestTrain(t){this.earliestTrain=t},setRawData(t){this.rawData=t},setOrderedTrains(t){t.sort((o,r)=>o.time-r.time),this.orderedTrains=t}});const m={name:"navbar"},c=t=>(v("data-v-8a119f70"),t=t(),g(),t),f={class:"navbar navbar-light bg-light"},u={class:"container-fluid"},b=c(()=>a("img",{src:"https://cdn.discordapp.com/attachments/1017419092447207436/1063092138029625394/pixil-frame-0.png",alt:"mascot",width:"55",height:"40",class:"d-inline-block align-text-middle"},null,-1)),T=c(()=>a("b",null,"Irish Rail Tracker",-1)),k={class:"navbarLink"},x={class:"navbarLink"},w={class:"navbarLink"};function I(t,o,r,L,$,B){const s=l("router-link");return h(),p("nav",f,[a("div",u,[e(s,{to:"/",class:"navbar-brand"},{default:n(()=>[b,T]),_:1}),a("a",k,[e(s,{to:"/"},{default:n(()=>[i("Home")]),_:1})]),a("a",x,[e(s,{to:"/insights"},{default:n(()=>[i("Insights")]),_:1})]),a("a",w,[e(s,{to:"/login"},{default:n(()=>[i("Login")]),_:1})])])])}const S=d(m,[["render",I],["__scopeId","data-v-8a119f70"]]);export{S as n,N as s};

View File

@ -1 +0,0 @@
.navbarLink[data-v-8a119f70]{font-family:Franklin Gothic Medium,Arial Narrow,Arial,sans-serif;font-size:150%}

View File

@ -1 +0,0 @@
import{_ as p,r,o as c,c as i,b as e,k as _,a as d,w as l,h as u,p as h,f as m}from"./index-c8c418b0.js";const f={name:"signuppage",methods:{submit(){this.$router.push("/")}}},t=s=>(h("data-v-1069659b"),s=s(),m(),s),g={id:"background"},v={class:"loginbox"},b=t(()=>e("img",{src:"https://cdn.discordapp.com/attachments/1017419092447207436/1063092138029625394/pixil-frame-0.png",class:"avatar"},null,-1)),x=t(()=>e("h1",null,"Sign Up Here",-1)),w=t(()=>e("p",null,"Username",-1)),k=t(()=>e("input",{type:"text",name:"",placeholder:"Enter Username"},null,-1)),y=t(()=>e("p",null,"Password",-1)),S=t(()=>e("input",{type:"password",name:"",placeholder:"Password"},null,-1)),$=t(()=>e("a",{href:"#"},"Lost your password?",-1)),I=t(()=>e("br",null,null,-1));function U(s,o,B,C,N,n){const a=r("router-link");return c(),i("div",g,[e("div",v,[b,x,e("form",null,[w,k,y,S,e("input",{type:"submit",name:"",value:"Sign Up",onClick:o[0]||(o[0]=_(V=>n.submit(),["stop","prevent"]))}),$,I,e("a",null,[d(a,{to:"/login"},{default:l(()=>[u("Already have an account?")]),_:1})])])])])}const P=p(f,[["render",U],["__scopeId","data-v-1069659b"]]);export{P as default};

View File

@ -1 +0,0 @@
#background[data-v-1069659b]{margin:0;padding:0;width:100%;height:100%;position:absolute;background-color:#e0e0e0;font-family:sans-serif}.loginbox[data-v-1069659b]{height:420px;width:320px;background:#000;color:#fff;top:50%;left:50%;position:absolute;transform:translate(-50%,-50%);box-sizing:border-box;padding:70px 30px}h1[data-v-1069659b]{margin:0;padding:0 0 20px;font-size:22px;text-align:center}.loginbox p[data-v-1069659b]{margin:0;padding:0;font-weight:700}.loginbox input[data-v-1069659b]{width:100%;margin-bottom:20px}.loginbox input[type=text][data-v-1069659b],input[type=password][data-v-1069659b]{border:none;border-bottom:1px solid #fff;background:transparent;outline:none;height:40px;color:#fff;font-size:16px}.loginbox input[type=submit][data-v-1069659b]:hover{cursor:pointer;background:#00df00;color:#000}.loginbox a[data-v-1069659b]{text-decoration:none;font-size:12px;line-height:20px;color:#a9a9a9}.loginbox a[data-v-1069659b]:hover{color:#ffc107}.loginbox input[type=submit][data-v-1069659b]{border:none;outline:none;height:40px;background:#00a800;font-size:18px;border-radius:20px}.avatar[data-v-1069659b]{width:100px;height:100px;border-radius:50%;position:absolute;top:-50px;left:calc(50% - 50px)}

1
dist/assets/store-6f7621d4.js vendored Normal file
View File

@ -0,0 +1 @@
import{g as e}from"./index-93b9eb88.js";const r=e({insights:{},latestTrain:{},earliestTrain:{},orderedTrains:[],selectedDataMap:{},rawData:{},display:!1,setInsights(t){this.insights=t},setLatestTrain(t){this.latestTrain=t},setEarliestTrain(t){this.earliestTrain=t},setRawData(t){this.rawData=t},setOrderedTrains(t){t.sort((s,a)=>s.time-a.time),this.orderedTrains=t},setSelectedDataMap(t){this.selectedDataMap=t},setDisplay(t){this.display=t}});export{r as s};

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d="M86.8 48c-12.2 0-23.6 5.5-31.2 15L42.7 79C34.5 89.3 19.4 91 9 82.7S-3 59.4 5.3 49L18 33C34.7 12.2 60 0 86.8 0H361.2c26.7 0 52 12.2 68.7 33l12.8 16c8.3 10.4 6.6 25.5-3.7 33.7s-25.5 6.6-33.7-3.7L392.5 63c-7.6-9.5-19.1-15-31.2-15H248V96h40c53 0 96 43 96 96V352c0 30.6-14.3 57.8-36.6 75.4l65.5 65.5c7.1 7.1 2.1 19.1-7.9 19.1H365.3c-8.5 0-16.6-3.4-22.6-9.4L288 448H160l-54.6 54.6c-6 6-14.1 9.4-22.6 9.4H43c-10 0-15-12.1-7.9-19.1l65.5-65.5C78.3 409.8 64 382.6 64 352V192c0-53 43-96 96-96h40V48H86.8zM160 160c-17.7 0-32 14.3-32 32v32c0 17.7 14.3 32 32 32H288c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32H160zm32 192a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm96 32a32 32 0 1 0 0-64 32 32 0 1 0 0 64z"/></svg>

After

Width:  |  Height:  |  Size: 934 B

2
dist/index.html vendored
View File

@ -5,7 +5,7 @@
<link rel="icon" href="/assets/train-solid-e7249eb7.svg">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Irish Rail Tracker</title>
<script type="module" crossorigin src="/assets/index-c8c418b0.js"></script>
<script type="module" crossorigin src="/assets/index-93b9eb88.js"></script>
<link rel="stylesheet" href="/assets/index-a5eb0783.css">
</head>
<body>