Skip to content

Commit

Permalink
fix(ui): add viewport header to enable/disable pinch to zoom in Safari (
Browse files Browse the repository at this point in the history
  • Loading branch information
userquin committed Feb 3, 2023
1 parent a46ec60 commit a2fb458
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions composables/setups.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ export function setupPageHeader() {
dir: () => localeMap[locale.value] ?? 'auto',
class: () => enablePinchToZoom.value ? ['enable-pinch-to-zoom'] : [],
},
meta: [{
name: 'viewport',
content: () => `width=device-width,initial-scale=1${enablePinchToZoom.value ? '' : ',maximum-scale=1,user-scalable=0'},viewport-fit=cover`,
}],
titleTemplate: (title) => {
let titleTemplate = title ?? ''

Expand Down

0 comments on commit a2fb458

Please sign in to comment.