소스 검색

buid && feat: update dependencies and add splashscreeen

Bax 3 일 전
부모
커밋
62469166b7
34개의 변경된 파일488개의 추가작업 그리고 444개의 파일을 삭제
  1. 1 0
      mobile_app/new/wabi/.idea/gradle.xml
  2. 0 1
      mobile_app/new/wabi/.idea/misc.xml
  3. 0 329
      mobile_app/new/wabi/.idea/other.xml
  4. 31 2
      mobile_app/new/wabi/app/build.gradle.kts
  5. 5 3
      mobile_app/new/wabi/app/src/main/AndroidManifest.xml
  6. 36 0
      mobile_app/new/wabi/app/src/main/java/com/example/wabi/domain/navigation/Navigation.kt
  7. 10 0
      mobile_app/new/wabi/app/src/main/java/com/example/wabi/domain/navigation/NavigationRoutes.kt
  8. 13 0
      mobile_app/new/wabi/app/src/main/java/com/example/wabi/models/supabase/Basket.kt
  9. 13 0
      mobile_app/new/wabi/app/src/main/java/com/example/wabi/models/supabase/Location.kt
  10. 17 0
      mobile_app/new/wabi/app/src/main/java/com/example/wabi/models/supabase/Products.kt
  11. 12 0
      mobile_app/new/wabi/app/src/main/java/com/example/wabi/models/supabase/Rating.kt
  12. 13 0
      mobile_app/new/wabi/app/src/main/java/com/example/wabi/models/supabase/Shop.kt
  13. 15 0
      mobile_app/new/wabi/app/src/main/java/com/example/wabi/models/supabase/Unit.kt
  14. 15 0
      mobile_app/new/wabi/app/src/main/java/com/example/wabi/models/supabase/User.kt
  15. 17 0
      mobile_app/new/wabi/app/src/main/java/com/example/wabi/models/system/ColorPalette.kt
  16. 17 0
      mobile_app/new/wabi/app/src/main/java/com/example/wabi/models/system/Type.kt
  17. 0 11
      mobile_app/new/wabi/app/src/main/java/com/example/wabi/ui/theme/Color.kt
  18. 0 58
      mobile_app/new/wabi/app/src/main/java/com/example/wabi/ui/theme/Theme.kt
  19. 0 34
      mobile_app/new/wabi/app/src/main/java/com/example/wabi/ui/theme/Type.kt
  20. 6 4
      mobile_app/new/wabi/app/src/main/java/com/example/wabi/view/MainActivity.kt
  21. 8 0
      mobile_app/new/wabi/app/src/main/java/com/example/wabi/view/StartApp.kt
  22. 9 0
      mobile_app/new/wabi/app/src/main/java/com/example/wabi/view/screeens/basket/Basket.kt
  23. 10 0
      mobile_app/new/wabi/app/src/main/java/com/example/wabi/view/screeens/catalog/Catalog.kt
  24. 10 0
      mobile_app/new/wabi/app/src/main/java/com/example/wabi/view/screeens/onboard/Onboard.kt
  25. 10 0
      mobile_app/new/wabi/app/src/main/java/com/example/wabi/view/screeens/profile/Profile.kt
  26. 10 0
      mobile_app/new/wabi/app/src/main/java/com/example/wabi/view/screeens/signIn/SignIn.kt
  27. 10 0
      mobile_app/new/wabi/app/src/main/java/com/example/wabi/view/screeens/signUp/SignUp.kt
  28. 42 0
      mobile_app/new/wabi/app/src/main/java/com/example/wabi/view/ui/theme/Color.kt
  29. 57 0
      mobile_app/new/wabi/app/src/main/java/com/example/wabi/view/ui/theme/Theme.kt
  30. 92 0
      mobile_app/new/wabi/app/src/main/java/com/example/wabi/view/ui/theme/Type.kt
  31. 1 0
      mobile_app/new/wabi/app/src/main/res/values/colors.xml
  32. 5 1
      mobile_app/new/wabi/app/src/main/res/values/themes.xml
  33. 2 0
      mobile_app/new/wabi/build.gradle.kts
  34. 1 1
      mobile_app/wabi/.idea/misc.xml

+ 1 - 0
mobile_app/new/wabi/.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
mobile_app/new/wabi/.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">

+ 0 - 329
mobile_app/new/wabi/.idea/other.xml

