Skip to content

Commit

Permalink
fix: ios status bar
Browse files Browse the repository at this point in the history
  • Loading branch information
qin-guan committed Sep 20, 2023
1 parent 40f5f37 commit c8ab8df
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 19 deletions.
25 changes: 24 additions & 1 deletion nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,29 @@ export default defineNuxtConfig({
'/': { prerender: true },
},

app: {
head: {
meta: [
{
name: 'viewport',
content: 'width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, viewport-fit=cover',
},
{
name: 'apple-mobile-web-app-capable',
content: 'yes',
},
{
name: 'apple-mobile-web-app-status-bar-style',
content: 'black-translucent',
},
{
name: 'theme-color',
content: '#000000',
},
],
},
},

pwa: {
registerType: 'autoUpdate',
client: {
Expand All @@ -25,7 +48,7 @@ export default defineNuxtConfig({
globPatterns: ['**/*.{js,json,css,html,txt,svg,png,ico,webp,woff,woff2,ttf,eot,otf,wasm}'],
},
devOptions: {
enabled: true,
enabled: process.env.VITE_DEV_PWA === 'true',
suppressWarnings: true,
type: 'module',
},
Expand Down
18 changes: 0 additions & 18 deletions pages/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,24 +51,6 @@ useHeadSafe({
color: '#ffffff',
},
],
meta: [
{
name: 'viewport',
content: 'width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, viewport-fit=cover',
},
{
name: 'apple-mobile-web-app-capable',
content: 'yes',
},
{
name: 'apple-mobile-web-app-status-bar-style',
content: 'black-translucent',
},
{
name: 'theme-color',
content: '#000000',
},
],
})
const route = useRoute()
Expand Down

0 comments on commit c8ab8df

Please # to comment.