Bladeren bron

add Supabase

Иван 2 weken geleden
bovenliggende
commit
6d39781762

+ 1 - 0
Project/.idea/gradle.xml

@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
+  <component name="GradleMigrationSettings" migrationVersion="1" />
   <component name="GradleSettings">
     <option name="linkedExternalProjectsSettings">
       <GradleProjectSettings>

+ 0 - 1
Project/.idea/misc.xml

@@ -1,4 +1,3 @@
-<?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
   <component name="ExternalStorageConfigurationManager" enabled="true" />
   <component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="jbr-17" project-jdk-type="JavaSDK">

+ 1 - 1
Project/app/build.gradle.kts

@@ -6,7 +6,7 @@ plugins {
 
 android {
     namespace = "com.example.mygymapp"
-    compileSdk = 34
+    compileSdk = 35
 
     defaultConfig {
         applicationId = "com.example.mygymapp"

+ 1 - 1
Project/app/src/main/AndroidManifest.xml

@@ -13,7 +13,7 @@
         android:theme="@style/Theme.MyGymApp"
         tools:targetApi="31">
         <activity
-            android:name=".MainActivity"
+            android:name=".view.mainActivity.MainActivity"
             android:exported="true"
             android:label="@string/app_name"
             android:theme="@style/Theme.MyGymApp">

+ 13 - 0
Project/app/src/main/java/com/example/mygymapp/domain/Constants.kt

@@ -1,4 +1,17 @@
 package com.example.mygymapp.domain
 
+import io.github.jan.supabase.auth.Auth
+import io.github.jan.supabase.createSupabaseClient
+import io.github.jan.supabase.postgrest.Postgrest
+import io.github.jan.supabase.storage.Storage
+
 object Constants {
+    val supabase = createSupabaseClient(
+        supabaseUrl = "https://tganggwrlvzgyznbqliw.supabase.co",
+        supabaseKey = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InRnYW5nZ3dybHZ6Z3l6bmJxbGl3Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3MzA5NTkxNDMsImV4cCI6MjA0NjUzNTE0M30.gCsgIMBQ0xqdpXoXz5jzIMPHOOZwtgGBswfTI6vtSpM"
+    ) {
+        install(Auth)
+        install(Storage)
+        install(Postgrest)
+    }
 }

+ 0 - 11
Project/app/src/main/java/com/example/mygymapp/ui/theme/Color.kt

@@ -1,11 +0,0 @@
-package com.example.mygymapp.view.theme
-
-import androidx.compose.ui.graphics.Color
-
-val Purple80 = Color(0xFFD0BCFF)
-val PurpleGrey80 = Color(0xFFCCC2DC)
-val Pink80 = Color(0xFFEFB8C8)
-
-val Purple40 = Color(0xFF6650a4)
-val PurpleGrey40 = Color(0xFF625b71)
-val Pink40 = Color(0xFF7D5260)

+ 0 - 58
Project/app/src/main/java/com/example/mygymapp/ui/theme/Theme.kt

@@ -1,58 +0,0 @@
-package com.example.mygymapp.view.theme
-
-import android.app.Activity
-import android.os.Build
-import androidx.compose.foundation.isSystemInDarkTheme
-import androidx.compose.material3.MaterialTheme
-import androidx.compose.material3.darkColorScheme
-import androidx.compose.material3.dynamicDarkColorScheme
-import androidx.compose.material3.dynamicLightColorScheme
-import androidx.compose.material3.lightColorScheme
-import androidx.compose.runtime.Composable
-import androidx.compose.ui.platform.LocalContext
-
-private val DarkColorScheme = darkColorScheme(
-    primary = Purple80,
-    secondary = PurpleGrey80,
-    tertiary = Pink80
-)
-
-private val LightColorScheme = lightColorScheme(
-    primary = Purple40,
-    secondary = PurpleGrey40,
-    tertiary = Pink40
-
-    /* Other default colors to override
-    background = Color(0xFFFFFBFE),
-    surface = Color(0xFFFFFBFE),
-    onPrimary = Color.White,
-    onSecondary = Color.White,
-    onTertiary = Color.White,
-    onBackground = Color(0xFF1C1B1F),
-    onSurface = Color(0xFF1C1B1F),
-    */
-)
-
-@Composable
-fun MyGymAppTheme(
-    darkTheme: Boolean = isSystemInDarkTheme(),
-    // Dynamic color is available on Android 12+
-    dynamicColor: Boolean = true,
-    content: @Composable () -> Unit
-) {
-    val colorScheme = when {
-        dynamicColor && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> {
-            val context = LocalContext.current
-            if (darkTheme) dynamicDarkColorScheme(context) else dynamicLightColorScheme(context)
-        }
-
-        darkTheme -> DarkColorScheme
-        else -> LightColorScheme
-    }
-
-    MaterialTheme(
-        colorScheme = colorScheme,
-        typography = Typography,
-        content = content
-    )
-}

+ 0 - 34
Project/app/src/main/java/com/example/mygymapp/ui/theme/Type.kt

@@ -1,34 +0,0 @@
-package com.example.mygymapp.view.theme
-
-import androidx.compose.material3.Typography
-import androidx.compose.ui.text.TextStyle
-import androidx.compose.ui.text.font.FontFamily
-import androidx.compose.ui.text.font.FontWeight
-import androidx.compose.ui.unit.sp
-
-// Set of Material typography styles to start with
-val Typography = Typography(
-    bodyLarge = TextStyle(
-        fontFamily = FontFamily.Default,
-        fontWeight = FontWeight.Normal,
-        fontSize = 16.sp,
-        lineHeight = 24.sp,
-        letterSpacing = 0.5.sp
-    )
-    /* Other default text styles to override
-    titleLarge = TextStyle(
-        fontFamily = FontFamily.Default,
-        fontWeight = FontWeight.Normal,
-        fontSize = 22.sp,
-        lineHeight = 28.sp,
-        letterSpacing = 0.sp
-    ),
-    labelSmall = TextStyle(
-        fontFamily = FontFamily.Default,
-        fontWeight = FontWeight.Medium,
-        fontSize = 11.sp,
-        lineHeight = 16.sp,
-        letterSpacing = 0.5.sp
-    )
-    */
-)

+ 1 - 1
Project/app/src/main/java/com/example/mygymapp/view/mainActivity/MainActivity.kt

@@ -1,4 +1,4 @@
-package com.example.mygymapp
+package com.example.mygymapp.view.mainActivity
 
 import android.os.Bundle
 import androidx.activity.ComponentActivity

+ 2 - 2
Project/gradle/libs.versions.toml

@@ -1,5 +1,5 @@
 [versions]
-agp = "8.5.1"
+agp = "8.5.2"
 authKt = "3.0.1"
 bom = "2.6.1"
 kotlin = "2.0.0"
@@ -10,7 +10,7 @@ espressoCore = "3.6.1"
 ktorClientAndroid = "3.0.0"
 lifecycleRuntimeKtx = "2.8.7"
 activityCompose = "1.9.3"
-composeBom = "2024.04.01"
+composeBom = "2024.10.01"
 postgrestKt = "3.0.1"
 
 [libraries]