Skip to content

Commit

Permalink
Merge pull request #230 from PeriodPals/settings/implement-settings-s…
Browse files Browse the repository at this point in the history
…creen-ui

Settings/implement settings screen UI
  • Loading branch information
Harrish92 authored Nov 21, 2024
2 parents 7b28801 + d82172a commit efa95ac
Show file tree
Hide file tree
Showing 5 changed files with 683 additions and 8 deletions.
2 changes: 1 addition & 1 deletion app/src/main/java/com/android/periodpals/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ fun PeriodPalsApp(
navigation(startDestination = Screen.PROFILE, route = Route.PROFILE) {
composable(Screen.PROFILE) { ProfileScreen(userViewModel, navigationActions) }
composable(Screen.EDIT_PROFILE) { EditProfileScreen(userViewModel, navigationActions) }
composable(Screen.SETTINGS) { SettingsScreen(navigationActions) }
composable(Screen.SETTINGS) { SettingsScreen(userViewModel, navigationActions) }
}
}
}
31 changes: 31 additions & 0 deletions app/src/main/java/com/android/periodpals/resources/C.kt
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,37 @@ object C {
const val SAVE_BUTTON = "saveButton"
}

object SettingsScreen {
const val SCREEN = "settingsScreen"
const val NOTIFICATIONS_CONTAINER = "notificationsContainer"
const val THEME_CONTAINER = "themeContainer"
const val ACCOUNT_MANAGEMENT_CONTAINER = "accountManagementContainer"
const val NOTIFICATIONS_DESCRIPTION = "notificationDescription"
const val ORGANIC_DESCRIPTION = "organicDescription"
const val PALS_TEXT = "palsText"
const val PALS_SWITCH = "palsSwitch"
const val HORIZONTAL_DIVIDER = "horizontalDivider"
const val PADS_TEXT = "padsText"
const val PADS_SWITCH = "padsSwitch"
const val TAMPONS_TEXT = "tamponsText"
const val TAMPONS_SWITCH = "tamponsSwitch"
const val ORGANIC_TEXT = "organicText"
const val ORGANIC_SWITCH = "organicSwitch"
const val THEME_DROP_DOWN_MENU_BOX = "themeDropdownMenuBox"
const val THEME_DROP_DOWN_MENU = "themeDropdownMenu"
const val PASSWORD_TEXT = "passwordText"
const val PASSWORD_ICON = "passwordIcon"
const val SIGN_OUT_TEXT = "signOutText"
const val SIGN_OUT_ICON = "signOutIcon"
const val DELETE_ACCOUNT_TEXT = "deleteAccountText"
const val DELETE_ACCOUNT_ICON = "deleteAccountIcon"
const val DELETE_ACCOUNT_CARD = "deleteCard"
const val CARD_EMOJI_ICON = "deleteEmojiIcon"
const val CARD_TEXT = "deleteText"
const val DELETE_BUTTON = "deleteButton"
const val NOT_DELETE_BUTTON = "notDeleteButton"
}

/** Constants for tagging UI components in the TimerScreen. */
object TimerScreen {
const val SCREEN = "timerScreen"
Expand Down
24 changes: 24 additions & 0 deletions app/src/main/java/com/android/periodpals/resources/Color.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import androidx.compose.material3.IconButtonDefaults
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.MenuItemColors
import androidx.compose.material3.OutlinedTextFieldDefaults
import androidx.compose.material3.SwitchColors
import androidx.compose.material3.TextFieldColors
import androidx.compose.material3.TextFieldDefaults
import androidx.compose.material3.darkColorScheme
Expand Down Expand Up @@ -203,4 +204,27 @@ object ComponentColor {
disabledTrailingIconColor = MaterialTheme.colorScheme.onSecondaryContainer,
)
}

/** Returns the switch colors. */
@Composable
fun getSwitchColors(): SwitchColors {
return SwitchColors(
checkedThumbColor = MaterialTheme.colorScheme.onTertiary,
checkedTrackColor = MaterialTheme.colorScheme.tertiary,
uncheckedThumbColor = MaterialTheme.colorScheme.onSurfaceVariant,
uncheckedTrackColor = MaterialTheme.colorScheme.surfaceVariant,
checkedBorderColor = MaterialTheme.colorScheme.tertiary,
checkedIconColor = MaterialTheme.colorScheme.tertiary,
uncheckedBorderColor = MaterialTheme.colorScheme.surfaceVariant,
uncheckedIconColor = MaterialTheme.colorScheme.surfaceVariant,
disabledCheckedThumbColor = MaterialTheme.colorScheme.onTertiary,
disabledCheckedTrackColor = MaterialTheme.colorScheme.tertiary,
disabledCheckedBorderColor = MaterialTheme.colorScheme.tertiary,
disabledCheckedIconColor = MaterialTheme.colorScheme.tertiary,
disabledUncheckedThumbColor = MaterialTheme.colorScheme.onSurfaceVariant,
disabledUncheckedTrackColor = MaterialTheme.colorScheme.surfaceVariant,
disabledUncheckedBorderColor = MaterialTheme.colorScheme.surfaceVariant,
disabledUncheckedIconColor = MaterialTheme.colorScheme.surfaceVariant,
)
}
}
Loading

0 comments on commit efa95ac

Please sign in to comment.