mirror of
https://github.com/docusealco/docuseal
synced 2026-11-05 14:42:33 -05:00
adjust native
This commit is contained in:
1 parent
a86f896694
commit
d35538e2ba
17 files changed
+121
-96
No files matched your search
@@ -126,7 +126,7 @@ export default {
|
||||
IconLogin,
|
||||
IconDownload
|
||||
},
|
||||
inject: ['baseUrl', 't'],
|
||||
inject: ['baseUrl', 't', 'nativePlatform'],
|
||||
props: {
|
||||
submitterSlug: {
|
||||
type: String,
|
||||
@@ -196,7 +196,7 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
isNativeApp () {
|
||||
return !!window.webkit?.messageHandlers?.download
|
||||
return !!this.nativePlatform && !!window.webkit?.messageHandlers?.download
|
||||
},
|
||||
isWebView () {
|
||||
return /webview|wv|ip((?!.*Safari)|(?=.*like Safari))/i.test(window.navigator.userAgent)
|
||||
|
||||
@@ -774,6 +774,7 @@ export default {
|
||||
baseUrl: this.baseUrl,
|
||||
scrollIntoArea: this.scrollIntoArea,
|
||||
scrollIntoField: this.scrollIntoField,
|
||||
nativePlatform: this.nativePlatform,
|
||||
t: this.t
|
||||
}
|
||||
},
|
||||
@@ -909,6 +910,11 @@ export default {
|
||||
required: false,
|
||||
default: false
|
||||
},
|
||||
nativePlatform: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: ''
|
||||
},
|
||||
autoscrollFields: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
@@ -1767,7 +1773,9 @@ export default {
|
||||
this.isCompleted = true
|
||||
this.isFormVisible = true
|
||||
|
||||
window.webkit?.messageHandlers?.native?.postMessage({ type: 'stale' })
|
||||
if (this.nativePlatform) {
|
||||
window.webkit?.messageHandlers?.native?.postMessage({ type: 'stale' })
|
||||
}
|
||||
|
||||
if (resp?.text) {
|
||||
const respData = await resp.text()
|
||||
|
||||
@@ -376,7 +376,7 @@ export default {
|
||||
IconSignature,
|
||||
IconArrowsDiagonalMinimize2
|
||||
},
|
||||
inject: ['baseUrl', 't'],
|
||||
inject: ['baseUrl', 't', 'nativePlatform'],
|
||||
props: {
|
||||
field: {
|
||||
type: Object,
|
||||
@@ -580,10 +580,14 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
lockSwipe () {
|
||||
window.webkit?.messageHandlers?.native?.postMessage({ type: 'swipe', op: 'lock' })
|
||||
if (this.nativePlatform) {
|
||||
window.webkit?.messageHandlers?.native?.postMessage({ type: 'swipe', op: 'lock' })
|
||||
}
|
||||
},
|
||||
unlockSwipe () {
|
||||
window.webkit?.messageHandlers?.native?.postMessage({ type: 'swipe', op: 'unlock' })
|
||||
if (this.nativePlatform) {
|
||||
window.webkit?.messageHandlers?.native?.postMessage({ type: 'swipe', op: 'unlock' })
|
||||
}
|
||||
},
|
||||
setCanvasSize () {
|
||||
const canvas = this.$refs.canvas
|
||||
|
||||
Reference in new issue
Block a user