From 7800a70ef203bb16473b417c6c7cf70ad18d3220 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Sat, 27 Jul 2024 19:20:53 +0800 Subject: [PATCH] :sparkles: Deep link --- .github/workflows/nightly.yml | 21 ---------------- android/app/build.gradle | 18 ++++++++++++- android/app/src/main/AndroidManifest.xml | 4 ++- ios/Runner/Runner.entitlements | 2 ++ lib/screens/home.dart | 2 +- .../attachment_list_fullscreen.dart | 12 +++++++-- web/.well-known/apple-app-site-association | 25 +++++++++++++++++++ web/.well-known/assetlinks.json | 14 +++++++++++ 8 files changed, 72 insertions(+), 26 deletions(-) create mode 100644 web/.well-known/apple-app-site-association create mode 100644 web/.well-known/assetlinks.json diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index aa47d2b..224d496 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -22,27 +22,6 @@ jobs: with: name: build-output-web path: build/web - build-apk: - runs-on: ubuntu-latest - steps: - - name: Clone repository - uses: actions/checkout@v4 - - name: Set up Flutter - uses: subosito/flutter-action@v2 - with: - channel: stable - cache: true - - uses: actions/setup-java@v4 - with: - distribution: "zulu" - java-version: "17" - - run: flutter pub get - - run: flutter build apk --split-per-abi - - name: Archive production artifacts - uses: actions/upload-artifact@v4 - with: - name: build-output-android - path: build/app/outputs/flutter-apk/*.apk build-exe: runs-on: windows-latest steps: diff --git a/android/app/build.gradle b/android/app/build.gradle index 4745a04..fe2e814 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -23,11 +23,26 @@ if (flutterVersionName == null) { flutterVersionName = "1.0" } +def keystoreProperties = new Properties() +def keystorePropertiesFile = rootProject.file('key.properties') +if (keystorePropertiesFile.exists()) { + keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) +} + android { namespace = "dev.solsynth.solian" compileSdk = flutter.compileSdkVersion ndkVersion = "26.1.10909125" + signingConfigs { + release { + keyAlias keystoreProperties['keyAlias'] + keyPassword keystoreProperties['keyPassword'] + storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null + storePassword keystoreProperties['storePassword'] + } + } + compileOptions { coreLibraryDesugaringEnabled true sourceCompatibility JavaVersion.VERSION_17 @@ -45,7 +60,8 @@ android { buildTypes { release { - signingConfig = signingConfigs.debug + // signingConfig = signingConfigs.debug + signingConfig = signingConfigs.release } } } diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 883fbea..12397c7 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -54,7 +54,9 @@ - + + + diff --git a/ios/Runner/Runner.entitlements b/ios/Runner/Runner.entitlements index 9278672..7784595 100644 --- a/ios/Runner/Runner.entitlements +++ b/ios/Runner/Runner.entitlements @@ -8,6 +8,8 @@ webcredentials:solsynth.dev applinks:solsynth.dev + webcredentials:sn.solsynth.dev + applinks:sn.solsynth.dev com.apple.developer.usernotifications.communication diff --git a/lib/screens/home.dart b/lib/screens/home.dart index 0ed8009..25c61e7 100644 --- a/lib/screens/home.dart +++ b/lib/screens/home.dart @@ -156,7 +156,7 @@ class PostCreatePopup extends StatelessWidget { ]; return SizedBox( - height: MediaQuery.of(context).size.height * 0.35, + height: MediaQuery.of(context).size.height * 0.38, child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ diff --git a/lib/widgets/attachments/attachment_list_fullscreen.dart b/lib/widgets/attachments/attachment_list_fullscreen.dart index dd691b4..1a40dea 100644 --- a/lib/widgets/attachments/attachment_list_fullscreen.dart +++ b/lib/widgets/attachments/attachment_list_fullscreen.dart @@ -59,6 +59,14 @@ class _AttachmentListFullScreenState extends State { dismissThresholds: const { DismissiblePageDismissDirection.multi: 0.05, }, + onDragStart: () { + print('start dragging'); + setState(() => _showDetails = false); + }, + onDragEnd: () { + print('stop dragging'); + setState(() => _showDetails = true); + }, child: GestureDetector( child: Stack( fit: StackFit.loose, @@ -70,7 +78,7 @@ class _AttachmentListFullScreenState extends State { boundaryMargin: EdgeInsets.zero, minScale: 1, maxScale: 16, - panEnabled: false, + panEnabled: true, scaleEnabled: true, child: AttachmentItem( parentId: widget.parentId, @@ -98,7 +106,7 @@ class _AttachmentListFullScreenState extends State { .animate(target: _showDetails ? 1 : 0) .fadeIn(curve: Curves.fastEaseInToSlowEaseOut), Positioned( - bottom: MediaQuery.of(context).padding.bottom, + bottom: math.max(MediaQuery.of(context).padding.bottom, 16), left: 16, right: 16, child: IgnorePointer( diff --git a/web/.well-known/apple-app-site-association b/web/.well-known/apple-app-site-association new file mode 100644 index 0000000..6f88c26 --- /dev/null +++ b/web/.well-known/apple-app-site-association @@ -0,0 +1,25 @@ +{ + "applinks": { + "apps": [], + "details": [ + { + "appIDs": [ + "W7HPZ53V6B.dev.solsynth.solian" + ], + "paths": [ + "*" + ], + "components": [ + { + "/": "/*" + } + ] + } + ] + }, + "webcredentials": { + "apps": [ + "W7HPZ53V6B.dev.solsynth.solian" + ] + } +} \ No newline at end of file diff --git a/web/.well-known/assetlinks.json b/web/.well-known/assetlinks.json new file mode 100644 index 0000000..fe795af --- /dev/null +++ b/web/.well-known/assetlinks.json @@ -0,0 +1,14 @@ +[ + { + "relation": [ + "delegate_permission/common.handle_all_urls" + ], + "target": { + "namespace": "android_app", + "package_name": "dev.solsynth.solian", + "sha256_cert_fingerprints": [ + "AA:77:45:8F:BD:96:54:E6:F8:A3:83:48:85:6E:24:1B:05:C2:EE:28:A3:25:5B:F4:51:C8:68:90:D9:25:5F:04" + ] + } + } +] \ No newline at end of file