Skip to content

Commit

Permalink
feat: vibrate
Browse files Browse the repository at this point in the history
  • Loading branch information
d-koppenhagen committed Oct 2, 2024
1 parent 59c8673 commit 276e4a2
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,18 @@ import { onMounted, ref } from 'vue'
const splash = ref(true)
onMounted(() => setTimeout(() => (splash.value = false), 2000))
navigator.vibrate(2000)
onMounted(() =>
setTimeout(() => {
splash.value = false
navigator.vibrate(0)
}, 2000)
)
function stopSplashscreen() {
splash.value = false
navigator.vibrate(0)
}
</script>

<template>
Expand Down Expand Up @@ -60,7 +71,7 @@ onMounted(() => setTimeout(() => (splash.value = false), 2000))

<RouterView v-if="!splash" />

<div class="splash" v-if="splash" @click="splash = false">
<div class="splash" v-if="splash" @click="stopSplashscreen">
<img :src="logo" />
</div>
</template>
Expand Down

0 comments on commit 276e4a2

Please sign in to comment.