diff --git a/src/control/content/app.js b/src/control/content/app.js index 6c7bdce..eecf156 100644 --- a/src/control/content/app.js +++ b/src/control/content/app.js @@ -14,6 +14,11 @@ EXTERNAL_BROWSER: 'External browser' }; + $scope.viewSubtype = { + IFRAME: 'iFrame', + NATIVE_WEBVIEW: 'Native webview' + }; + buildfire.datastore.get(function(err, result) { if (err) return console.error('Error: ', err); @@ -32,11 +37,17 @@ $scope.data.content.view = $scope.viewType.IN_APP_POPUP; } } + + // Backward compatibility: If viewType.NATIVE_IN_APP was selected before, default to viewSubtype.IFRAME + if ($scope.data.content.view === $scope.viewType.NATIVE_IN_APP && !$scope.data.content.viewSubtype) { + $scope.data.content.viewSubtype = $scope.viewSubtype.IFRAME; + } } else { $scope.data = { content: { url: '', - view: $scope.viewType.IN_APP_POPUP + view: $scope.viewType.IN_APP_POPUP, + viewSubtype: null // Initialize viewSubtype } }; } @@ -118,22 +129,26 @@ }; $scope.changeViewType = function() { - dataChanged = true; - - if ($scope.frmMain.$invalid) return; + dataChanged = true; + + if ($scope.frmMain.$invalid) return; - var data = $scope.data; + if ($scope.data.content.view === $scope.viewType.NATIVE_IN_APP && !$scope.data.content.viewSubtype) { + $scope.data.content.viewSubtype = $scope.viewSubtype.IFRAME; + } - if (data.content.openInApp != undefined) { - data.content.openInApp = null; - } - buildfire.datastore.save(data, function(err, result) { - if (err || !result) { - $log.error('Error saving the widget details: ', err); - } else { - $log.info('Widget details saved'); - } - }); + var data = $scope.data; + + if (data.content.openInApp != undefined) { + data.content.openInApp = null; + } + buildfire.datastore.save(data, function(err, result) { + if (err || !result) { + $log.error('Error saving the widget details: ', err); + } else { + $log.info('Widget details saved'); + } + }); }; $scope.openMethodChanged = function() { diff --git a/src/control/content/index.html b/src/control/content/index.html index 78945f5..4bf7081 100644 --- a/src/control/content/index.html +++ b/src/control/content/index.html @@ -17,12 +17,19 @@ display: block !important; padding-bottom: 5px; } - p.info-note { + .note { + padding: 12px 20px; margin-top: 15px; + margin-bottom: 15px; + background: #F5F5F5; } - p.info-note.text-warning { - color: var(--c-warning); - background-color: var(--c-gray1); + .note .bold { + font-weight: 600; + } + .image-container img { + margin: 10px; + border-radius: 8px; + box-shadow: 0 0 8px 2px rgba(0,0,0,0.10); } @@ -73,6 +80,20 @@
- Some websites may not function properly in the in-feature WebView due to Apple's restrictions on cross-origin iframes, which can affect login and state management, or due to internal policies of certain sites like Google and Amazon that prevent them from being displayed in the app’s native component. If your web page does not appear or work as expected, we recommend using one of the alternative methods available. -
+Note 1: For the best user experience, link to
- mobile optimized content.
(Disclaimer: Some websites will show
- mobile version of site only on mobile devices.)
Note 2: If you are taking payments through - this web page, you must open the the URL outside of the app or the app - will get rejected by Apple in the submission review process.
- -Note 3: It is best to use secure websites (Https) some operating systems require it.
- -Hint: If you are taking payments, use your - app or content DeepLink URL to redirect back to the app after a payment - is made.
+