Skip to content

Commit

Permalink
Merge branch 'develop' into feat/verify_kakao_token
Browse files Browse the repository at this point in the history
  • Loading branch information
5tarry authored Dec 11, 2023
2 parents f7522e7 + dfdc17e commit 64f2a8b
Show file tree
Hide file tree
Showing 20 changed files with 1,693 additions and 497 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
package com.everyone.movemove_android.ui

import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.foundation.text.BasicTextField
import androidx.compose.foundation.text.KeyboardActions
Expand All @@ -20,8 +26,11 @@ import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.SolidColor
import androidx.compose.ui.platform.LocalFocusManager
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import com.everyone.movemove_android.R
import com.everyone.movemove_android.ui.theme.DisabledFontInDark
import com.everyone.movemove_android.ui.theme.DisabledInDark
import com.everyone.movemove_android.ui.theme.Point
Expand Down Expand Up @@ -110,4 +119,37 @@ fun MoveMoveTextField(
)
}
}
}


@Composable
fun MoveMoveErrorScreen(
modifier: Modifier = Modifier,
onClick: () -> Unit,
) {
Column(
modifier = Modifier.fillMaxSize(),
verticalArrangement = Arrangement.Center,
horizontalAlignment = Alignment.CenterHorizontally
) {
StyledText(
text = stringResource(R.string.error_screen_title),
style = Typography.titleMedium.copy(
fontWeight = FontWeight.SemiBold,
color = Color.White
),
)
Spacer(modifier = Modifier.height(20.dp))
StyledText(
modifier = modifier
.padding(start = 8.dp, end = 8.dp)
.clip(shape = RoundedCornerShape(8.dp))
.clickable { onClick() },
text = stringResource(R.string.error_screen_sub_title),
style = Typography.labelMedium.copy(
fontWeight = FontWeight.SemiBold,
color = Color.White
),
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,15 @@ class ProfileActivity : BaseActivity() {
override fun InitComposeUi() {
ProfileScreen(
viewModel = viewModel,
navigateToActivity = ::launchActivity
navigateToActivity = ::launchActivity,
navigateUp = ::navigateUp
)
}

private fun launchActivity(intent: Intent) = startActivity(intent)

private fun navigateUp() = finish()

companion object {
const val EXTRA_KEY_UUID = "EXTRA_KEY_UUID"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ interface ProfileContract :
BaseContract<ProfileContract.State, ProfileContract.Event, ProfileContract.Effect> {
data class State(
val isLoading: Boolean = false,
val isError: Boolean = false,
val uuid: String? = null,
val profile: Profile? = null,
val videosUploaded: VideosList = VideosList(null)
val videosUploaded: VideosList = VideosList(null),
val isUser: Boolean = false,
)

sealed interface Event {
Expand All @@ -20,6 +22,8 @@ interface ProfileContract :
val page: Int
) : Event

data object Refresh : Event
data object OnClickedBack : Event
}

sealed interface Effect {
Expand All @@ -28,5 +32,7 @@ interface ProfileContract :
val videosList: VideosList,
val page: Int
) : Effect

data object NavigateUp : Effect
}
}
Loading

0 comments on commit 64f2a8b

Please sign in to comment.