1+ package com.texthip.thip.ui.signin.screen
2+
3+ import androidx.compose.foundation.Image
4+ import androidx.compose.foundation.background
5+ import androidx.compose.foundation.border
6+ import androidx.compose.foundation.layout.Box
7+ import androidx.compose.foundation.layout.Column
8+ import androidx.compose.foundation.layout.Spacer
9+ import androidx.compose.foundation.layout.fillMaxSize
10+ import androidx.compose.foundation.layout.fillMaxWidth
11+ import androidx.compose.foundation.layout.height
12+ import androidx.compose.foundation.layout.offset
13+ import androidx.compose.foundation.layout.padding
14+ import androidx.compose.foundation.layout.size
15+ import androidx.compose.foundation.layout.width
16+ import androidx.compose.foundation.shape.CircleShape
17+ import androidx.compose.material3.Text
18+ import androidx.compose.runtime.Composable
19+ import androidx.compose.ui.Alignment
20+ import androidx.compose.ui.Modifier
21+ import androidx.compose.ui.draw.clip
22+ import androidx.compose.ui.graphics.painter.Painter
23+ import androidx.compose.ui.layout.ContentScale
24+ import androidx.compose.ui.res.painterResource
25+ import androidx.compose.ui.res.stringResource
26+ import androidx.compose.ui.tooling.preview.Preview
27+ import androidx.compose.ui.unit.dp
28+ import com.texthip.thip.R
29+ import com.texthip.thip.ui.common.buttons.ActionMediumButton
30+ import com.texthip.thip.ui.common.topappbar.DefaultTopAppBar
31+ import com.texthip.thip.ui.theme.Grey
32+ import com.texthip.thip.ui.theme.ThipTheme.colors
33+ import com.texthip.thip.ui.theme.ThipTheme.typography
34+
35+ @Composable
36+ fun SigninDoneScreen (nickname : String , profileImageResId : Int? , role : String ) {
37+ Column (
38+ Modifier
39+ .background(colors.Black )
40+ .fillMaxSize()
41+ ) {
42+ DefaultTopAppBar (
43+ isRightIconVisible = false ,
44+ isTitleVisible = false ,
45+ onLeftClick = {},
46+ )
47+ Spacer (modifier = Modifier .height(40 .dp))
48+ Column (
49+ modifier = Modifier
50+ .padding(horizontal = 20 .dp)
51+ .fillMaxWidth()
52+ ) {
53+ Text (
54+ text = stringResource(R .string.hello_user, nickname),
55+ style = typography.smalltitle_sb600_s18_h24,
56+ color = colors.White ,
57+ modifier = Modifier
58+ .fillMaxWidth()
59+ .padding(bottom = 8 .dp)
60+ )
61+ Spacer (modifier = Modifier .height(8 .dp))
62+ Text (
63+ text = stringResource(R .string.signin_done),
64+ style = typography.copy_m500_s14_h20,
65+ color = colors.Grey ,
66+ modifier = Modifier
67+ .fillMaxWidth()
68+ )
69+ Spacer (modifier = Modifier .height(100 .dp))
70+ Column (
71+ modifier = Modifier
72+ .fillMaxWidth(),
73+ horizontalAlignment = Alignment .CenterHorizontally
74+ ) {
75+ if (profileImageResId != null ) {
76+ Box (
77+ modifier = Modifier
78+ .size(54 .dp)
79+ .clip(CircleShape )
80+ .border(width = 1 .dp, color = colors.White , shape = CircleShape )
81+ .background(colors.Black ),
82+ contentAlignment = Alignment .BottomCenter
83+ ) {
84+ Image (
85+ painter = painterResource(id = profileImageResId),
86+ contentDescription = null ,
87+ contentScale = ContentScale .Fit ,
88+ modifier = Modifier
89+ .size(45 .dp)
90+ .offset(y = 2 .dp)
91+ )
92+ }
93+ } else {
94+ Box (
95+ modifier = Modifier
96+ .size(54 .dp)
97+ .clip(CircleShape )
98+ .border(width = 0.5 .dp, color = colors.Grey01 , shape = CircleShape )
99+ .background(Grey )
100+ )
101+ }
102+ Spacer (modifier = Modifier .height(8 .dp))
103+ Text (
104+ text = nickname,
105+ style = typography.smalltitle_sb600_s18_h24,
106+ color = colors.White ,
107+ modifier = Modifier
108+ .padding(bottom = 4 .dp)
109+ )
110+ Text (
111+ text = role,
112+ style = typography.copy_r400_s14,
113+ color = colors.White ,
114+ modifier = Modifier
115+ )
116+ Spacer (modifier = Modifier .height(76 .dp))
117+ ActionMediumButton (
118+ text = stringResource(R .string.start_thip),
119+ contentColor = colors.White ,
120+ backgroundColor = colors.Purple ,
121+ modifier = Modifier .width(180 .dp),
122+ onClick = {},
123+ )
124+ }
125+
126+ }
127+
128+ }
129+ }
130+
131+ @Preview
132+ @Composable
133+ private fun SigninDoneScreenPrev () {
134+ SigninDoneScreen (" JJUYAA" , profileImageResId = R .drawable.character_sociology, role = " 칭호칭호" )
135+ }
0 commit comments