@@ -1,329 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="direct_access_persist.xml">
-    <option name="deviceSelectionList">
-      <list>
-        <PersistentDeviceSelectionData>
-          <option name="api" value="27" />
-          <option name="brand" value="DOCOMO" />
-          <option name="codename" value="F01L" />
-          <option name="id" value="F01L" />
-          <option name="manufacturer" value="FUJITSU" />
-          <option name="name" value="F-01L" />
-          <option name="screenDensity" value="360" />
-          <option name="screenX" value="720" />
-          <option name="screenY" value="1280" />
-        </PersistentDeviceSelectionData>
-        <PersistentDeviceSelectionData>
-          <option name="api" value="28" />
-          <option name="brand" value="DOCOMO" />
-          <option name="codename" value="SH-01L" />
-          <option name="id" value="SH-01L" />
-          <option name="manufacturer" value="SHARP" />
-          <option name="name" value="AQUOS sense2 SH-01L" />
-          <option name="screenDensity" value="480" />
-          <option name="screenX" value="1080" />
-          <option name="screenY" value="2160" />
-        </PersistentDeviceSelectionData>
-        <PersistentDeviceSelectionData>
-          <option name="api" value="34" />
-          <option name="brand" value="Lenovo" />
-          <option name="codename" value="TB370FU" />
-          <option name="id" value="TB370FU" />
-          <option name="manufacturer" value="Lenovo" />
-          <option name="name" value="Tab P12" />
-          <option name="screenDensity" value="340" />
-          <option name="screenX" value="1840" />
-          <option name="screenY" value="2944" />
-        </PersistentDeviceSelectionData>
-        <PersistentDeviceSelectionData>
-          <option name="api" value="31" />
-          <option name="brand" value="samsung" />
-          <option name="codename" value="a51" />
-          <option name="id" value="a51" />
-          <option name="manufacturer" value="Samsung" />
-          <option name="name" value="Galaxy A51" />
-          <option name="screenDensity" value="420" />
-          <option name="screenX" value="1080" />
-          <option name="screenY" value="2400" />
-        </PersistentDeviceSelectionData>
-        <PersistentDeviceSelectionData>
-          <option name="api" value="34" />
-          <option name="brand" value="google" />
-          <option name="codename" value="akita" />
-          <option name="id" value="akita" />
-          <option name="manufacturer" value="Google" />
-          <option name="name" value="Pixel 8a" />
-          <option name="screenDensity" value="420" />
-          <option name="screenX" value="1080" />
-          <option name="screenY" value="2400" />
-        </PersistentDeviceSelectionData>
-        <PersistentDeviceSelectionData>
-          <option name="api" value="33" />
-          <option name="brand" value="samsung" />
-          <option name="codename" value="b0q" />
-          <option name="id" value="b0q" />
-          <option name="manufacturer" value="Samsung" />
-          <option name="name" value="Galaxy S22 Ultra" />
-          <option name="screenDensity" value="600" />
-          <option name="screenX" value="1440" />
-          <option name="screenY" value="3088" />
-        </PersistentDeviceSelectionData>
-        <PersistentDeviceSelectionData>
-          <option name="api" value="32" />
-          <option name="brand" value="google" />
-          <option name="codename" value="bluejay" />
-          <option name="id" value="bluejay" />
-          <option name="manufacturer" value="Google" />
-          <option name="name" value="Pixel 6a" />
-          <option name="screenDensity" value="420" />
-          <option name="screenX" value="1080" />
-          <option name="screenY" value="2400" />
-        </PersistentDeviceSelectionData>
-        <PersistentDeviceSelectionData>
-          <option name="api" value="34" />
-          <option name="brand" value="google" />
-          <option name="codename" value="caiman" />
-          <option name="id" value="caiman" />
-          <option name="manufacturer" value="Google" />
-          <option name="name" value="Pixel 9 Pro" />
-          <option name="screenDensity" value="360" />
-          <option name="screenX" value="960" />
-          <option name="screenY" value="2142" />
-        </PersistentDeviceSelectionData>
-        <PersistentDeviceSelectionData>
-          <option name="api" value="34" />
-          <option name="brand" value="google" />
-          <option name="codename" value="comet" />
-          <option name="id" value="comet" />
-          <option name="manufacturer" value="Google" />
-          <option name="name" value="Pixel 9 Pro Fold" />
-          <option name="screenDensity" value="390" />
-          <option name="screenX" value="2076" />
-          <option name="screenY" value="2152" />
-        </PersistentDeviceSelectionData>
-        <PersistentDeviceSelectionData>
-          <option name="api" value="29" />
-          <option name="brand" value="samsung" />
-          <option name="codename" value="crownqlteue" />
-          <option name="id" value="crownqlteue" />
-          <option name="manufacturer" value="Samsung" />
-          <option name="name" value="Galaxy Note9" />
-          <option name="screenDensity" value="420" />
-          <option name="screenX" value="2220" />
-          <option name="screenY" value="1080" />
-        </PersistentDeviceSelectionData>
-        <PersistentDeviceSelectionData>
-          <option name="api" value="34" />
-          <option name="brand" value="samsung" />
-          <option name="codename" value="dm3q" />
-          <option name="id" value="dm3q" />
-          <option name="manufacturer" value="Samsung" />
-          <option name="name" value="Galaxy S23 Ultra" />
-          <option name="screenDensity" value="600" />
-          <option name="screenX" value="1440" />
-          <option name="screenY" value="3088" />
-        </PersistentDeviceSelectionData>
-        <PersistentDeviceSelectionData>
-          <option name="api" value="34" />
-          <option name="brand" value="samsung" />
-          <option name="codename" value="e1q" />
-          <option name="id" value="e1q" />
-          <option name="manufacturer" value="Samsung" />
-          <option name="name" value="Galaxy S24" />
-          <option name="screenDensity" value="480" />
-          <option name="screenX" value="1080" />
-          <option name="screenY" value="2340" />
-        </PersistentDeviceSelectionData>
-        <PersistentDeviceSelectionData>
-          <option name="api" value="33" />
-          <option name="brand" value="google" />
-          <option name="codename" value="felix" />
-          <option name="id" value="felix" />
-          <option name="manufacturer" value="Google" />
-          <option name="name" value="Pixel Fold" />
-          <option name="screenDensity" value="420" />
-          <option name="screenX" value="2208" />
-          <option name="screenY" value="1840" />
-        </PersistentDeviceSelectionData>
-        <PersistentDeviceSelectionData>
-          <option name="api" value="34" />
-          <option name="brand" value="google" />
-          <option name="codename" value="felix" />
-          <option name="id" value="felix" />
-          <option name="manufacturer" value="Google" />
-          <option name="name" value="Pixel Fold" />
-          <option name="screenDensity" value="420" />
-          <option name="screenX" value="2208" />
-          <option name="screenY" value="1840" />
-        </PersistentDeviceSelectionData>
-        <PersistentDeviceSelectionData>
-          <option name="api" value="33" />
-          <option name="brand" value="google" />
-          <option name="codename" value="felix_camera" />
-          <option name="id" value="felix_camera" />
-          <option name="manufacturer" value="Google" />
-          <option name="name" value="Pixel Fold (Camera-enabled)" />
-          <option name="screenDensity" value="420" />
-          <option name="screenX" value="2208" />
-          <option name="screenY" value="1840" />
-        </PersistentDeviceSelectionData>
-        <PersistentDeviceSelectionData>
-          <option name="api" value="33" />
-          <option name="brand" value="samsung" />
-          <option name="codename" value="gts8uwifi" />
-          <option name="id" value="gts8uwifi" />
-          <option name="manufacturer" value="Samsung" />
-          <option name="name" value="Galaxy Tab S8 Ultra" />
-          <option name="screenDensity" value="320" />
-          <option name="screenX" value="1848" />
-          <option name="screenY" value="2960" />
-        </PersistentDeviceSelectionData>
-        <PersistentDeviceSelectionData>
-          <option name="api" value="34" />
-          <option name="brand" value="google" />
-          <option name="codename" value="husky" />
-          <option name="id" value="husky" />
-          <option name="manufacturer" value="Google" />
-          <option name="name" value="Pixel 8 Pro" />
-          <option name="screenDensity" value="390" />
-          <option name="screenX" value="1008" />
-          <option name="screenY" value="2244" />
-        </PersistentDeviceSelectionData>
-        <PersistentDeviceSelectionData>
-          <option name="api" value="30" />
-          <option name="brand" value="motorola" />
-          <option name="codename" value="java" />
-          <option name="id" value="java" />
-          <option name="manufacturer" value="Motorola" />
-          <option name="name" value="G20" />
-          <option name="screenDensity" value="280" />
-          <option name="screenX" value="720" />
-          <option name="screenY" value="1600" />
-        </PersistentDeviceSelectionData>
-        <PersistentDeviceSelectionData>
-          <option name="api" value="34" />
-          <option name="brand" value="google" />
-          <option name="codename" value="komodo" />
-          <option name="id" value="komodo" />
-          <option name="manufacturer" value="Google" />
-          <option name="name" value="Pixel 9 Pro XL" />
-          <option name="screenDensity" value="360" />
-          <option name="screenX" value="1008" />
-          <option name="screenY" value="2244" />
-        </PersistentDeviceSelectionData>
-        <PersistentDeviceSelectionData>
-          <option name="api" value="33" />
-          <option name="brand" value="google" />
-          <option name="codename" value="lynx" />
-          <option name="id" value="lynx" />
-          <option name="manufacturer" value="Google" />
-          <option name="name" value="Pixel 7a" />
-          <option name="screenDensity" value="420" />
-          <option name="screenX" value="1080" />
-          <option name="screenY" value="2400" />
-        </PersistentDeviceSelectionData>
-        <PersistentDeviceSelectionData>
-          <option name="api" value="31" />
-          <option name="brand" value="google" />
-          <option name="codename" value="oriole" />
-          <option name="id" value="oriole" />
-          <option name="manufacturer" value="Google" />
-          <option name="name" value="Pixel 6" />
-          <option name="screenDensity" value="420" />
-          <option name="screenX" value="1080" />
-          <option name="screenY" value="2400" />
-        </PersistentDeviceSelectionData>
-        <PersistentDeviceSelectionData>
-          <option name="api" value="33" />
-          <option name="brand" value="google" />
-          <option name="codename" value="panther" />
-          <option name="id" value="panther" />
-          <option name="manufacturer" value="Google" />
-          <option name="name" value="Pixel 7" />
-          <option name="screenDensity" value="420" />
-          <option name="screenX" value="1080" />
-          <option name="screenY" value="2400" />
-        </PersistentDeviceSelectionData>
-        <PersistentDeviceSelectionData>
-          <option name="api" value="34" />
-          <option name="brand" value="samsung" />
-          <option name="codename" value="q5q" />
-          <option name="id" value="q5q" />
-          <option name="manufacturer" value="Samsung" />
-          <option name="name" value="Galaxy Z Fold5" />
-          <option name="screenDensity" value="420" />
-          <option name="screenX" value="1812" />
-          <option name="screenY" value="2176" />
-        </PersistentDeviceSelectionData>
-        <PersistentDeviceSelectionData>
-          <option name="api" value="34" />
-          <option name="brand" value="samsung" />
-          <option name="codename" value="q6q" />
-          <option name="id" value="q6q" />
-          <option name="manufacturer" value="Samsung" />
-          <option name="name" value="Galaxy Z Fold6" />
-          <option name="screenDensity" value="420" />
-          <option name="screenX" value="1856" />
-          <option name="screenY" value="2160" />
-        </PersistentDeviceSelectionData>
-        <PersistentDeviceSelectionData>
-          <option name="api" value="30" />
-          <option name="brand" value="google" />
-          <option name="codename" value="r11" />
-          <option name="id" value="r11" />
-          <option name="manufacturer" value="Google" />
-          <option name="name" value="Pixel Watch" />
-          <option name="screenDensity" value="320" />
-          <option name="screenX" value="384" />
-          <option name="screenY" value="384" />
-          <option name="type" value="WEAR_OS" />
-        </PersistentDeviceSelectionData>
-        <PersistentDeviceSelectionData>
-          <option name="api" value="30" />
-          <option name="brand" value="google" />
-          <option name="codename" value="redfin" />
-          <option name="id" value="redfin" />
-          <option name="manufacturer" value="Google" />
-          <option name="name" value="Pixel 5" />
-          <option name="screenDensity" value="440" />
-          <option name="screenX" value="1080" />
-          <option name="screenY" value="2340" />
-        </PersistentDeviceSelectionData>
-        <PersistentDeviceSelectionData>
-          <option name="api" value="34" />
-          <option name="brand" value="google" />
-          <option name="codename" value="shiba" />
-          <option name="id" value="shiba" />
-          <option name="manufacturer" value="Google" />
-          <option name="name" value="Pixel 8" />
-          <option name="screenDensity" value="420" />
-          <option name="screenX" value="1080" />
-          <option name="screenY" value="2400" />
-        </PersistentDeviceSelectionData>
-        <PersistentDeviceSelectionData>
-          <option name="api" value="33" />
-          <option name="brand" value="google" />
-          <option name="codename" value="tangorpro" />
-          <option name="id" value="tangorpro" />
-          <option name="manufacturer" value="Google" />
-          <option name="name" value="Pixel Tablet" />
-          <option name="screenDensity" value="320" />
-          <option name="screenX" value="1600" />
-          <option name="screenY" value="2560" />
-        </PersistentDeviceSelectionData>
-        <PersistentDeviceSelectionData>
-          <option name="api" value="34" />
-          <option name="brand" value="google" />
-          <option name="codename" value="tokay" />
-          <option name="id" value="tokay" />
-          <option name="manufacturer" value="Google" />
-          <option name="name" value="Pixel 9" />
-          <option name="screenDensity" value="420" />
-          <option name="screenX" value="1080" />
-          <option name="screenY" value="2424" />
-        </PersistentDeviceSelectionData>
-      </list>
-    </option>
-  </component>
-</project>

