Add pause feature

This commit is contained in:
2020-04-27 21:44:27 +03:00
parent 6ce839f4be
commit 21c773961b
5 changed files with 56 additions and 1 deletions

View File

@ -3,6 +3,9 @@
<h1 class="title">
[{{ shared.name }}] {{ villageName }}
<span class="version">- {{ shared.version }}</span>
<a href="#" v-on:click.prevent="pause()">
pause <span v-if="shared.pauseSeconds" v-text="shared.pauseSeconds"></span>
</a>
</h1>
</section>
</template>
@ -20,6 +23,11 @@ export default {
return village ? village.name : 'Unknown';
},
},
methods: {
pause() {
this.shared.pause();
},
},
};
</script>

View File

@ -25,6 +25,7 @@
<script>
import * as dateFormat from 'dateformat';
import { timestamp } from '../utils';
export default {
data() {