Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
263 commits
Select commit Hold shift + click to select a range
d183880
- check if input is empty
Jiyu13 Jul 24, 2025
51f611b
- filter lists by input
Jiyu13 Jul 24, 2025
6c5ee1e
- comment out reseting search text
Jiyu13 Jul 24, 2025
f631965
- create dialog
Jiyu13 Jul 24, 2025
f5a09b3
- pass in onAddButtonClick to handle showing dialog
Jiyu13 Jul 24, 2025
78d51d5
- show FormDialog when isDialogShown is true
Jiyu13 Jul 24, 2025
b11e00e
- create add list screen composable
Jiyu13 Jul 25, 2025
cf6430a
- add let text param
Jiyu13 Jul 25, 2025
ebaf7cd
- add route for ListifyNewListScreen
Jiyu13 Jul 25, 2025
cad53ac
- create input field for adding new list
Jiyu13 Jul 25, 2025
8710f2e
- rename function
Jiyu13 Jul 25, 2025
0527bd1
- add NewListScreen
Jiyu13 Jul 25, 2025
d0c9b94
- remove isDialogShown state + if statement
Jiyu13 Jul 25, 2025
192e5f4
- add BaseList + listName models
Jiyu13 Jul 30, 2025
6658056
- add onRightButtonClick()
Jiyu13 Jul 30, 2025
aa168e2
- add post request insertList() api
Jiyu13 Jul 30, 2025
35a307c
- commit out broken import
Jiyu13 Jul 30, 2025
dadbbe8
- create insertListByUser api call
Jiyu13 Jul 30, 2025
7c2420f
- implement list creation with state management
Jiyu13 Jul 31, 2025
1b94579
- add LaunchedEffect to observe navigation events
Jiyu13 Jul 31, 2025
632b002
Fix merge conflicts
Jiyu13 Jul 31, 2025
8e8d703
Fix merge conflicts
Jiyu13 Jul 31, 2025
0c14a4f
delete file
Jiyu13 Jul 31, 2025
0623055
delete file
Jiyu13 Jul 31, 2025
db1bd9f
- add sign in button
Jiyu13 Jul 31, 2025
396e824
- move button columns to a separate file
Jiyu13 Jul 31, 2025
d58d485
- uncomment ListifyLoginScreen
Jiyu13 Jul 31, 2025
30d5ab2
- rename file
Jiyu13 Jul 31, 2025
948cce8
- add material icons implementation
Jiyu13 Jul 31, 2025
03cd240
- add material icons implementation
Jiyu13 Jul 31, 2025
bceff1f
- create viewModel to manage email input + validation
Jiyu13 Jul 31, 2025
96bbfef
- display a email field with validation feedback
Jiyu13 Jul 31, 2025
fd82ce8
- change padding
Jiyu13 Aug 1, 2025
f1ccc43
- create password input field with toggle to show/hide password
Jiyu13 Aug 1, 2025
d2a0c16
- create login screen
Jiyu13 Aug 1, 2025
a598c68
- create reusable filled button
Jiyu13 Aug 1, 2025
b597ceb
- implement reusable filled button
Jiyu13 Aug 1, 2025
7d80569
- implement reusable filled button
Jiyu13 Aug 1, 2025
2918c71
- add Keyboard Configuration
Jiyu13 Aug 1, 2025
630c73c
- clean code
Jiyu13 Aug 1, 2025
ef3ec29
- add top padding
Jiyu13 Aug 1, 2025
198260f
- add top bar container color to SplashYellow
Jiyu13 Aug 1, 2025
84f1679
- import ListifyScreens
Jiyu13 Aug 1, 2025
6c8bd92
- add new list navigation
Jiyu13 Aug 6, 2025
ee31a3b
- add UserWithoutPassword model
Jiyu13 Aug 6, 2025
45176f5
- add models for login
Jiyu13 Aug 6, 2025
55c8571
- add login post request
Jiyu13 Aug 6, 2025
79e56a2
- refactor routes
Jiyu13 Aug 6, 2025
3c7d439
- refactor navigation graph + destinations
Jiyu13 Aug 6, 2025
520803b
- define a sealed class
Jiyu13 Aug 6, 2025
842f912
- define repository to make login request to api
Jiyu13 Aug 6, 2025
e6cd44b
- define login view model
Jiyu13 Aug 6, 2025
b1767be
- create global object to store current user
Jiyu13 Aug 6, 2025
68ec632
- set global object currentUser after fetching user successfully
Jiyu13 Aug 6, 2025
6060827
- install serializable plugin
Jiyu13 Aug 6, 2025
c37390b
- fix navigate route
Jiyu13 Aug 6, 2025
9d667d1
- refactor email + password validation and update
Jiyu13 Aug 6, 2025
ca0dfaa
- fix route for onRightButtonClick
Jiyu13 Aug 6, 2025
630b0d6
- install dataStore
Jiyu13 Aug 12, 2025
45a8fe8
create dataStorage
Jiyu13 Aug 12, 2025
b2dedb7
okHttp Interceptor + Authenticator
Jiyu13 Aug 12, 2025
f8f803c
add refresh token api
Jiyu13 Aug 12, 2025
2ab1c5a
define data models for auth flow
Jiyu13 Aug 13, 2025
6c1f890
Login repository
Jiyu13 Aug 13, 2025
d6c72f0
add LoginViewModel + token persistence
Jiyu13 Aug 13, 2025
8ed66d9
- remove .value when accessing mutable state
Jiyu13 Aug 13, 2025
8f005bc
- inject storageManager
Jiyu13 Aug 13, 2025
2dec3c6
- LaunchedEffect(Unit) to fetch user lists.
Jiyu13 Aug 13, 2025
3c63380
delete file
Jiyu13 Aug 13, 2025
0435166
- isLoggedIn() reads current isLogin
Jiyu13 Aug 13, 2025
6bdeac4
- check isLoggedIn state + call checkAccessToken() to ensure access t…
Jiyu13 Aug 13, 2025
e65929e
rename file + function
Jiyu13 Aug 13, 2025
a80699f
- rename api
Jiyu13 Aug 14, 2025
3d7064d
- define type-safe route with @Serializable
Jiyu13 Aug 14, 2025
a69a977
- extract args with backStateEntry
Jiyu13 Aug 14, 2025
126caae
- add on click callback for each list row
Jiyu13 Aug 14, 2025
45c1fa1
- create list item model data class
Jiyu13 Aug 14, 2025
ae9f464
- create repository
Jiyu13 Aug 14, 2025
1d5cd9e
- create view model
Jiyu13 Aug 14, 2025
69a0088
add on click callback
Jiyu13 Aug 14, 2025
61d350e
create util function to filter items by input
Jiyu13 Aug 14, 2025
c230048
commit
Jiyu13 Aug 14, 2025
1b9a708
Create screen
Jiyu13 Aug 14, 2025
e39528c
Create screen
Jiyu13 Aug 14, 2025
4edfedb
item row
Jiyu13 Aug 14, 2025
40c5f85
create view model
Jiyu13 Aug 14, 2025
279a6c3
show ListItemActionSheet if activeItemId is not null
Jiyu13 Aug 14, 2025
d5f31f2
- add haptic feedback (vibration)
Jiyu13 Aug 14, 2025
9742cd2
create ModalBottomSheet
Jiyu13 Aug 14, 2025
8cf7644
update item checked state
Jiyu13 Aug 15, 2025
fecace4
create callback to update checked state
Jiyu13 Aug 15, 2025
512b3e4
add data model, api, repository, view model for updating list item info
Jiyu13 Aug 15, 2025
e39fdcd
create form for editing list description + units
Jiyu13 Aug 15, 2025
6619df6
Implement updating item description + units
Jiyu13 Aug 15, 2025
95f5072
- refactor rows
Jiyu13 Aug 15, 2025
3a462f6
close edit form when row is clicked
Jiyu13 Aug 15, 2025
8e5ecd8
remove code related to ModalBottomSheet
Jiyu13 Aug 15, 2025
f60f850
create custom outlined button
Jiyu13 Aug 15, 2025
e34a866
implement custom outlined button
Jiyu13 Aug 15, 2025
dffaa0d
change broder color to red
Jiyu13 Aug 15, 2025
c8b66ad
handle deleting list item by calling the delete api
Jiyu13 Aug 16, 2025
667a263
create userId
Jiyu13 Aug 16, 2025
5648932
- get userid from viewModel
Jiyu13 Aug 16, 2025
3b03ebe
- call onGoBackButtonClicked
Jiyu13 Aug 16, 2025
d1eef44
commit
Jiyu13 Aug 16, 2025
471d405
restructure navigation
Jiyu13 Aug 16, 2025
024acb0
add resource string
Jiyu13 Aug 16, 2025
1b82cd5
call no_items resource string
Jiyu13 Aug 16, 2025
7c6c468
apply Material typography styles for all Text() at top bar
Jiyu13 Aug 16, 2025
8cdf137
apply Material typography styles to search bar text
Jiyu13 Aug 16, 2025
1646850
create component for showing text with custom style
Jiyu13 Aug 18, 2025
63185c4
- apply custom style for text
Jiyu13 Aug 18, 2025
a306101
- apply EmptyList compenent
Jiyu13 Aug 18, 2025
67979f7
commit
Jiyu13 Aug 18, 2025
71cc156
apply custom text style
Jiyu13 Aug 18, 2025
6fe57b4
remove unused code
Jiyu13 Aug 18, 2025
2675d62
create custom input label/placeholder text component
Jiyu13 Aug 18, 2025
aa9a243
commit
Jiyu13 Aug 18, 2025
ac2d7ae
apply custom text style
Jiyu13 Aug 18, 2025
31ff95e
add custom text styles
Jiyu13 Aug 18, 2025
f92b758
rename file
Jiyu13 Aug 18, 2025
db05937
organize files
Jiyu13 Aug 19, 2025
d1ff55a
add placeHolder as param
Jiyu13 Aug 19, 2025
19eb1c2
- add AddNewItemScreen
Jiyu13 Aug 19, 2025
3df7ee7
- organize code
Jiyu13 Aug 19, 2025
1ff4fff
- add onAddClick callback to navigate to AddNewItemScreen
Jiyu13 Aug 19, 2025
f7a1731
rename model
Jiyu13 Aug 19, 2025
186eba9
- replace text type to be just String type
Jiyu13 Aug 19, 2025
1579829
define AddNewItemScreen with listId as argument
Jiyu13 Aug 19, 2025
7d070a8
- defines a POST request using Retrofit to add a new item to a specif…
Jiyu13 Aug 19, 2025
3b732da
- add onAddClick call back
Jiyu13 Aug 19, 2025
593b677
- set up AddNewItemScreen navigation
Jiyu13 Aug 19, 2025
3f4dc66
- add insertListItem API call for creating list items
Jiyu13 Aug 19, 2025
754799e
- add ViewModel logic for creating list items with state handling
Jiyu13 Aug 19, 2025
42febde
feat: add new item creation screen
Jiyu13 Aug 19, 2025
48cbc2f
add checking if error exists + show error supporting text
Jiyu13 Aug 19, 2025
8a0afcd
- check if description field is empty
Jiyu13 Aug 19, 2025
708eb4f
- change icon content description
Jiyu13 Aug 19, 2025
b5ad072
- create functionalities to edit list name / delete list
Jiyu13 Aug 20, 2025
dad3e4c
- check if new list name is empty
Jiyu13 Aug 20, 2025
e4a949f
- replace outline button with CustomOutlinedButton
Jiyu13 Aug 20, 2025
a0380fd
- add text style
Jiyu13 Aug 20, 2025
3168355
- create ButtonStyle file
Jiyu13 Aug 20, 2025
f40bc63
- change button shape
Jiyu13 Aug 20, 2025
717e2e5
- set isError to false when close the form
Jiyu13 Aug 20, 2025
fe4bbc5
- create add new list item floating button
Jiyu13 Aug 20, 2025
648489e
- add share icon
Jiyu13 Aug 20, 2025
9c0268f
- change icon color
Jiyu13 Aug 20, 2025
9f537d0
- add sharedCode as arg
Jiyu13 Aug 21, 2025
cd430b3
- create copy to clipboard composable
Jiyu13 Aug 21, 2025
5fc945c
- edit ListItemActionSheet to show the shared code + a copy button
Jiyu13 Aug 21, 2025
41c8313
- edit ListItemActionSheet to show the shared code + a copy button
Jiyu13 Aug 21, 2025
31817e9
add color
Jiyu13 Aug 21, 2025
d636222
add note
Jiyu13 Aug 22, 2025
af958ef
remove Column
Jiyu13 Aug 22, 2025
77ebf78
- create dropdown menu to with 2 options
Jiyu13 Aug 22, 2025
da92572
- undo showing dropdown
Jiyu13 Aug 22, 2025
a812261
- set iconDescription to be optional with default value
Jiyu13 Aug 22, 2025
f8d5a66
- remove sharedCode
Jiyu13 Aug 23, 2025
33402a0
commit
Jiyu13 Aug 23, 2025
82df334
- create share list functionalities
Jiyu13 Aug 23, 2025
d37618b
- add padding
Jiyu13 Aug 23, 2025
b6a2777
- create share list form
Jiyu13 Aug 23, 2025
9e43d35
file removed
Jiyu13 Aug 23, 2025
5323aaf
render ShareToForm
Jiyu13 Aug 23, 2025
24d48cc
show share successfully toast
Jiyu13 Aug 24, 2025
d1594f5
pull to refresh composable
Jiyu13 Aug 25, 2025
7acd035
fix http 401 error when pop back to listsScreen with expired token
Jiyu13 Aug 26, 2025
10836cb
add note
Jiyu13 Aug 26, 2025
0c06163
add custom color
Jiyu13 Aug 26, 2025
cdf29f9
Parse error message from backend API
Jiyu13 Aug 26, 2025
51e9deb
show indicator if login state is loading
Jiyu13 Aug 26, 2025
8cc5393
remove modifier + add text style
Jiyu13 Aug 26, 2025
5aeaa2e
change color
Jiyu13 Aug 26, 2025
6fb9768
remove space
Jiyu13 Aug 26, 2025
382fb3d
- remove default error supporting txt
Jiyu13 Aug 26, 2025
2b53595
- add isError param
Jiyu13 Aug 26, 2025
0add3e9
- define navigation tabs with 3 fields per tab
Jiyu13 Aug 28, 2025
b775a9b
- set up bottomBar
Jiyu13 Aug 28, 2025
4b1488a
- add font type
Jiyu13 Aug 29, 2025
b9d053d
- add selectedIcon field
Jiyu13 Aug 29, 2025
756a820
- adding nav bar styling
Jiyu13 Aug 29, 2025
68a81c2
set Lists Tab as selected on first load
Jiyu13 Aug 29, 2025
b501c14
set Lists Tab as selected on first load
Jiyu13 Aug 29, 2025
656322e
commit
Jiyu13 Aug 29, 2025
1bd4ffe
- comment out flash animation
Jiyu13 Aug 29, 2025
09edca8
- add username field
Jiyu13 Aug 30, 2025
cb02817
- add note
Jiyu13 Aug 31, 2025
4bc87f8
- create screen to show + edit account
Jiyu13 Aug 31, 2025
becb0a1
- create Username model
Jiyu13 Aug 31, 2025
fc0bd12
- create reset password screen
Jiyu13 Aug 31, 2025
98a604d
- organize code
Jiyu13 Aug 31, 2025
39b8d80
Update username
Jiyu13 Aug 31, 2025
0d6ced0
update password visibility logic
Jiyu13 Aug 31, 2025
c52b284
- create username update states in viewmodel
Jiyu13 Sep 2, 2025
a49967b
custom globally used divider
Jiyu13 Sep 3, 2025
9e8271c
reset password
Jiyu13 Sep 3, 2025
281fa4b
change top bar text button text type
Jiyu13 Sep 3, 2025
267a619
create dialog
Jiyu13 Sep 3, 2025
572aea4
add strings for logout + delete account
Jiyu13 Sep 3, 2025
94fa73f
add functionalities to logout + delete account
Jiyu13 Sep 3, 2025
2433c38
close dialog when confirm logout
Jiyu13 Sep 3, 2025
6abcf81
skip splash animation by making SplashScreen accept a flag
Jiyu13 Sep 3, 2025
0142dc0
set isConfirmError to be false onValueChange
Jiyu13 Sep 3, 2025
ae59531
setup signup screen
Jiyu13 Sep 4, 2025
60a2ff5
add title
Jiyu13 Sep 4, 2025
06606ce
clear input fields after logging in / signing up
Jiyu13 Sep 4, 2025
bb575f4
delete user
Jiyu13 Sep 4, 2025
93b61ef
return LoginState api delete user
Jiyu13 Sep 9, 2025
47b11dc
set fromLogout to return when pop back to splash screen
Jiyu13 Sep 9, 2025
6d565ae
- remove left button text
Jiyu13 Sep 9, 2025
8a5e6fa
- remove top bar right save button
Jiyu13 Sep 9, 2025
a2b5d2b
- remove top bar right save button
Jiyu13 Sep 9, 2025
5a4194f
- remove top bar right save button
Jiyu13 Sep 9, 2025
7c4591a
- add search bar unfocused container color
Jiyu13 Sep 10, 2025
308bd8e
- change button content color
Jiyu13 Sep 10, 2025
1d0156b
- add padding
Jiyu13 Sep 10, 2025
2a47002
- comment out horizontal divider
Jiyu13 Sep 12, 2025
5893e8a
install compose material
Jiyu13 Sep 12, 2025
0f60381
swipe to left to reveal delete button
Jiyu13 Sep 12, 2025
e2ca0a0
install androidx-foundation
Jiyu13 Sep 12, 2025
65bbad9
set only on swipeToReveal open
Jiyu13 Sep 12, 2025
30c447d
Replace SwipeableState<Int> + float anchors with AnchoredDraggableSta…
Jiyu13 Sep 14, 2025
70ab7d1
Add new colours
Jiyu13 Sep 15, 2025
95f5640
remove itemContent composable param
Jiyu13 Sep 15, 2025
77ee1ad
update shareListById
Jiyu13 Sep 16, 2025
fdeefc3
update shareListById
Jiyu13 Sep 16, 2025
9e121c1
update SwipeToReveal
Jiyu13 Sep 16, 2025
fee911c
update SwipeToReveal
Jiyu13 Sep 16, 2025
43e0ff0
- move all click handlers to upper composable (ListRow)
Jiyu13 Sep 16, 2025
afe7da6
convert form into a dialog
Jiyu13 Sep 16, 2025
2d160a5
- add share form related functionalities
Jiyu13 Sep 16, 2025
58248c2
remove share form
Jiyu13 Sep 16, 2025
542ab3d
add userId field
Jiyu13 Sep 16, 2025
f14d875
remove shareIcon from ListifyListItemScreen
Jiyu13 Sep 16, 2025
70546cb
make share option optional,
Jiyu13 Sep 16, 2025
fc69d67
- track item id if edit button is clicked
Jiyu13 Sep 16, 2025
134ca78
convert edit item form into a dialog
Jiyu13 Sep 16, 2025
f0b486c
add edit item form to list
Jiyu13 Sep 16, 2025
00f1d04
call SwipeToReveal
Jiyu13 Sep 16, 2025
1f0b4c6
edit lazy column padding
Jiyu13 Sep 25, 2025
49d74c0
edit font sizes
Jiyu13 Sep 25, 2025
7d07eba
add labelGrey colour
Jiyu13 Sep 25, 2025
d020ea3
add font colour for place holder content
Jiyu13 Sep 25, 2025
1f4ef7c
change text colour
Jiyu13 Sep 25, 2025
1c6fc5c
change navigation bar height
Jiyu13 Sep 25, 2025
0e6f0ee
disable enableEdgeToEdge
Jiyu13 Sep 25, 2025
0ed8c56
change search bar padding
Jiyu13 Sep 25, 2025
ce74391
- change android api level
Jiyu13 Oct 3, 2025
78f10c8
system update file
Jiyu13 Oct 3, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@
.externalNativeBuild
.cxx
local.properties
/app/src/main/java/com/example/listifyjetapp/utils/constants/Constants.kt
2 changes: 1 addition & 1 deletion .idea/deploymentTargetSelector.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

