Fix QR code on iphone

This commit is contained in:
Jon Staab
2025-01-31 14:14:42 -08:00
parent f0207b35d0
commit 6c7c533637
14 changed files with 67 additions and 26 deletions

View File

@@ -9,6 +9,7 @@ android {
apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle" apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle"
dependencies { dependencies {
implementation project(':capacitor-app')
implementation project(':nostr-signer-capacitor-plugin') implementation project(':nostr-signer-capacitor-plugin')
} }

View File

@@ -2,5 +2,8 @@
include ':capacitor-android' include ':capacitor-android'
project(':capacitor-android').projectDir = new File('../node_modules/@capacitor/android/capacitor') project(':capacitor-android').projectDir = new File('../node_modules/@capacitor/android/capacitor')
include ':capacitor-app'
project(':capacitor-app').projectDir = new File('../node_modules/@capacitor/app/android')
include ':nostr-signer-capacitor-plugin' include ':nostr-signer-capacitor-plugin'
project(':nostr-signer-capacitor-plugin').projectDir = new File('../node_modules/nostr-signer-capacitor-plugin/android') project(':nostr-signer-capacitor-plugin').projectDir = new File('../node_modules/nostr-signer-capacitor-plugin/android')

View File

@@ -122,8 +122,8 @@
504EC2FC1FED79650016851F /* Project object */ = { 504EC2FC1FED79650016851F /* Project object */ = {
isa = PBXProject; isa = PBXProject;
attributes = { attributes = {
LastSwiftUpdateCheck = 0920; LastSwiftUpdateCheck = 920;
LastUpgradeCheck = 0920; LastUpgradeCheck = 920;
TargetAttributes = { TargetAttributes = {
504EC3031FED79650016851F = { 504EC3031FED79650016851F = {
CreatedOnToolsVersion = 9.2; CreatedOnToolsVersion = 9.2;
@@ -349,6 +349,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1; CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = S26U9DYW3A;
INFOPLIST_FILE = App/Info.plist; INFOPLIST_FILE = App/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0; IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
@@ -369,6 +370,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic; CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1; CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = S26U9DYW3A;
INFOPLIST_FILE = App/Info.plist; INFOPLIST_FILE = App/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0; IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

@@ -1,10 +1,10 @@
{ {
"images": [ "images": [
{ {
"filename" : "AppIcon-512@2x.png",
"idiom": "universal", "idiom": "universal",
"platform" : "ios", "size": "1024x1024",
"size" : "1024x1024" "filename": "AppIcon-512@2x.png",
"platform": "ios"
} }
], ],
"info": { "info": {

View File

@@ -2,18 +2,51 @@
"images": [ "images": [
{ {
"idiom": "universal", "idiom": "universal",
"filename" : "splash-2732x2732-2.png", "filename": "Default@1x~universal~anyany.png",
"scale": "1x" "scale": "1x"
}, },
{ {
"idiom": "universal", "idiom": "universal",
"filename" : "splash-2732x2732-1.png", "filename": "Default@2x~universal~anyany.png",
"scale": "2x" "scale": "2x"
}, },
{ {
"idiom": "universal", "idiom": "universal",
"filename" : "splash-2732x2732.png", "filename": "Default@3x~universal~anyany.png",
"scale": "3x" "scale": "3x"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"idiom": "universal",
"scale": "1x",
"filename": "Default@1x~universal~anyany-dark.png"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"idiom": "universal",
"scale": "2x",
"filename": "Default@2x~universal~anyany-dark.png"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"idiom": "universal",
"scale": "3x",
"filename": "Default@3x~universal~anyany-dark.png"
} }
], ],
"info": { "info": {

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

View File

@@ -129,7 +129,7 @@
</div> </div>
</ModalHeader> </ModalHeader>
{#if !loading && url} {#if !loading && url}
<div class="w-xs m-auto" out:slideAndFade> <div class="flex justify-center" out:slideAndFade>
<QRCode code={url} /> <QRCode code={url} />
</div> </div>
{/if} {/if}

View File

@@ -11,6 +11,8 @@
let scale = 0.1 let scale = 0.1
let height: number let height: number
const copy = () => clip(code)
onMount(() => { onMount(() => {
QRCode.toCanvas(canvas, code) QRCode.toCanvas(canvas, code)
@@ -22,7 +24,7 @@
}) })
</script> </script>
<Button on:click={() => clip(code)}> <Button class="max-w-full" on:click={copy}>
<div bind:this={wrapper} style={`height: ${height}px`}> <div bind:this={wrapper} style={`height: ${height}px`}>
<canvas <canvas
class="rounded-box" class="rounded-box"