Added the profile feature
This commit is contained in:
@@ -11,6 +11,7 @@ import com.atridad.mealient.ui.destinations.BaseURLScreenDestination
|
||||
import com.atridad.mealient.ui.destinations.DisclaimerScreenDestination
|
||||
import com.atridad.mealient.ui.destinations.RecipeScreenDestination
|
||||
import com.atridad.mealient.ui.destinations.RecipesListDestination
|
||||
import com.mealient.user_management.ui.profile.destinations.UserProfileScreenDestination
|
||||
|
||||
internal object NavGraphs {
|
||||
|
||||
@@ -40,6 +41,7 @@ internal object NavGraphs {
|
||||
DisclaimerScreenDestination,
|
||||
BaseURLScreenDestination,
|
||||
AuthenticationScreenDestination,
|
||||
UserProfileScreenDestination,
|
||||
),
|
||||
nestedNavGraphs = listOf(
|
||||
recipes,
|
||||
|
||||
@@ -6,6 +6,7 @@ import androidx.compose.material.icons.filled.Add
|
||||
import androidx.compose.material.icons.filled.Email
|
||||
import androidx.compose.material.icons.filled.List
|
||||
import androidx.compose.material.icons.filled.Logout
|
||||
import androidx.compose.material.icons.filled.Person
|
||||
import androidx.compose.material.icons.filled.ShoppingCart
|
||||
import androidx.compose.material.icons.filled.SyncAlt
|
||||
import androidx.compose.material3.DrawerState
|
||||
@@ -28,6 +29,7 @@ import com.atridad.mealient.ui.components.DrawerItem
|
||||
import com.atridad.mealient.ui.destinations.AddRecipeScreenDestination
|
||||
import com.atridad.mealient.ui.destinations.BaseURLScreenDestination
|
||||
import com.atridad.mealient.ui.destinations.RecipesListDestination
|
||||
import com.mealient.user_management.ui.profile.destinations.UserProfileScreenDestination
|
||||
import kotlinx.coroutines.launch
|
||||
|
||||
@Composable
|
||||
@@ -91,6 +93,11 @@ internal fun createDrawerItems(
|
||||
icon = Icons.Default.ShoppingCart,
|
||||
direction = NavGraphs.shoppingLists,
|
||||
),
|
||||
createNavigationItem(
|
||||
nameRes = R.string.menu_navigation_drawer_profile,
|
||||
icon = Icons.Default.Person,
|
||||
direction = UserProfileScreenDestination,
|
||||
),
|
||||
createNavigationItem(
|
||||
nameRes = R.string.menu_navigation_drawer_change_url,
|
||||
icon = Icons.Default.SyncAlt,
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
<string name="fragment_recipes_delete_recipe_confirm_dialog_message">Are you sure you want to delete %1$s? This cannot be undone.</string>
|
||||
<string name="fragment_recipes_delete_recipe_confirm_dialog_positive_btn">Confirm</string>
|
||||
<string name="fragment_recipes_delete_recipe_confirm_dialog_negative_btn">Cancel</string>
|
||||
<string name="menu_navigation_drawer_profile">Profile</string>
|
||||
<string name="menu_navigation_drawer_change_url">Change URL</string>
|
||||
<string name="search_recipes_hint">Search recipes</string>
|
||||
<string name="view_toolbar_navigation_icon_content_description">Open navigation drawer</string>
|
||||
|
||||
Reference in New Issue
Block a user