|
|
@@ -1,12 +1,20 @@ |
|
|
|
<template> |
|
|
|
|
|
|
|
<div class="objective" > |
|
|
|
<div |
|
|
|
class="objective" |
|
|
|
@click="clearObjective" |
|
|
|
v-longclick="forceClearObjective"> |
|
|
|
<div> |
|
|
|
{{ objective.name }} |
|
|
|
<span v-if="objective.position"> ({{ objective.position }})</span> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div><Timer ref="timer" :initialTime="objective.initialSpawnTime" /></div> |
|
|
|
<div> |
|
|
|
<Timer |
|
|
|
ref="timer" |
|
|
|
:initialTime="objective.initialSpawnTime" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
@@ -28,6 +36,18 @@ |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
clearObjective: function () { |
|
|
|
if (this.$refs.timer.currentTime === 0) { |
|
|
|
this.resetTimer() |
|
|
|
} |
|
|
|
}, |
|
|
|
forceClearObjective: function () { |
|
|
|
this.resetTimer() |
|
|
|
}, |
|
|
|
resetTimer: function () { |
|
|
|
this.$refs.timer.setTime(this.objective.respawnTime) |
|
|
|
this.$refs.timer.startTimer() |
|
|
|
} |
|
|
|
}, |
|
|
|
components: { |
|
|
|
Timer |
|
|
|