fix: android build alignment (#733)
* fix: android build alignment * feat: make expandable image share button use navigator.share
This commit is contained in:
1 parent
e8714313b8
commit
216ccda503
3 files changed
+34
-14
No files matched your search
@@ -49,18 +49,19 @@ jobs:
|
||||
KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }}
|
||||
KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }}
|
||||
run: |
|
||||
bunx cap build android --androidreleasetype=APK \
|
||||
--keystorepath=app/release.keystore \
|
||||
--keystorepass="$KEYSTORE_PASSWORD" \
|
||||
--keystorealias="$KEY_ALIAS" \
|
||||
--keystorealiaspass="$KEY_PASSWORD" \
|
||||
--signing-type="apksigner"
|
||||
cd android
|
||||
chmod +x gradlew
|
||||
./gradlew assembleRelease \
|
||||
-Pandroid.injected.signing.store.file=$GITHUB_WORKSPACE/android/app/release.keystore \
|
||||
-Pandroid.injected.signing.store.password="$KEYSTORE_PASSWORD" \
|
||||
-Pandroid.injected.signing.key.alias="$KEY_ALIAS" \
|
||||
-Pandroid.injected.signing.key.password="$KEY_PASSWORD"
|
||||
|
||||
- name: Upload APK Artifact
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: android-release-apk
|
||||
path: android/app/build/outputs/apk/release/app-release-signed.apk
|
||||
path: android/app/build/outputs/apk/release/app-release.apk
|
||||
retention-days: 7
|
||||
archive: false
|
||||
|
||||
@@ -69,4 +70,4 @@ jobs:
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
gh release upload ${{ github.event.release.tag_name }} android/app/build/outputs/apk/release/app-release-signed.apk
|
||||
gh release upload ${{ github.event.release.tag_name }} android/app/build/outputs/apk/release/app-release.apk
|
||||
@@ -21,6 +21,10 @@ android {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
debug {
|
||||
applicationIdSuffix ".dex"
|
||||
versionNameSuffix "-dev"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -24,6 +24,24 @@
|
||||
}
|
||||
|
||||
let { alt = '' }: Props = $props()
|
||||
|
||||
async function share() {
|
||||
if (navigator.share != undefined && page.state.openImage != null) {
|
||||
const url = page.state.openImage
|
||||
const blob = await fetch(url).then((i) => i.blob())
|
||||
const file = new File([blob], url.substring(url.lastIndexOf('/') + 1), {
|
||||
type: blob.type,
|
||||
})
|
||||
navigator.share({
|
||||
files: [file],
|
||||
})
|
||||
} else {
|
||||
navigator.clipboard.writeText(page.state.openImage ?? '')
|
||||
toast({
|
||||
content: $t('toast.copied'),
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
{#if page.state.openImage || '' != ''}
|
||||
@@ -57,16 +75,13 @@
|
||||
onclick={(e) => e.stopPropagation()}
|
||||
>
|
||||
<Button
|
||||
onclick={() => {
|
||||
navigator.clipboard.writeText(page.state?.openImage ?? '')
|
||||
toast({ content: $t('toast.copied') })
|
||||
}}
|
||||
onclick={share}
|
||||
color="tertiary"
|
||||
size="square-lg"
|
||||
rounding="pill"
|
||||
aria-label={$t('post.actions.more.share')}
|
||||
icon={Share}
|
||||
></Button>
|
||||
/>
|
||||
<Button
|
||||
onclick={() => history.back()}
|
||||
color="tertiary"
|
||||
@@ -74,7 +89,7 @@
|
||||
rounding="pill"
|
||||
aria-label={$t('common.back')}
|
||||
icon={XMark}
|
||||
></Button>
|
||||
/>
|
||||
</Material>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user