Add:PWA support #354

This commit is contained in:
advplyr 2022-02-09 08:57:34 -06:00
parent 42e7b7f590
commit 922214f241
7 changed files with 23 additions and 11 deletions

View File

@ -2,7 +2,7 @@
<div class="w-full h-16 bg-primary relative">
<div id="appbar" class="absolute top-0 bottom-0 left-0 w-full h-full px-2 md:px-6 py-1 z-50">
<div class="flex h-full items-center">
<img v-if="!showBack" src="/Logo48.png" class="w-10 h-10 md:w-12 md:h-12 mr-4" />
<img v-if="!showBack" src="/icon48.png" class="w-10 h-10 md:w-12 md:h-12 mr-4" />
<a v-if="showBack" @click="back" class="rounded-full h-12 w-12 flex items-center justify-center hover:bg-white hover:bg-opacity-10 mr-4 cursor-pointer">
<span class="material-icons text-4xl text-white">arrow_back</span>
</a>

View File

@ -100,22 +100,34 @@ module.exports = {
// nuxt/pwa https://pwa.nuxtjs.org
pwa: {
icon: {
source: 'Logo.png'
},
icon: false,
meta: {
appleStatusBarStyle: 'black-translucent',
appleStatusBarStyle: 'black',
name: 'Audiobookshelf',
theme_color: '#373838'
theme_color: '#373838',
mobileAppIOS: true,
nativeUI: true
},
manifest: {
name: 'Audiobookshelf',
short_name: 'Audiobookshelf',
background_color: '#373838'
display: 'standalone',
background_color: '#373838',
icons: [
{
src: '/icon64.png',
sizes: "64x64"
},
// workbox: {
// enabled: true // TEMP for dev
// }
{
src: '/icon192.png',
sizes: "120x120 144x144 192x192"
},
{
src: '/Logo.png',
sizes: "384x384 512x512"
}
]
}
},
// Build Configuration: https://go.nuxtjs.dev/config-build

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

BIN
client/static/icon192.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

BIN
client/static/icon48.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
client/static/icon64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB