From d43abc49c1a116ee7af91bc899b1b461504c53a7 Mon Sep 17 00:00:00 2001 From: lgmarchi Date: Fri, 13 Dec 2024 11:22:22 -0300 Subject: [PATCH] feat(share): add share functionality for backup seed phrase --- android/app/capacitor.build.gradle | 1 + android/capacitor.settings.gradle | 3 +++ ios/App/Podfile | 1 + ios/App/Podfile.lock | 8 ++++++- package.json | 1 + src/lib/lang/en.json | 1 + src/lib/layouts/login/RecoveryCopy.svelte | 27 ++++++++++++++++++++--- 7 files changed, 38 insertions(+), 4 deletions(-) diff --git a/android/app/capacitor.build.gradle b/android/app/capacitor.build.gradle index fe7e5d776..7bc03eb54 100644 --- a/android/app/capacitor.build.gradle +++ b/android/app/capacitor.build.gradle @@ -15,6 +15,7 @@ dependencies { implementation project(':capacitor-filesystem') implementation project(':capacitor-keyboard') implementation project(':capacitor-screen-orientation') + implementation project(':capacitor-share') implementation project(':capacitor-splash-screen') } diff --git a/android/capacitor.settings.gradle b/android/capacitor.settings.gradle index 7ca103cf7..58d3109d0 100644 --- a/android/capacitor.settings.gradle +++ b/android/capacitor.settings.gradle @@ -20,5 +20,8 @@ project(':capacitor-keyboard').projectDir = new File('../node_modules/@capacitor include ':capacitor-screen-orientation' project(':capacitor-screen-orientation').projectDir = new File('../node_modules/@capacitor/screen-orientation/android') +include ':capacitor-share' +project(':capacitor-share').projectDir = new File('../node_modules/@capacitor/share/android') + include ':capacitor-splash-screen' project(':capacitor-splash-screen').projectDir = new File('../node_modules/@capacitor/splash-screen/android') diff --git a/ios/App/Podfile b/ios/App/Podfile index 9876b9ace..777094901 100644 --- a/ios/App/Podfile +++ b/ios/App/Podfile @@ -17,6 +17,7 @@ def capacitor_pods pod 'CapacitorFilesystem', :path => '../../node_modules/@capacitor/filesystem' pod 'CapacitorKeyboard', :path => '../../node_modules/@capacitor/keyboard' pod 'CapacitorScreenOrientation', :path => '../../node_modules/@capacitor/screen-orientation' + pod 'CapacitorShare', :path => '../../node_modules/@capacitor/share' pod 'CapacitorSplashScreen', :path => '../../node_modules/@capacitor/splash-screen' end diff --git a/ios/App/Podfile.lock b/ios/App/Podfile.lock index d926ffb28..2ecbf6721 100644 --- a/ios/App/Podfile.lock +++ b/ios/App/Podfile.lock @@ -14,6 +14,8 @@ PODS: - Capacitor - CapacitorScreenOrientation (6.0.3): - Capacitor + - CapacitorShare (6.0.3): + - Capacitor - CapacitorSplashScreen (6.0.2): - Capacitor @@ -26,6 +28,7 @@ DEPENDENCIES: - "CapacitorFilesystem (from `../../node_modules/@capacitor/filesystem`)" - "CapacitorKeyboard (from `../../node_modules/@capacitor/keyboard`)" - "CapacitorScreenOrientation (from `../../node_modules/@capacitor/screen-orientation`)" + - "CapacitorShare (from `../../node_modules/@capacitor/share`)" - "CapacitorSplashScreen (from `../../node_modules/@capacitor/splash-screen`)" EXTERNAL SOURCES: @@ -45,6 +48,8 @@ EXTERNAL SOURCES: :path: "../../node_modules/@capacitor/keyboard" CapacitorScreenOrientation: :path: "../../node_modules/@capacitor/screen-orientation" + CapacitorShare: + :path: "../../node_modules/@capacitor/share" CapacitorSplashScreen: :path: "../../node_modules/@capacitor/splash-screen" @@ -57,8 +62,9 @@ SPEC CHECKSUMS: CapacitorFilesystem: c832a3f6d4870c3872688e782ae8e33665e6ecbf CapacitorKeyboard: 460c6f9ec5e52c84f2742d5ce2e67bbc7ab0ebb0 CapacitorScreenOrientation: 3bb823f5d265190301cdc5d58a568a287d98972a + CapacitorShare: 7af6ca761ce62030e8e9fbd2eb82416f5ceced38 CapacitorSplashScreen: 250df9ef8014fac5c7c1fd231f0f8b1d8f0b5624 -PODFILE CHECKSUM: 0bfaa008b5f31bb57606a8c6259197a6af507ba4 +PODFILE CHECKSUM: daefcb9f29d499a6633a575f4f00448532a7aeff COCOAPODS: 1.16.2 diff --git a/package.json b/package.json index 9b4209a8e..ac1014658 100644 --- a/package.json +++ b/package.json @@ -44,6 +44,7 @@ "@capacitor/ios": "^6.2.0", "@capacitor/keyboard": "^6.0.3", "@capacitor/screen-orientation": "^6.0.3", + "@capacitor/share": "^6.0.3", "@capacitor/splash-screen": "^6.0.2", "@dicebear/collection": "^9.0.1", "@dicebear/core": "^9.0.1", diff --git a/src/lib/lang/en.json b/src/lib/lang/en.json index 0ce862b24..923d5e7c8 100644 --- a/src/lib/lang/en.json +++ b/src/lib/lang/en.json @@ -256,6 +256,7 @@ "title": "Backup your seed!", "save_warning": "Please ensure you write down this message with all words recorded in the order they appear. It can be helpful to write down the numbers along with the words.", "download": "Download Backup", + "share": "Share Backup Seed Phrase", "next_step": "Next Step" }, "new_account": { diff --git a/src/lib/layouts/login/RecoveryCopy.svelte b/src/lib/layouts/login/RecoveryCopy.svelte index 312172b05..7dba89847 100644 --- a/src/lib/layouts/login/RecoveryCopy.svelte +++ b/src/lib/layouts/login/RecoveryCopy.svelte @@ -1,13 +1,15 @@