From f5cae885c544cb3add3d36470cc14a587ec0b0f8 Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Sat, 27 Apr 2024 14:09:36 +1000 Subject: [PATCH 1/4] fix: enable browser on iOS --- .eslintrc.js | 2 +- src/components/mobile/TabBar.vue | 16 ++-------------- src/lib/constants.js | 2 -- src/pages/mobile/Onboarding.vue | 3 +-- src/pages/mobile/TransactionList.vue | 4 ++-- src/pages/mobile/Transfer.vue | 6 ++---- src/router/routes/mobile.js | 6 +++--- src/ui-common.js | 3 +-- 8 files changed, 12 insertions(+), 30 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index f3f90fac7..cfdfc58bf 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -6,7 +6,7 @@ module.exports = { globals: { ENV_MOBILE_DEVICE: true, }, - ignorePatterns: ['dist', 'www'], + ignorePatterns: ['dist', 'platforms', 'plugins', 'www'], extends: [ 'plugin:vue/recommended', 'plugin:@intlify/vue-i18n/recommended', diff --git a/src/components/mobile/TabBar.vue b/src/components/mobile/TabBar.vue index 260491dea..1bf8d3032 100644 --- a/src/components/mobile/TabBar.vue +++ b/src/components/mobile/TabBar.vue @@ -3,10 +3,7 @@
- +
{{ $t('app.title') }}
@@ -16,14 +13,6 @@
{{ $t('transfer.title') }}
- - -
{{ $t('transfer.transaction.title') }}
-
- import AeButton from '../../components/AeButton.vue'; -import { DISABLED_BROWSER } from '../../lib/constants'; export default { components: { AeButton }, @@ -48,7 +47,7 @@ export default { stepRouteNames: [ 'onboarding', 'onboarding-send', - ...DISABLED_BROWSER ? [] : ['onboarding-aepps'], + 'onboarding-aepps', 'onboarding-subaccounts', ], }), diff --git a/src/pages/mobile/TransactionList.vue b/src/pages/mobile/TransactionList.vue index 99d5f16a5..468036c93 100644 --- a/src/pages/mobile/TransactionList.vue +++ b/src/pages/mobile/TransactionList.vue @@ -2,8 +2,8 @@
Date: Sat, 27 Apr 2024 16:20:36 +1000 Subject: [PATCH 2/4] chore: revert old workaround to fix scrolling on ios --- src/pages/mobile/AppBrowser.vue | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/pages/mobile/AppBrowser.vue b/src/pages/mobile/AppBrowser.vue index c7cc852a4..8eac2c4e6 100644 --- a/src/pages/mobile/AppBrowser.vue +++ b/src/pages/mobile/AppBrowser.vue @@ -36,7 +36,6 @@ ref="iframe" :src="url" :title="url" - :scrolling="$globals.IS_IOS && 'no'" importance="high" sandbox="allow-scripts allow-same-origin allow-forms allow-modals" allow="camera; microphone" @@ -151,7 +150,6 @@ export default { iframe { flex-grow: 1; - width: 100vw; border: none; } } From 3ec2ccfc4b277c00f0803e81578e5f7d590eef53 Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Sat, 27 Apr 2024 16:24:16 +1000 Subject: [PATCH 3/4] chore: provide correct origin to aepp in iOS --- src/store/plugins/initSdk.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/store/plugins/initSdk.js b/src/store/plugins/initSdk.js index 64f00a2a0..f2a0848fe 100644 --- a/src/store/plugins/initSdk.js +++ b/src/store/plugins/initSdk.js @@ -140,6 +140,17 @@ export default (store) => { ]); // TODO: remove after updating sdk sdk.Ae.defaults.verify = false; + + // backported fix https://github.com/aeternity/aepp-sdk-js/pull/1980 + const { getWalletInfo } = sdk; + sdk.getWalletInfo = () => { + const { origin, ...info } = getWalletInfo.call(sdk); + return { + ...info, + origin: 'file://' === info.origin ? '*' : info.origin, + }; + } + sdk.selectNode(network.name); sdk.middleware = middleware; sdk.middleware2 = middleware2; From 2f2c5e5b74c3a3ebeecbac1380a6ce80f82ad700 Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Sat, 27 Apr 2024 16:51:09 +1000 Subject: [PATCH 4/4] fix: Tooltip positioning in iOS --- src/components/mobile/Tooltip.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/mobile/Tooltip.vue b/src/components/mobile/Tooltip.vue index 61d041bd0..6baa7ec47 100644 --- a/src/components/mobile/Tooltip.vue +++ b/src/components/mobile/Tooltip.vue @@ -45,7 +45,7 @@ export default { return this.showBelow ? { top: `${bottom + arrowSize}px` } - : { bottom: `${document.documentElement.clientHeight - top + arrowSize}px` }; + : { bottom: `${this.$parent.$el.clientHeight - top + arrowSize}px` }; }, arrowStyle() { if (!this.anchorRect || !this.isMounted) return {};