1
0
mirror of https://github.com/elk-zone/elk synced 2024-11-27 14:28:10 +09:00

ui: pwa prompt

This commit is contained in:
Anthony Fu 2022-12-19 22:14:54 +01:00
parent 7c1baf0f0a
commit aa9b5d2cb1
3 changed files with 21 additions and 18 deletions

View File

@ -15,25 +15,29 @@ const { close, needRefresh, updateServiceWorker } = usePWA()
z11 z11
fixed fixed
bottom-14 md:bottom-0 right-0 bottom-14 md:bottom-0 right-0
m-2 p-4 m-2 p-4 w-100
bg-base border="~ base" bg-base border="~ base"
rounded rounded
text-left text-left
shadow shadow
flex="~ gap-4"
> >
<img src="/logo.svg" w-12 h-12 height="10" width="10" ma alt="logo">
<div>
<h2 id="pwa-toast-title" sr-only> <h2 id="pwa-toast-title" sr-only>
{{ $t('pwa.title') }} {{ $t('pwa.title') }}
</h2> </h2>
<div id="pwa-toast-message"> <div id="pwa-toast-message">
{{ $t('pwa.message') }} {{ $t('pwa.message') }}
</div> </div>
<div m-t4 flex="~ colum" gap-x="4"> <div mt2 flex="~ gap-4">
<button type="button" btn-solid text-sm px-2 py-1 text-center @click="updateServiceWorker()"> <button type="button" btn-solid px-4 py-1 text-center text-sm @click="updateServiceWorker()">
{{ $t('pwa.reload') }} {{ $t('pwa.reload') }}
</button> </button>
<button type="button" btn-outline px-2 py-1 text-sm text-center @click="close"> <button type="button" btn-outline filter-saturate-0 px-4 py-1 text-center text-sm @click="close">
{{ $t('pwa.close') }} {{ $t('pwa.dismiss') }}
</button> </button>
</div> </div>
</div> </div>
</div>
</template> </template>

View File

@ -191,10 +191,10 @@
"the_thread": "the thread" "the_thread": "the thread"
}, },
"pwa": { "pwa": {
"close": "Close", "dismiss": "Dismiss",
"message": "@:pwa.title{','} click on @:pwa.reload button to update.", "message": "@:pwa.title{','} click on the @:pwa.reload button to update.",
"reload": "Reload", "reload": "Reload",
"title": "New Elk version available" "title": "New Elk update available"
}, },
"search": { "search": {
"search_desc": "Search for people & hashtags" "search_desc": "Search for people & hashtags"

View File

@ -188,7 +188,6 @@
"the_thread": "el hilo" "the_thread": "el hilo"
}, },
"pwa": { "pwa": {
"close": "Cerrar",
"message": "@:pwa.title{','} haz click en el botón @:pwa.reload para actualizar.", "message": "@:pwa.title{','} haz click en el botón @:pwa.reload para actualizar.",
"reload": "Recargar", "reload": "Recargar",
"title": "Nueva versión de Elk disponible" "title": "Nueva versión de Elk disponible"