✨ (pwa) add shortcut
This commit is contained in:
@@ -47,7 +47,7 @@
|
||||
@play="start"
|
||||
@pause="pause"
|
||||
/>
|
||||
<footer>
|
||||
<footer v-if="false">
|
||||
Made by
|
||||
<a
|
||||
href="https://github.com/jcalixte"
|
||||
@@ -66,7 +66,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from '@vue/composition-api'
|
||||
import { defineComponent, onMounted } from '@vue/composition-api'
|
||||
import { useTimer } from '@/hooks/useTimer'
|
||||
import DevSession from '@/components/DevSession.vue'
|
||||
import ZoneMusic from '@/components/ZoneMusic.vue'
|
||||
@@ -79,7 +79,10 @@ export default defineComponent({
|
||||
ZoneMusic,
|
||||
IntervalInput
|
||||
},
|
||||
setup() {
|
||||
props: {
|
||||
play: { type: Boolean, default: false }
|
||||
},
|
||||
setup(props) {
|
||||
const {
|
||||
interval,
|
||||
start,
|
||||
@@ -95,6 +98,12 @@ export default defineComponent({
|
||||
timeState.value === 'stopped' ? start() : pause()
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
if (props.play) {
|
||||
start()
|
||||
}
|
||||
})
|
||||
|
||||
return {
|
||||
interval,
|
||||
toggle,
|
||||
|
||||
Reference in New Issue
Block a user