From 3c9b3f23df74890128cdc0b99b04a958b4c7c9bc Mon Sep 17 00:00:00 2001 From: Jon Staab Date: Thu, 18 Sep 2025 13:43:43 -0700 Subject: [PATCH] Upload profile pictures instead of doing base64 --- android/app/capacitor.build.gradle | 1 + android/capacitor.settings.gradle | 3 + .../components/InputProfilePicture.svelte | 38 ++++--- src/app/components/ProfileEditForm.svelte | 2 +- src/app/components/SpaceCreate.svelte | 2 +- src/app/core/commands.ts | 84 ++++++++++++++- src/app/editor/index.ts | 83 ++------------- src/lib/components/InputPicture.svelte | 100 ------------------ 8 files changed, 120 insertions(+), 193 deletions(-) rename src/{lib => app}/components/InputProfilePicture.svelte (80%) delete mode 100644 src/lib/components/InputPicture.svelte diff --git a/android/app/capacitor.build.gradle b/android/app/capacitor.build.gradle index 24d64488..51e17cb8 100644 --- a/android/app/capacitor.build.gradle +++ b/android/app/capacitor.build.gradle @@ -14,6 +14,7 @@ dependencies { implementation project(':capacitor-keyboard') implementation project(':capacitor-preferences') implementation project(':capacitor-push-notifications') + implementation project(':capawesome-capacitor-android-dark-mode-support') implementation project(':capawesome-capacitor-badge') implementation project(':nostr-signer-capacitor-plugin') diff --git a/android/capacitor.settings.gradle b/android/capacitor.settings.gradle index 5b240b76..c86a5c8e 100644 --- a/android/capacitor.settings.gradle +++ b/android/capacitor.settings.gradle @@ -17,6 +17,9 @@ project(':capacitor-preferences').projectDir = new File('../node_modules/.pnpm/@ include ':capacitor-push-notifications' project(':capacitor-push-notifications').projectDir = new File('../node_modules/.pnpm/@capacitor+push-notifications@7.0.1_@capacitor+core@7.2.0/node_modules/@capacitor/push-notifications/android') +include ':capawesome-capacitor-android-dark-mode-support' +project(':capawesome-capacitor-android-dark-mode-support').projectDir = new File('../node_modules/.pnpm/@capawesome+capacitor-android-dark-mode-support@7.0.0_@capacitor+core@7.2.0/node_modules/@capawesome/capacitor-android-dark-mode-support/android') + include ':capawesome-capacitor-badge' project(':capawesome-capacitor-badge').projectDir = new File('../node_modules/.pnpm/@capawesome+capacitor-badge@7.0.1_@capacitor+core@7.2.0/node_modules/@capawesome/capacitor-badge/android') diff --git a/src/lib/components/InputProfilePicture.svelte b/src/app/components/InputProfilePicture.svelte similarity index 80% rename from src/lib/components/InputProfilePicture.svelte rename to src/app/components/InputProfilePicture.svelte index a7a322d9..26252c5a 100644 --- a/src/lib/components/InputProfilePicture.svelte +++ b/src/app/components/InputProfilePicture.svelte @@ -1,10 +1,11 @@ diff --git a/src/app/components/ProfileEditForm.svelte b/src/app/components/ProfileEditForm.svelte index aa9b33ec..8caaec01 100644 --- a/src/app/components/ProfileEditForm.svelte +++ b/src/app/components/ProfileEditForm.svelte @@ -8,7 +8,7 @@ import Field from "@lib/components/Field.svelte" import FieldInline from "@lib/components/FieldInline.svelte" import Button from "@lib/components/Button.svelte" - import InputProfilePicture from "@lib/components/InputProfilePicture.svelte" + import InputProfilePicture from "@app/components/InputProfilePicture.svelte" import InfoHandle from "@app/components/InfoHandle.svelte" import {pushModal} from "@app/util/modal" diff --git a/src/app/components/SpaceCreate.svelte b/src/app/components/SpaceCreate.svelte index 233c5cf9..325381a4 100644 --- a/src/app/components/SpaceCreate.svelte +++ b/src/app/components/SpaceCreate.svelte @@ -1,6 +1,5 @@ - -
- - -