Bobarik31p hace 2 días
padre
commit
e9791d9d40

+ 2 - 0
app/build.gradle.kts

@@ -78,6 +78,8 @@ dependencies {
     implementation(libs.androidx.navigation.dynamic.features.fragment)
     implementation(libs.supabase.gotrue.kt)
     implementation (libs.datetime)
+    implementation(libs.coil.compose)
+    implementation (libs.storage.kt)
 
 
 

+ 2 - 0
app/src/main/java/com/example/tasks/components/Constants.kt

@@ -4,6 +4,7 @@ import io.github.jan.supabase.createSupabaseClient
 import io.github.jan.supabase.gotrue.Auth
 import io.github.jan.supabase.postgrest.Postgrest
 import io.github.jan.supabase.postgrest.PropertyConversionMethod
+import io.github.jan.supabase.storage.Storage
 
 
 object Constants {
@@ -15,5 +16,6 @@ object Constants {
         install(Postgrest){
             propertyConversionMethod = PropertyConversionMethod.SERIAL_NAME
         }
+        install(Storage)
     }
 }

+ 3 - 0
app/src/main/java/com/example/tasks/screens/CreateProfile.kt

@@ -126,6 +126,9 @@ fun CreateProfile(navController: NavController, viewModel: AuthViewModel) {
                 modifier = Modifier.padding(bottom = 30.dp)
             )
             Spacer(modifier = Modifier.height(20.dp))
+            Button(onClick = {}) {
+                Text("Добавить аватарку")
+            }
             Column{
                 OutlinedTextField(value = surname.value,
                     onValueChange = { it -> surname.value = it },

+ 3 - 0
gradle/libs.versions.toml

@@ -1,6 +1,7 @@
 [versions]
 agp = "8.5.2"
 bom = "2.6.1"
+coilCompose = "2.4.0"
 datetime = "0.8.1-rc"
 kotlin = "1.9.0"
 coreKtx = "1.13.1"
@@ -24,6 +25,7 @@ androidx-navigation-dynamic-features-fragment = { module = "androidx.navigation:
 androidx-navigation-fragment = { module = "androidx.navigation:navigation-fragment", version.ref = "navigationCompose" }
 androidx-navigation-ui = { module = "androidx.navigation:navigation-ui", version.ref = "navigationCompose" }
 bom = { module = "io.github.jan-tennert.supabase:bom", version.ref = "bom" }
+coil-compose = { module = "io.coil-kt:coil-compose", version.ref = "coilCompose" }
 datetime = { module = "io.github.vanpra.compose-material-dialogs:datetime", version.ref = "datetime" }
 gotrue-kt = { module = "io.github.jan-tennert.supabase:gotrue-kt" }
 junit = { group = "junit", name = "junit", version.ref = "junit" }
@@ -43,6 +45,7 @@ ktor-client-cio = { module = "io.ktor:ktor-client-cio", version.ref = "ktorClien
 ktor-client-okhttp = { module = "io.ktor:ktor-client-okhttp", version.ref = "ktorClientOkhttp" }
 postgrest-kt = { module = "io.github.jan-tennert.supabase:postgrest-kt" }
 realtime-kt = { module = "io.github.jan-tennert.supabase:realtime-kt" }
+storage-kt = { module = "io.github.jan-tennert.supabase:storage-kt", version.ref = "bom" }
 supabase-gotrue = { module = "io.github.jan-tennert.supabase:supabase-gotrue", version.ref = "bom" }
 supabase-gotrue-kt = { module = "io.github.jan-tennert.supabase:gotrue-kt", version.ref = "bom" }
 supabase-kt = { module = "io.supabase:supabase-kt", version.ref = "supabaseKt" }