chore: upgrade to composition API

This commit is contained in:
Julien Calixte
2026-01-24 21:24:46 +01:00
parent aaa8cf0a6c
commit 5a306fa741
10 changed files with 180 additions and 280 deletions

View File

@@ -8,28 +8,20 @@
</transition>
</template>
<script lang="ts">
import { defineComponent, ref, onMounted } from 'vue'
<script setup lang="ts">
import { ref, onMounted } from 'vue'
import { addEventBusListener } from 'retrobus'
export default defineComponent({
name: 'SWNewVersion',
setup() {
const newVersion = ref(false)
const newVersion = ref(false)
onMounted(() => {
addEventBusListener('new-version', () => (newVersion.value = true), {
retro: true,
once: true
})
})
return {
newVersion,
reload: () => location.reload(true)
}
}
onMounted(() => {
addEventBusListener('new-version', () => (newVersion.value = true), {
retro: true,
once: true
})
})
const reload = () => location.reload()
</script>
<style lang="scss" scoped>