|
|
@ -17,7 +17,8 @@ const TimeTrack = { |
|
|
|
portal: '', |
|
|
|
portal: '', |
|
|
|
portals: null, |
|
|
|
portals: null, |
|
|
|
importStringForPortals: '', |
|
|
|
importStringForPortals: '', |
|
|
|
publicDB: false |
|
|
|
publicDB: false, |
|
|
|
|
|
|
|
fun: false, |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
mounted() { |
|
|
@ -67,6 +68,9 @@ const TimeTrack = { |
|
|
|
|
|
|
|
|
|
|
|
let storedPortals = JSON.parse(localStorage.getItem('portals')); |
|
|
|
let storedPortals = JSON.parse(localStorage.getItem('portals')); |
|
|
|
this.portals = storedPortals == null ? null : storedPortals; |
|
|
|
this.portals = storedPortals == null ? null : storedPortals; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let storedFun = localStorage.getItem('fun'); |
|
|
|
|
|
|
|
this.fun = storedFun == null ? false : storedFun; |
|
|
|
}, |
|
|
|
}, |
|
|
|
updateStorage() { |
|
|
|
updateStorage() { |
|
|
|
localStorage.setItem('tickets', JSON.stringify(this.tickets)); |
|
|
|
localStorage.setItem('tickets', JSON.stringify(this.tickets)); |
|
|
@ -75,6 +79,7 @@ const TimeTrack = { |
|
|
|
localStorage.setItem('ticketSystemUrl', this.ticketSystemUrl); |
|
|
|
localStorage.setItem('ticketSystemUrl', this.ticketSystemUrl); |
|
|
|
localStorage.setItem('showPT', this.showPT); |
|
|
|
localStorage.setItem('showPT', this.showPT); |
|
|
|
localStorage.setItem('publicDB', this.publicDB); |
|
|
|
localStorage.setItem('publicDB', this.publicDB); |
|
|
|
|
|
|
|
localStorage.setItem('fun', this.fun); |
|
|
|
localStorage.setItem('theme', this.theme); |
|
|
|
localStorage.setItem('theme', this.theme); |
|
|
|
localStorage.setItem('portal', this.portal); |
|
|
|
localStorage.setItem('portal', this.portal); |
|
|
|
|
|
|
|
|
|
|
@ -100,6 +105,13 @@ const TimeTrack = { |
|
|
|
ticket.trackingStarted = moment(); |
|
|
|
ticket.trackingStarted = moment(); |
|
|
|
ticket.tracking = true; |
|
|
|
ticket.tracking = true; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let noNoTickets = ['#1920', '#3110', '#2492', '#2419', '#1256']; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (this.fun && noNoTickets.includes(ticket.number)) { |
|
|
|
|
|
|
|
let psycho = new Audio('/timetrack/assets/audio/psycho.mp3'); |
|
|
|
|
|
|
|
psycho.play(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.$forceUpdate(); |
|
|
|
this.$forceUpdate(); |
|
|
|
this.updateStorage(); |
|
|
|
this.updateStorage(); |
|
|
|
}, |
|
|
|
}, |
|
|
@ -367,6 +379,10 @@ const TimeTrack = { |
|
|
|
theme() { |
|
|
|
theme() { |
|
|
|
this.updateStorage(); |
|
|
|
this.updateStorage(); |
|
|
|
this.$forceUpdate(); |
|
|
|
this.$forceUpdate(); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
fun() { |
|
|
|
|
|
|
|
this.updateStorage(); |
|
|
|
|
|
|
|
this.$forceUpdate(); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
computed: { |
|
|
|