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

zio/stable
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
1 changed files with 4 additions and 0 deletions

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