+ 31 - 2
mobile_app/new/wabi/app/build.gradle.kts

@@ -1,6 +1,11 @@
 plugins {
     alias(libs.plugins.android.application)
     alias(libs.plugins.jetbrains.kotlin.android)
+    //hilt
+    id("kotlin-kapt")
+    id("com.google.dagger.hilt.android")
+    //serialization
+    kotlin("plugin.serialization") version "1.8.20"
 }
 
 android {
@@ -24,8 +29,7 @@ android {
         release {
             isMinifyEnabled = false
             proguardFiles(
-                getDefaultProguardFile("proguard-android-optimize.txt"),
-                "proguard-rules.pro"
+                getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
             )
         }
     }
@@ -66,4 +70,29 @@ dependencies {
     androidTestImplementation(libs.androidx.ui.test.junit4)
     debugImplementation(libs.androidx.ui.tooling)
     debugImplementation(libs.androidx.ui.test.manifest)
+
+    //splashscreen
+    implementation("androidx.core:core-splashscreen:1.0.1")
+
+    //navigation
+    implementation("androidx.navigation:navigation-compose:2.8.4")
+
+    //hilt
+    implementation("com.google.dagger:hilt-android:2.51.1")
+    kapt("com.google.dagger:hilt-android-compiler:2.51.1")
+    implementation ("androidx.hilt:hilt-navigation-compose:1.2.0")
+
+
+    //supabase
+    implementation(platform("io.github.jan-tennert.supabase:bom:3.0.2"))
+    implementation("io.github.jan-tennert.supabase:postgrest-kt")
+    implementation("io.github.jan-tennert.supabase:auth-kt")
+    implementation("io.github.jan-tennert.supabase:realtime-kt")
+    implementation("io.github.jan-tennert.supabase:storage-kt")
+    implementation("io.github.jan-tennert.supabase:functions-kt")
+    //ktor
+    implementation("io.ktor:ktor-client-android:3.0.1")
+    //coil
+    implementation("io.coil-kt.coil3:coil-compose:3.0.3")
+    implementation("io.coil-kt.coil3:coil-network-okhttp:3.0.3")
 }

+ 5 - 3
mobile_app/new/wabi/app/src/main/AndroidManifest.xml

@@ -2,6 +2,8 @@
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:tools="http://schemas.android.com/tools">
 
+    <uses-permission android:name="android.permission.INTERNET" />
+
     <application
         android:allowBackup="true"
         android:dataExtractionRules="@xml/data_extraction_rules"
@@ -10,13 +12,13 @@
         android:label="@string/app_name"
         android:roundIcon="@mipmap/ic_launcher_round"
         android:supportsRtl="true"
-        android:theme="@style/Theme.Wabi"
+        android:theme="@style/Theme.WabiSplashScreen"
         tools:targetApi="31">
         <activity
-            android:name=".MainActivity"
+            android:name=".view.MainActivity"
             android:exported="true"
             android:label="@string/app_name"
-            android:theme="@style/Theme.Wabi">
+            android:theme="@style/Theme.WabiSplashScreen">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
 

+ 36 - 0
mobile_app/new/wabi/app/src/main/java/com/example/wabi/domain/navigation/Navigation.kt

@@ -0,0 +1,36 @@
+package com.example.wabi.domain.navigation
+
+import androidx.compose.runtime.Composable
+import androidx.navigation.NavHostController
+import androidx.navigation.compose.NavHost
+import androidx.navigation.compose.composable
+import com.example.wabi.view.screeens.basket.Basket
+import com.example.wabi.view.screeens.catalog.Catalog
+import com.example.wabi.view.screeens.onboard.Onboard
+import com.example.wabi.view.screeens.profile.Profile
+import com.example.wabi.view.screeens.signIn.SignIn
+import com.example.wabi.view.screeens.signUp.SignUp
+
+@Composable
+fun Navigation(navHostController: NavHostController) {
+    NavHost(navController = navHostController, startDestination = Routes.BASKET) {
+        composable(Routes.BASKET) {
+            Basket(navHostController)
+        }
+        composable(Routes.ONBOARD) {
+            Onboard(navHostController)
+        }
+        composable(Routes.CATALOG) {
+            Catalog(navHostController)
+        }
+        composable(Routes.SIGNIN) {
+            SignIn(navHostController)
+        }
+        composable(Routes.PROFILE) {
+            Profile(navHostController)
+        }
+        composable(Routes.SIGNUP) {
+            SignUp(navHostController)
+        }
+    }
+}

+ 10 - 0
mobile_app/new/wabi/app/src/main/java/com/example/wabi/domain/navigation/NavigationRoutes.kt

@@ -0,0 +1,10 @@
+package com.example.wabi.domain.navigation
+
+data object Routes {
+    const val BASKET = "basket"
+    const val ONBOARD = "onboard"
+    const val SIGNIN = "signin"
+    const val SIGNUP = "signup"
+    const val PROFILE = "profile"
+    const val CATALOG = "catalog"
+}

+ 13 - 0
mobile_app/new/wabi/app/src/main/java/com/example/wabi/models/supabase/Basket.kt

@@ -0,0 +1,13 @@
+package com.example.wabi.model.supabase
+
+import kotlinx.serialization.Serializable
+
+//Модель для корзины пользователя, которая получается из Supabase
+@Serializable
+data class Basket(
+    val id: String = "",
+    val user: String = "",
+    val product: String = "",
+    val status: Boolean = false,
+    val conut: Double = 1.0,
+)

+ 13 - 0
mobile_app/new/wabi/app/src/main/java/com/example/wabi/models/supabase/Location.kt

@@ -0,0 +1,13 @@
+package com.example.wabi.model.supabase
+
+import kotlinx.serialization.Serializable
+
+//Модель для профиля магазина, которая получается из Supabase
+@Serializable
+data class Location(
+    val id: String = "",
+    val shop: Int = -1,
+    val addres: String = "",
+    val image: String? = "",
+    val user: String = "",
+)

+ 17 - 0
mobile_app/new/wabi/app/src/main/java/com/example/wabi/models/supabase/Products.kt

@@ -0,0 +1,17 @@
+package com.example.wabi.model.supabase
+
+import kotlinx.serialization.Serializable
+
+//Модель для профиля пользователя, которая получается из Supabase
+@Serializable
+data class Products(
+    val id: String = "",
+    val title: String = "",
+    val location: String = "",
+    val user: String = "",
+    val image: String? = "",
+    val cost: Double = -1.0,
+    val discription: String? = "",
+    val unit: Int = -1,
+    val quantity: Double = 1.0,
+)

+ 12 - 0
mobile_app/new/wabi/app/src/main/java/com/example/wabi/models/supabase/Rating.kt

@@ -0,0 +1,12 @@
+package com.example.wabi.model.supabase
+
+import kotlinx.serialization.Serializable
+
+//Модель для рейтинга, который получается из Supabase
+@Serializable
+data class Rating(
+    val id: String = "",
+    val user: String = "",
+    val product: String = "",
+    val rating: Int = 0,
+)

+ 13 - 0
mobile_app/new/wabi/app/src/main/java/com/example/wabi/models/supabase/Shop.kt

@@ -0,0 +1,13 @@
+package com.example.wabi.model.supabase
+
+import kotlinx.serialization.SerialName
+import kotlinx.serialization.Serializable
+
+//Модель для торговой сети, которая получается из Supabase
+@Serializable
+data class Shop(
+    val id: Int = 0,
+    val title: String = "",
+    @SerialName("standart_image")
+    val standartImage: String? = "",
+)

+ 15 - 0
mobile_app/new/wabi/app/src/main/java/com/example/wabi/models/supabase/Unit.kt

@@ -0,0 +1,15 @@
+package com.example.wabi.model.supabase
+
+import kotlinx.serialization.SerialName
+import kotlinx.serialization.Serializable
+
+//Модель для единицы измерения, которая получается из Supabase
+@Serializable
+data class Unit(
+    val id: Int = 0,
+    val unit: String = "",
+    @SerialName("real_number")
+    val realNumber: Boolean = false,
+    @SerialName("short_name")
+    val shortName: String = "",
+)

+ 15 - 0
mobile_app/new/wabi/app/src/main/java/com/example/wabi/models/supabase/User.kt

@@ -0,0 +1,15 @@
+package com.example.wabi.model.supabase
+
+import kotlinx.serialization.SerialName
+import kotlinx.serialization.Serializable
+
+//Модель для профиля пользователя, которая получается из Supabase
+@Serializable
+data class User(
+    val id: String = "",
+    val nickname: String = "",
+    val image: String? = "",
+    @SerialName("basket_code")
+    val basketCode: String? = "",
+    val theme: Int = 0,
+)

+ 17 - 0
mobile_app/new/wabi/app/src/main/java/com/example/wabi/models/system/ColorPalette.kt

@@ -0,0 +1,17 @@
+package com.example.wabi.models.system
+
+import androidx.compose.ui.graphics.Color
+
+//шаблон для создания переменной с набором цветов для тем
+data class ColorPalette(
+    val mainColor: Color,
+    val singleColor: Color,
+    val backgroundColor: Color,
+    val accentColorOne: Color,
+    val accentColorTwo: Color,
+    val accentColorTree: Color,
+    val error: Color,
+    val translucentColor: Color,
+    val onBoardDark: Color,
+    val onBoardLight: Color,
+)

+ 17 - 0
mobile_app/new/wabi/app/src/main/java/com/example/wabi/models/system/Type.kt

@@ -0,0 +1,17 @@
+package com.example.wabi.models.system
+
+import androidx.compose.runtime.Immutable
+import androidx.compose.ui.text.TextStyle
+
+//шаблон для создания переменной с набором шрифтов
+@Immutable
+data class Type(
+    val headerFont: TextStyle,
+    val mainFont: TextStyle,
+    val acentFont: TextStyle,
+    val buttonFont: TextStyle,
+    val forTextField: TextStyle,
+    val error: TextStyle,
+    val link: TextStyle,
+    val code: TextStyle
+)

+ 0 - 11
mobile_app/new/wabi/app/src/main/java/com/example/wabi/ui/theme/Color.kt

@@ -1,11 +0,0 @@
-package com.example.wabi.ui.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
mobile_app/new/wabi/app/src/main/java/com/example/wabi/ui/theme/Theme.kt

@@ -1,58 +0,0 @@
-package com.example.wabi.ui.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 WabiTheme(
-    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
mobile_app/new/wabi/app/src/main/java/com/example/wabi/ui/theme/Type.kt

@@ -1,34 +0,0 @@
-package com.example.wabi.ui.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
-    )
-    */
-)