61 changes: 61 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 31 additions & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ plugins {

alias(libs.plugins.hilt)
alias(libs.plugins.ksp)

// Kotlin serialization plugin for type safe routes and navigation arguments
kotlin("plugin.serialization") version "2.0.21"
}

android {
Expand All @@ -13,7 +16,7 @@ android {

defaultConfig {
applicationId = "com.example.listifyjetapp"
minSdk = 31
minSdk = 26
targetSdk = 35
versionCode = 1
versionName = "1.0"
Expand All @@ -28,6 +31,7 @@ android {
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
signingConfig = signingConfigs.getByName("debug")
}
}
compileOptions {
Expand Down Expand Up @@ -57,6 +61,7 @@ dependencies {
implementation(libs.androidx.ui.graphics)
implementation(libs.androidx.ui.tooling.preview)
implementation(libs.androidx.material3)
implementation(libs.androidx.compose.material)
testImplementation(libs.junit)
androidTestImplementation(libs.androidx.junit)
androidTestImplementation(libs.androidx.espresso.core)
Expand Down Expand Up @@ -105,4 +110,29 @@ dependencies {
// google font
implementation(libs.androidx.ui.text.google.fonts)

// material icons
implementation (libs.androidx.material.icons.extended)

// ================= Kotlin serialization =======================
// Jetpack Compose integration
implementation(libs.androidx.navigation.compose)

// Views/Fragments integration
implementation(libs.androidx.navigation.fragment)
implementation(libs.androidx.navigation.ui)

// Feature module support for Fragments
implementation(libs.androidx.navigation.dynamic.features.fragment)

// Testing Navigation
androidTestImplementation(libs.androidx.navigation.testing)

// JSON serialization library, works with the Kotlin serialization plugin
implementation(libs.kotlinx.serialization.json)

// Typed DataStore (Typed API surface, such as Proto)
implementation(libs.androidx.datastore.preferences)

implementation(libs.androidx.foundation) // androidx.compose.foundation:foundation

}
7 changes: 1 addition & 6 deletions app/src/main/java/com/example/listifyjetapp/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,9 @@ package com.example.listifyjetapp
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.Scaffold
import androidx.compose.material3.Surface
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
Expand All @@ -23,7 +18,7 @@ import dagger.hilt.android.AndroidEntryPoint
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
enableEdgeToEdge()
//enableEdgeToEdge()
setContent {
ListifyApp()
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
package com.example.listifyjetapp.components.authButtons

import androidx.compose.foundation.BorderStroke
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.filled.ExitToApp
import androidx.compose.material.icons.filled.MailOutline
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.dp
import com.example.listifyjetapp.ui.theme.ButtonPaddings
import com.example.listifyjetapp.ui.theme.ButtonShape
import com.example.listifyjetapp.ui.theme.ListifyColor
import com.example.listifyjetapp.widgets.buttons.CustomOutlinedButton
import com.example.listifyjetapp.widgets.buttons.FilledButton

@Composable
fun AuthButtons(
onSignupClick: () -> Unit,
onGoToLoginScreen: () -> Unit
) {
Column(
modifier = Modifier
.fillMaxSize()
.padding(16.dp),
verticalArrangement = Arrangement.Bottom,
horizontalAlignment = Alignment.CenterHorizontally
) {
CustomOutlinedButton(
modifier = ButtonPaddings.fillMaxWidth(),
shape = ButtonShape,
border = BorderStroke(2.dp, color = Color.White),
text = "SIGN UP WITH EMAIL",
textColor = ListifyColor.TextDark,
buttonIcon = Icons.Default.MailOutline,
iconDescription = "Sign In Email",
onClick = { onSignupClick() }
)

FilledButton(
modifier = ButtonPaddings.fillMaxWidth(),
shape = ButtonShape,
containerColor = Color.White,
contentColor = ListifyColor.TextDark,
text = "LOG IN",
buttonIcon = Icons.AutoMirrored.Filled.ExitToApp,
iconDescription = "Log In",
onClick = { onGoToLoginScreen() }
)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.example.listifyjetapp.components.copyToClip

import android.annotation.SuppressLint
import android.content.ClipData
import android.content.ClipboardManager
import android.content.Context
import android.content.Context.CLIPBOARD_SERVICE

@SuppressLint("ServiceCast")
fun copyToClipboard(context: Context, text: String) {
val clipboardManager =
context.getSystemService(CLIPBOARD_SERVICE) as ClipboardManager
val clip = ClipData.newPlainText("code", text)
clipboardManager.setPrimaryClip(clip)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
package com.example.listifyjetapp.components.dropdownMenu

import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.DropdownMenu
import androidx.compose.material3.DropdownMenuItem
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp

@Composable
fun AddNewListDropdown(
isDropdownExpanded: Boolean,
onAddNewList: () -> Unit = {},
onJoinSharedList: () -> Unit = {},
onDropdownDismiss: () -> Unit
) {
Box(
modifier = Modifier.padding(16.dp)
) {
DropdownMenu(
expanded = isDropdownExpanded,
onDismissRequest = { onDropdownDismiss() }
) {
DropdownMenuItem(
text = { Text("Create New List") },
onClick = {
onAddNewList()
onDropdownDismiss()
}
)
DropdownMenuItem(
text = { Text("Join Shared List") },
onClick = { onJoinSharedList() }
)
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
package com.example.listifyjetapp.components.formModals

import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.Card
import androidx.compose.material3.CardDefaults
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.material3.TextButton
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import androidx.compose.ui.window.Dialog
import com.example.listifyjetapp.ui.theme.ListifyColor
import com.example.listifyjetapp.widgets.inputFields.FormInputField

@Composable
fun EditItemForm(
description: String,
units: String,
isError: Boolean,
onDescriptionChange: (String) -> Unit,
onUnitsChange: (String) -> Unit,
onEditFormSubmit: () -> Unit,
onDismissRequest: () -> Unit = {}
) {

Dialog( onDismissRequest = { onDismissRequest() } ) {
Card(
modifier = Modifier.fillMaxWidth().padding(16.dp),
colors = CardDefaults.cardColors(Color.White),
shape = RoundedCornerShape(16.dp),
) {
Column(
modifier = Modifier.fillMaxWidth().padding(horizontal = 16.dp),
verticalArrangement = Arrangement.Center,
horizontalAlignment = Alignment.CenterHorizontally
) {
Text(
text = "Rename List Item",
style = MaterialTheme.typography.titleMedium,
modifier = Modifier.padding(vertical = 24.dp)
)

FormInputField(
placerHolder = "e.g., grocery list",
textState = description,
isError = isError,
onValueChange = onDescriptionChange
)

FormInputField(
placerHolder = "e.g., 1 lbs",
textState = units,
onValueChange = onUnitsChange
)

Row (
modifier = Modifier.fillMaxWidth().padding(horizontal = 32.dp),
horizontalArrangement = Arrangement.SpaceBetween,
) {
TextButton(
content = { Text("Cancel", fontWeight = FontWeight.Bold, color = ListifyColor.blue) },
onClick = { onDismissRequest() },
modifier = Modifier.padding(8.dp),
)

TextButton(
content = { Text("Save", color = ListifyColor.blue) },
onClick = { onEditFormSubmit() },
modifier = Modifier.padding(8.dp),
)
}
}
}
}

}
Loading