Browse Source

secret features

modals-to-spa
stingl 4 years ago
parent
commit
5cc2dfd0af
  1. BIN
      assets/audio/psycho.mp3
  2. 7
      index.html
  3. 18
      js/app.js

BIN
assets/audio/psycho.mp3

Binary file not shown.

7
index.html

@ -279,6 +279,13 @@ @@ -279,6 +279,13 @@
</label>
</div>
<br/>
<div class="form-group">
<label>
<input type="checkbox" class="form-control-checkbox" v-model="fun">
Secret Features
</label>
</div>
<br/>
<div class="form-group">
<label>Design</label>
<select v-model="theme" class="form-control">

18
js/app.js

@ -17,7 +17,8 @@ const TimeTrack = { @@ -17,7 +17,8 @@ const TimeTrack = {
portal: '',
portals: null,
importStringForPortals: '',
publicDB: false
publicDB: false,
fun: false,
}
},
mounted() {
@ -67,6 +68,9 @@ const TimeTrack = { @@ -67,6 +68,9 @@ const TimeTrack = {
let storedPortals = JSON.parse(localStorage.getItem('portals'));
this.portals = storedPortals == null ? null : storedPortals;
let storedFun = localStorage.getItem('fun');
this.fun = storedFun == null ? false : storedFun;
},
updateStorage() {
localStorage.setItem('tickets', JSON.stringify(this.tickets));
@ -75,6 +79,7 @@ const TimeTrack = { @@ -75,6 +79,7 @@ const TimeTrack = {
localStorage.setItem('ticketSystemUrl', this.ticketSystemUrl);
localStorage.setItem('showPT', this.showPT);
localStorage.setItem('publicDB', this.publicDB);
localStorage.setItem('fun', this.fun);
localStorage.setItem('theme', this.theme);
localStorage.setItem('portal', this.portal);
@ -100,6 +105,13 @@ const TimeTrack = { @@ -100,6 +105,13 @@ const TimeTrack = {
ticket.trackingStarted = moment();
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.updateStorage();
},
@ -367,6 +379,10 @@ const TimeTrack = { @@ -367,6 +379,10 @@ const TimeTrack = {
theme() {
this.updateStorage();
this.$forceUpdate();
},
fun() {
this.updateStorage();
this.$forceUpdate();
}
},
computed: {