diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index efbfdcd..cadfbee 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -76,6 +76,26 @@ jobs: pnpm install pnpm run build + - name: Generate Android Icons + run: | + # 使用 ImageMagick 生成各尺寸图标 + convert logo.png -resize 48x48 android/app/src/main/res/mipmap-mdpi/ic_launcher.png + convert logo.png -resize 48x48 android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png + convert logo.png -resize 72x72 android/app/src/main/res/mipmap-hdpi/ic_launcher.png + convert logo.png -resize 72x72 android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png + convert logo.png -resize 96x96 android/app/src/main/res/mipmap-xhdpi/ic_launcher.png + convert logo.png -resize 96x96 android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png + convert logo.png -resize 144x144 android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png + convert logo.png -resize 144x144 android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png + convert logo.png -resize 192x192 android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png + convert logo.png -resize 192x192 android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png + # foreground 图标需要更大(108dp with 72dp safe zone) + convert logo.png -resize 108x108 android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png + convert logo.png -resize 162x162 android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png + convert logo.png -resize 216x216 android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png + convert logo.png -resize 324x324 android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png + convert logo.png -resize 432x432 android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png + - name: Sync Capacitor run: npx cap sync android diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index b06ddbf..5fd9523 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -7,6 +7,8 @@ android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" + android:usesCleartextTraffic="true" + android:networkSecurityConfig="@xml/network_security_config" android:theme="@style/AppTheme"> + + + + + + + diff --git a/logo.png b/logo.png new file mode 100644 index 0000000..c58032d Binary files /dev/null and b/logo.png differ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0850b26..37c3fe5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -968,8 +968,8 @@ packages: resolution: {integrity: sha512-Qkzpg2s9GnVV2I2BjRksUi43U5e6+zaQMcjoJy0C+C5oxaKl+fmckGDQFtRpZpZV0NQekuZZ+tGz7EA9TVnQtQ==} engines: {node: '>=12'} - '@electron/node-gyp@https://codeload.github.com/electron/node-gyp/tar.gz/06b29aafb7708acef8b3669835c8a7857ebc92d2': - resolution: {tarball: https://codeload.github.com/electron/node-gyp/tar.gz/06b29aafb7708acef8b3669835c8a7857ebc92d2} + '@electron/node-gyp@git+https://github.com/electron/node-gyp.git#06b29aafb7708acef8b3669835c8a7857ebc92d2': + resolution: {commit: 06b29aafb7708acef8b3669835c8a7857ebc92d2, repo: https://github.com/electron/node-gyp.git, type: git} version: 10.2.0-electron.1 engines: {node: '>=12.13.0'} hasBin: true @@ -5438,7 +5438,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@electron/node-gyp@https://codeload.github.com/electron/node-gyp/tar.gz/06b29aafb7708acef8b3669835c8a7857ebc92d2': + '@electron/node-gyp@git+https://github.com/electron/node-gyp.git#06b29aafb7708acef8b3669835c8a7857ebc92d2': dependencies: env-paths: 2.2.1 exponential-backoff: 3.1.3 @@ -5475,7 +5475,7 @@ snapshots: '@electron/rebuild@3.7.0': dependencies: - '@electron/node-gyp': https://codeload.github.com/electron/node-gyp/tar.gz/06b29aafb7708acef8b3669835c8a7857ebc92d2 + '@electron/node-gyp': git+https://github.com/electron/node-gyp.git#06b29aafb7708acef8b3669835c8a7857ebc92d2 '@malept/cross-spawn-promise': 2.0.0 chalk: 4.1.2 debug: 4.4.3 diff --git a/resources/icon.png b/resources/icon.png new file mode 100644 index 0000000..c58032d Binary files /dev/null and b/resources/icon.png differ