-
Notifications
You must be signed in to change notification settings - Fork 2
[Mod/#137] sign up screen #142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
9d8edc7
del/#137 주완햄의 노력의 산물 제거..ㅠ
sonms 7427efa
mod/#137 퍼미션 관리
sonms df3625e
feat/#137 나중에 사용할 contentresolver hilt 설정
sonms 5ea9b90
move/#137 옮긴 파일 내용 적용
sonms eccb536
feat/#137 suffix 적용, 커서, 커서 물방울 색상 적용
sonms 4521889
feat/#137 DataLoadingScreen 추가 나중에 디자인에 따라 변경예정
sonms 2f1e159
mod/#137 안 쓰는 파라미터 제거, 예전거 적용(커뮤니티 줄바꿈, 홈카드)
sonms 254c999
mod/#137 util로 변경
sonms 6545c0d
add/#137 icon 내용 변경 및 추가
sonms 26f7d07
feat/#137 예전 버튼의 내용은 두고 새로운 공통 컴포넌트 버튼 구현 - pawkey 버튼은 나중에 제거예정
sonms a47c318
feat/#137 화면(navhost)이동 애니메이션 추가
sonms 930c070
feat/#137 coil 이미지 로더 팩토리 적용 - 이미지 캐싱
sonms cf1f833
feat/#137 modal용 공통 컴포넌트 구현
sonms a4e3a3c
feat/#137 region 가져오기
sonms d3d4d55
feat/#137 bitmap -> cache 적용해서 메모리에 들지 않도록 하는 함수 구현
sonms e982d6e
mod/#137 헤더 디자인에 맞게 수정
sonms 01d9526
mod/#137 이전 디자인 적용 및 로직 수정
sonms 22ef312
mod/#137 savedStateHandle 사용 backstackentry 제거
sonms 8164539
mod/#137 entity 수정
sonms 56558f9
feat/#137 펫 이미지 컴포넌트
sonms f03fe37
feat/#137 서브 헤더
sonms df2dacb
feat/#137 유저 select 버튼 수정
sonms 358e179
feat/#137 home region setting 화면 오류와userid 분기 처리
sonms a2ab4af
mod/#137 온보딩 의존성 수정
sonms 3345f38
feat/#137 필요한 파라미터 추가
sonms 2060068
feat/#137 splash status bar 색상 변경
sonms bd02e96
feat/#137 state holder 패턴으로 변경
sonms 44cdee8
feat/#137 텍스트 변환 VisualTransformation
sonms 3272929
feat/#137 user info screen
sonms 9f75618
feat/#137 pet info screen
sonms cf062f5
feat/#137 location info screen
sonms 3f72dc0
feat/#137 map info screen
sonms 3cc41dd
feat/#137 스크린 타입 마다 검증 로직 및 next, backpress 구현
sonms bbac76c
feat/#137 전체 관리 signupscreen 적용
sonms 6f43395
mod/#137 네비게이션 수정
sonms 64d6fe5
Merge #137 -> develop
sonms ab95666
fix#137 conflict 수정
sonms ff9420d
Merge branch 'mod/#137-sign-up-screen' of https://github.com/PAW-KEY/…
sonms File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
47 changes: 47 additions & 0 deletions
47
app/src/main/java/com/paw/key/core/designsystem/component/DataLoadingScreen.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| package com.paw.key.core.designsystem.component | ||
|
|
||
| import androidx.compose.foundation.background | ||
| 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.height | ||
| import androidx.compose.material3.CircularProgressIndicator | ||
| import androidx.compose.runtime.Composable | ||
| import androidx.compose.ui.Alignment | ||
| import androidx.compose.ui.Modifier | ||
| import androidx.compose.ui.tooling.preview.Preview | ||
| import androidx.compose.ui.unit.dp | ||
| import com.paw.key.core.designsystem.theme.PawKeyTheme | ||
|
|
||
| @Composable | ||
| fun DataLoadingScreen() { | ||
| Box( | ||
| modifier = Modifier | ||
| .fillMaxSize() | ||
| .background( | ||
| color = PawKeyTheme.colors.gray950.copy(alpha = 0.5f) | ||
| ), | ||
| contentAlignment = Alignment.Center | ||
| ) { | ||
| Column( | ||
| horizontalAlignment = Alignment.CenterHorizontally | ||
| ) { | ||
| CircularProgressIndicator( | ||
| color = PawKeyTheme.colors.green500 | ||
| ) | ||
|
|
||
| Spacer(modifier = Modifier.height(8.dp)) | ||
|
|
||
| //Text("현재 위치를 가져오는 중...") | ||
| } | ||
| } | ||
| } | ||
|
|
||
| @Preview | ||
| @Composable | ||
| private fun LoadingScreenPreview() { | ||
| PawKeyTheme { | ||
| DataLoadingScreen() | ||
| } | ||
| } |
62 changes: 62 additions & 0 deletions
62
app/src/main/java/com/paw/key/core/designsystem/component/DogkyButton.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| package com.paw.key.core.designsystem.component | ||
|
|
||
| import androidx.compose.foundation.background | ||
| import androidx.compose.foundation.layout.Box | ||
| import androidx.compose.foundation.layout.fillMaxWidth | ||
| import androidx.compose.foundation.layout.padding | ||
| import androidx.compose.foundation.shape.RoundedCornerShape | ||
| import androidx.compose.material3.Text | ||
| import androidx.compose.runtime.Composable | ||
| import androidx.compose.ui.Alignment | ||
| import androidx.compose.ui.Modifier | ||
| import androidx.compose.ui.tooling.preview.Preview | ||
| import androidx.compose.ui.unit.dp | ||
| import com.paw.key.core.designsystem.theme.PawKeyTheme | ||
| import com.paw.key.core.extension.noRippleClickable | ||
|
|
||
| @Composable | ||
| fun DogkyButton( | ||
| text: String, | ||
| enabled: Boolean, | ||
| onClick: () -> Unit, | ||
| modifier: Modifier = Modifier | ||
| ) { | ||
| val backgroundColor = when { | ||
| enabled -> PawKeyTheme.colors.primary | ||
| else -> PawKeyTheme.colors.background1 | ||
| } | ||
|
|
||
| val textColor = when { | ||
| enabled -> PawKeyTheme.colors.background1 | ||
| else -> PawKeyTheme.colors.default | ||
| } | ||
|
|
||
| Box( | ||
| modifier = modifier | ||
| .fillMaxWidth() | ||
| .background(backgroundColor, shape = RoundedCornerShape(8.dp)) | ||
| .noRippleClickable { | ||
| if (enabled) onClick() | ||
| } | ||
| .padding(vertical = 14.dp), | ||
| contentAlignment = Alignment.Center | ||
| ) { | ||
| Text( | ||
| text = text, | ||
| style = PawKeyTheme.typography.mainButtonDefault, | ||
| color = textColor | ||
| ) | ||
| } | ||
| } | ||
|
|
||
| @Preview | ||
| @Composable | ||
| private fun DogkyButtonPreview() { | ||
| PawKeyTheme { | ||
| DogkyButton( | ||
| text = "", | ||
| enabled = true, | ||
| onClick = {} | ||
| ) | ||
| } | ||
| } | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 공통 컴포넌트 작업 굳굳 |
||
50 changes: 50 additions & 0 deletions
50
app/src/main/java/com/paw/key/core/designsystem/component/PawKeyBottomSheet.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| package com.paw.key.core.designsystem.component | ||
|
|
||
| import androidx.compose.foundation.layout.fillMaxWidth | ||
| import androidx.compose.foundation.shape.RoundedCornerShape | ||
| import androidx.compose.material3.ExperimentalMaterial3Api | ||
| import androidx.compose.material3.ModalBottomSheet | ||
| import androidx.compose.material3.SheetState | ||
| import androidx.compose.material3.rememberModalBottomSheetState | ||
| import androidx.compose.runtime.Composable | ||
| import androidx.compose.ui.Modifier | ||
| import androidx.compose.ui.tooling.preview.Preview | ||
| import androidx.compose.ui.unit.dp | ||
| import com.paw.key.core.designsystem.theme.PawKeyTheme | ||
|
|
||
| @OptIn(ExperimentalMaterial3Api::class) | ||
| @Composable | ||
| fun PawKeyBottomSheet( | ||
| sheetState: SheetState, | ||
| onDismissRequest: () -> Unit, | ||
| modifier: Modifier = Modifier, | ||
| content: @Composable (sheetState: SheetState) -> Unit | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
| ) { | ||
| ModalBottomSheet( | ||
| onDismissRequest = onDismissRequest, | ||
| sheetState = sheetState, | ||
| shape = RoundedCornerShape(topStart = 20.dp, topEnd = 20.dp), | ||
| containerColor = PawKeyTheme.colors.background2, | ||
| modifier = modifier | ||
| .fillMaxWidth(), | ||
| dragHandle = null, | ||
| ) { | ||
| content(sheetState) | ||
| } | ||
| } | ||
|
|
||
| @OptIn(ExperimentalMaterial3Api::class) | ||
| @Preview | ||
| @Composable | ||
| private fun PawKeyBottomSheetPreview() { | ||
| PawKeyTheme { | ||
| val sheetState = rememberModalBottomSheetState( | ||
| skipPartiallyExpanded = true | ||
| ) | ||
|
|
||
| PawKeyBottomSheet( | ||
| sheetState = sheetState, | ||
| onDismissRequest = {} | ||
| ) { } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
app/src/main/java/com/paw/key/core/util/DateVisualTransformation.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| package com.paw.key.core.util | ||
|
|
||
| import androidx.compose.ui.text.AnnotatedString | ||
| import androidx.compose.ui.text.input.OffsetMapping | ||
| import androidx.compose.ui.text.input.TransformedText | ||
| import androidx.compose.ui.text.input.VisualTransformation | ||
|
|
||
| // 날짜 텍스트 입력받아서 변환 텍스트 만들기 | ||
| class DateVisualTransformation : VisualTransformation { | ||
| override fun filter(text: AnnotatedString): TransformedText { | ||
| val digitsOnly = text.text.filter { it.isDigit() } | ||
|
|
||
| val trimmed = if (digitsOnly.length > 8) digitsOnly.substring(0, 8) else digitsOnly | ||
|
|
||
| val formattedText = buildString { | ||
| trimmed.forEachIndexed { index, char -> | ||
| append(char) | ||
| if (index == 3 || index == 5) { | ||
| append('/') | ||
| } | ||
| } | ||
| } | ||
|
|
||
| val offsetMapping = object : OffsetMapping { | ||
| override fun originalToTransformed(offset: Int): Int { | ||
| return when { | ||
| offset >= 6 -> offset + 2 | ||
| offset >= 4 -> offset + 1 | ||
| else -> offset | ||
| } | ||
| } | ||
|
|
||
| override fun transformedToOriginal(offset: Int): Int { | ||
| return when { | ||
| offset >= 8 -> offset - 2 // yyyy/MM/dd | ||
| offset >= 5 -> offset - 1 // yyyy/MM | ||
| else -> offset | ||
| } | ||
| } | ||
| } | ||
|
|
||
| return TransformedText(AnnotatedString(formattedText), offsetMapping) | ||
| } | ||
| } |
2 changes: 1 addition & 1 deletion
2
...ui/course/util/PermissionRequestEffect.kt → .../key/core/util/PermissionRequestEffect.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
app/src/main/java/com/paw/key/core/util/flattenCoordinatesToLatLng.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| package com.paw.key.core.util | ||
|
|
||
| import com.naver.maps.geometry.LatLng | ||
| import kotlinx.collections.immutable.ImmutableList | ||
| import kotlinx.collections.immutable.toPersistentList | ||
|
|
||
| fun flattenCoordinatesToLatLng( | ||
| coordinates: List<List<List<Pair<Double, Double>>>> | ||
| ): ImmutableList<ImmutableList<LatLng>> { | ||
| return coordinates.map { polygon -> // 각 Polygon | ||
| polygon.firstOrNull()?.map { point -> | ||
| LatLng(point.first, point.second) | ||
| }.orEmpty().toPersistentList() | ||
| }.toPersistentList() | ||
| } |
56 changes: 56 additions & 0 deletions
56
app/src/main/java/com/paw/key/core/util/saveBitmapToCache.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| package com.paw.key.core.util | ||
|
|
||
| import android.content.Context | ||
| import android.graphics.Bitmap | ||
| import android.net.Uri | ||
| import androidx.core.content.FileProvider | ||
| import java.io.File | ||
| import java.io.FileOutputStream | ||
| import java.io.IOException | ||
|
|
||
| // 혹시나 비트맵 사용 시 | ||
| fun saveBitmapToCache( | ||
| context: Context, | ||
| bitmap: Bitmap, | ||
| maxFiles: Int = 5, // 캐시 최대 개수 | ||
| maxCacheSizeBytes: Long = 50L * 1024 * 1024, // 50mb, | ||
| childName : String = "map_snapshot_" // 이미지 이름 변경용 | ||
| ): Result<Uri> { | ||
| val cacheDir = context.cacheDir | ||
|
|
||
| // 기존 스냅샷 파일 목록 오래된 순 정렬 | ||
| val existingFiles = cacheDir.listFiles { file -> | ||
| file.name.startsWith(childName) && file.extension == "png" | ||
| }?.sortedBy { it.lastModified() } ?: emptyList() | ||
|
|
||
| // 최대 개수 초과 시 오래된 파일 삭제 LRU 구현 | ||
| if (existingFiles.size >= maxFiles) { | ||
| val filesToDelete = existingFiles.take(existingFiles.size - maxFiles + 1) | ||
| filesToDelete.forEach { it.delete() } | ||
| } | ||
|
|
||
| // 용량 기반 삭제 | ||
| var totalSize = existingFiles.sumOf { it.length() } | ||
| val iterator = existingFiles.iterator() | ||
| while (totalSize > maxCacheSizeBytes && iterator.hasNext()) { | ||
| val file = iterator.next() | ||
| totalSize -= file.length() | ||
| file.delete() | ||
| } | ||
|
|
||
| val imageFile = File(cacheDir, "${childName}${System.currentTimeMillis()}.png") | ||
| return try { | ||
| FileOutputStream(imageFile).use { out -> | ||
| bitmap.compress(Bitmap.CompressFormat.PNG, 100, out) | ||
| } | ||
| Result.success( | ||
| FileProvider.getUriForFile( | ||
| context, | ||
| "${context.packageName}.fileprovider", | ||
| imageFile | ||
| ) | ||
| ) | ||
| } catch (e: IOException) { | ||
| Result.failure(e) | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
진도가 너무 빠릅니다 교수님
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋ coil의 구현 방식에 대해 읽어보고 이미지 캐싱 전략 중 메모리 캐시와 디스크 캐시에 대해 한 번 알아봅시다 ^^