+ 6 - 4
mobile_app/new/wabi/app/src/main/java/com/example/wabi/MainActivity.kt → mobile_app/new/wabi/app/src/main/java/com/example/wabi/view/MainActivity.kt

@@ -1,4 +1,4 @@
-package com.example.wabi
+package com.example.wabi.view
 
 import android.os.Bundle
 import androidx.activity.ComponentActivity
@@ -8,16 +8,18 @@ import androidx.compose.foundation.layout.Box
 import androidx.compose.foundation.layout.fillMaxSize
 import androidx.compose.foundation.layout.padding
 import androidx.compose.material3.Scaffold
-import androidx.compose.material3.Text
-import androidx.compose.runtime.Composable
 import androidx.compose.ui.Modifier
-import androidx.compose.ui.tooling.preview.Preview
+import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
 import com.example.wabi.ui.theme.WabiTheme
+import dagger.hilt.android.AndroidEntryPoint
 
+@AndroidEntryPoint
 class MainActivity : ComponentActivity() {
     override fun onCreate(savedInstanceState: Bundle?) {
         super.onCreate(savedInstanceState)
+        installSplashScreen()
         enableEdgeToEdge()
+
         setContent {
             WabiTheme {
                 Scaffold(modifier = Modifier.fillMaxSize()) { innerPadding ->

+ 8 - 0
mobile_app/new/wabi/app/src/main/java/com/example/wabi/view/StartApp.kt

@@ -0,0 +1,8 @@
+package com.example.wabi.view
+
+import android.app.Application
+import dagger.hilt.android.HiltAndroidApp
+
+
+@HiltAndroidApp
+class WabiApp : Application()

+ 9 - 0
mobile_app/new/wabi/app/src/main/java/com/example/wabi/view/screeens/basket/Basket.kt

@@ -0,0 +1,9 @@
+package com.example.wabi.view.screeens.basket
+
+import androidx.compose.runtime.Composable
+import androidx.navigation.NavHostController
+
+@Composable
+fun Basket(navHostController: NavHostController) {
+
+}

+ 10 - 0
mobile_app/new/wabi/app/src/main/java/com/example/wabi/view/screeens/catalog/Catalog.kt

@@ -0,0 +1,10 @@
+package com.example.wabi.view.screeens.catalog
+
+import androidx.compose.runtime.Composable
+import androidx.compose.ui.Modifier
+import androidx.navigation.NavHostController
+
+@Composable
+fun Catalog(navHostController: NavHostController) {
+
+}

+ 10 - 0
mobile_app/new/wabi/app/src/main/java/com/example/wabi/view/screeens/onboard/Onboard.kt

@@ -0,0 +1,10 @@
+package com.example.wabi.view.screeens.onboard
+
+import androidx.compose.runtime.Composable
+import androidx.compose.ui.Modifier
+import androidx.navigation.NavHostController
+
+@Composable
+fun Onboard(navHostController: NavHostController) {
+
+}

+ 10 - 0
mobile_app/new/wabi/app/src/main/java/com/example/wabi/view/screeens/profile/Profile.kt

@@ -0,0 +1,10 @@
+package com.example.wabi.view.screeens.profile
+
+import androidx.compose.runtime.Composable
+import androidx.compose.ui.Modifier
+import androidx.navigation.NavHostController
+
+@Composable
+fun Profile(navHostController: NavHostController) {
+
+}

+ 10 - 0
mobile_app/new/wabi/app/src/main/java/com/example/wabi/view/screeens/signIn/SignIn.kt

@@ -0,0 +1,10 @@
+package com.example.wabi.view.screeens.signIn
+
+import androidx.compose.runtime.Composable
+import androidx.compose.ui.Modifier
+import androidx.navigation.NavHostController
+
+@Composable
+fun SignIn(navHostController: NavHostController) {
+
+}

+ 10 - 0
mobile_app/new/wabi/app/src/main/java/com/example/wabi/view/screeens/signUp/SignUp.kt

@@ -0,0 +1,10 @@
+package com.example.wabi.view.screeens.signUp
+
+import androidx.compose.runtime.Composable
+import androidx.compose.ui.Modifier
+import androidx.navigation.NavHostController
+
+@Composable
+fun SignUp(navHostController: NavHostController) {
+
+}

+ 42 - 0
mobile_app/new/wabi/app/src/main/java/com/example/wabi/view/ui/theme/Color.kt

@@ -0,0 +1,42 @@
+package com.example.wabi.view.ui.theme
+
+import androidx.compose.runtime.staticCompositionLocalOf
+import androidx.compose.ui.graphics.Color
+import com.example.wabi.models.system.ColorPalette
+
+val BlackBlueGray = Color(0xFF4A5C6A)
+val BrightBlue = Color(0xFF83FFE0)
+val BlackSea = Color(0xFF11212D)
+val CreamRed = Color(0xFFFF725F)
+val CreamYellow = Color(0xFFFFF387)
+val BlackSea70 = Color(0x7011212D)
+val White70 = Color(0x70FFFFFF)
+
+val DarkColorScheme = ColorPalette(
+    mainColor = Color.White,
+    singleColor = BlackBlueGray,
+    backgroundColor = BlackSea,
+    accentColorOne = BrightBlue,
+    accentColorTwo = CreamRed,
+    accentColorTree = CreamYellow,
+    error = CreamRed,
+    translucentColor = White70,
+    onBoardDark = BlackSea,
+    onBoardLight = Color.White
+)
+
+val LightColorScheme = ColorPalette(
+    mainColor = BlackSea,
+    singleColor = BlackBlueGray,
+    backgroundColor = Color.White,
+    accentColorOne = BrightBlue,
+    accentColorTwo = CreamRed,
+    accentColorTree = CreamYellow,
+    error = CreamRed,
+    translucentColor = BlackSea70,
+    onBoardDark = BlackSea,
+    onBoardLight = Color.White
+)
+
+//провайдер для обращения к темам и их изменению
+val LocalColors = staticCompositionLocalOf<ColorPalette> { error("Colors composition error") }

+ 57 - 0
mobile_app/new/wabi/app/src/main/java/com/example/wabi/view/ui/theme/Theme.kt

@@ -0,0 +1,57 @@
+package com.example.wabi.ui.theme
+
+import android.util.Log
+import androidx.compose.foundation.isSystemInDarkTheme
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.CompositionLocalProvider
+import androidx.compose.runtime.LaunchedEffect
+import androidx.compose.runtime.ReadOnlyComposable
+import com.example.wabi.models.system.ColorPalette
+import com.example.wabi.models.system.Type
+import com.example.wabi.view.ui.theme.DarkColorScheme
+import com.example.wabi.view.ui.theme.LightColorScheme
+import com.example.wabi.view.ui.theme.LocalColors
+
+//объект для обновления состояния провайдера
+object WabiTheme {
+    val fonts: Type
+        @ReadOnlyComposable @Composable get() = LocalFonts.current
+
+    val colors: ColorPalette
+        @ReadOnlyComposable @Composable get() = LocalColors.current
+}
+
+///Функция для вызова темы
+@Composable
+fun WabiTheme(
+    themeState: Int = ThemeMode.System,
+    fonts: Type = WabiTheme.fonts,
+    content: @Composable () -> Unit
+) {
+
+    Log.d("ChangeTheme -> ", "Theme state $themeState")
+
+    val colors = when (themeState) {
+        ThemeMode.Light -> LightColorScheme
+        ThemeMode.Dark -> DarkColorScheme
+        else -> if (isSystemInDarkTheme()) {
+            DarkColorScheme
+        } else {
+            LightColorScheme
+        }
+    }
+
+    LaunchedEffect(key1 = colors) {
+        Log.d("ChangeTheme -> ", "Colors changed")
+    }
+
+    CompositionLocalProvider(
+        LocalColors provides colors, LocalFonts provides fonts, content = content
+    )
+}
+
+data object ThemeMode {
+    const val System = 0
+    const val Light = 1
+    const val Dark = 2
+}

+ 92 - 0
mobile_app/new/wabi/app/src/main/java/com/example/wabi/view/ui/theme/Type.kt

@@ -0,0 +1,92 @@
+package com.example.wabi.ui.theme
+
+import androidx.compose.runtime.staticCompositionLocalOf
+import androidx.compose.ui.text.TextStyle
+import androidx.compose.ui.text.font.Font
+import androidx.compose.ui.text.font.FontFamily
+import androidx.compose.ui.text.font.FontWeight
+import androidx.compose.ui.text.style.TextAlign
+import androidx.compose.ui.text.style.TextDecoration
+import androidx.compose.ui.unit.sp
+import com.example.wabi.R
+import com.example.wabi.models.system.Type
+import com.example.wabi.view.ui.theme.CreamRed
+
+val Confortaa = FontFamily(
+    Font(R.font.comfortaa, FontWeight.Normal)
+)
+
+val BalooDa2 = FontFamily(
+    Font(R.font.balooda2_bold, FontWeight.Bold),
+    Font(R.font.balooda2_extrabold, FontWeight.ExtraBold),
+    Font(R.font.balooda2_medium, FontWeight.Medium),
+    Font(R.font.balooda2_regular, FontWeight.Normal),
+    Font(R.font.balooda2_semibold, FontWeight.SemiBold),
+    Font(R.font.balooda2_variablefont_wght, FontWeight.Light)
+)
+
+val EduQLDBeginner = FontFamily(
+    Font(R.font.eduqldbeginner_bold, FontWeight.Bold),
+    Font(R.font.eduqldbeginner_medium, FontWeight.Medium),
+    Font(R.font.eduqldbeginner_regular, FontWeight.Normal),
+    Font(R.font.eduqldbeginner_semibold, FontWeight.SemiBold),
+    Font(R.font.eduqldbeginner_variablefont_wght, FontWeight.Light)
+)
+
+//общая переменная для обращения к шрифтам, используемым в приложении
+val type = Type(
+    headerFont = TextStyle(
+        fontFamily = BalooDa2,
+        fontWeight = FontWeight.Bold,
+        fontSize = 35.sp,
+        textAlign = TextAlign.Center,
+        lineHeight = 35.sp,
+    ),
+    mainFont = TextStyle(
+        fontFamily = Confortaa,
+        fontWeight = FontWeight.Normal,
+        fontSize = 20.sp,
+        textAlign = TextAlign.Center,
+        lineHeight = 20.sp
+    ),
+    acentFont = TextStyle(
+        fontFamily = EduQLDBeginner,
+        fontWeight = FontWeight.Normal,
+        fontSize = 20.sp,
+        lineHeight = 20.sp
+    ),
+    buttonFont = TextStyle(
+        fontFamily = BalooDa2,
+        fontWeight = FontWeight.Bold,
+        fontSize = 25.sp,
+        textAlign = TextAlign.Center
+    ),
+    error = TextStyle(
+        fontFamily = Confortaa,
+        fontWeight = FontWeight.Normal,
+        fontSize = 20.sp,
+        color = CreamRed
+    ),
+    link = TextStyle(
+        fontFamily = EduQLDBeginner,
+        fontWeight = FontWeight.Normal,
+        fontSize = 20.sp,
+        textDecoration = TextDecoration.Underline,
+        lineHeight = 20.sp
+    ),
+    forTextField = TextStyle(
+        fontFamily = BalooDa2,
+        fontWeight = FontWeight.Bold,
+        fontSize = 20.sp,
+        lineHeight = 20.sp,
+    ),
+    code = TextStyle(
+        fontFamily = BalooDa2,
+        fontWeight = FontWeight.Bold,
+        fontSize = 20.sp,
+        textAlign = TextAlign.Center
+    )
+)
+
+//провайдер для обращения к шрифтам и их изменению
+val LocalFonts = staticCompositionLocalOf { type }

+ 1 - 0
mobile_app/new/wabi/app/src/main/res/values/colors.xml

@@ -7,4 +7,5 @@
     <color name="teal_700">#FF018786</color>
     <color name="black">#FF000000</color>
     <color name="white">#FFFFFFFF</color>
+    <color name="black_sea_blue">#FF11212D</color>
 </resources>

+ 5 - 1
mobile_app/new/wabi/app/src/main/res/values/themes.xml

@@ -1,5 +1,9 @@
 <?xml version="1.0" encoding="utf-8"?>
 <resources>
-
+    <style name="Theme.WabiSplashScreen" parent="Theme.SplashScreen">
+        <item name="windowSplashScreenBackground">@color/black_sea_blue</item>
+        <item name="windowSplashScreenAnimatedIcon">@drawable/ic_launcher_foreground</item>
+        <item name="postSplashScreenTheme">@style/Theme.Wabi</item>
+    </style>
     <style name="Theme.Wabi" parent="android:Theme.Material.Light.NoActionBar" />
 </resources>

+ 2 - 0
mobile_app/new/wabi/build.gradle.kts

@@ -2,4 +2,6 @@
 plugins {
     alias(libs.plugins.android.application) apply false
     alias(libs.plugins.jetbrains.kotlin.android) apply false
+    //hilt
+    id("com.google.dagger.hilt.android") version "2.51.1" apply false
 }

+ 1 - 1
mobile_app/wabi/.idea/misc.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
   <component name="ExternalStorageConfigurationManager" enabled="true" />
-  <component name="ProjectRootManager" version="2" languageLevel="JDK_17" project-jdk-name="jbr-17" project-jdk-type="JavaSDK">
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="jbr-17" project-jdk-type="JavaSDK">
     <output url="file://$PROJECT_DIR$/build/classes" />
   </component>
   <component name="ProjectType">