mirror of
https://github.com/Spythere/genera-tor.git
synced 2026-05-06 06:58:12 +00:00
refactor: organized files, refreshed design and layout
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
<template>
|
||||
<div v-if="needRefresh" class="update-prompt" @click="updateServiceWorker(true)">
|
||||
{{ $t('update.update-available-text') }}
|
||||
<u>{{ $t('update.update-available-underline') }}</u>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useRegisterSW } from 'virtual:pwa-register/vue';
|
||||
|
||||
const { needRefresh, updateServiceWorker } = useRegisterSW({ immediate: true });
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@use '../../styles/colors';
|
||||
|
||||
.update-prompt {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
padding: 0.5em;
|
||||
|
||||
z-index: 200;
|
||||
|
||||
font-weight: bold;
|
||||
|
||||
text-align: center;
|
||||
|
||||
width: 100%;
|
||||
background-color: colors.$accentCol;
|
||||
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user