fix(ui): add viewport header to enable/disable pinch to zoom in Safari (#1590)

This commit is contained in:
Joaquín Sánchez 2023-02-03 10:05:17 +01:00 committed by GitHub
parent a46ec605e1
commit a2fb458696
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 ?? ''