-
Notifications
You must be signed in to change notification settings - Fork 0
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
[TNT-142] 트레이너/트레이니 선택 화면, 프로필 만들기 화면 작성 #24
Merged
FpRaArNkK
merged 16 commits into
develop
from
TNT-142-traineeSignUp-roleSelectAndBasicInfo
Jan 23, 2025
Merged
Changes from 9 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
35a3af1
[Feat] UserType Entity 추가
FpRaArNkK 4584e94
[Feat] UserTypeSelection 화면 작성
FpRaArNkK 5987a2b
[Feat] 트레이너 트레이니 기본 프로필 이미지 에셋 추가
FpRaArNkK 9986b40
[Chore] UserTypeSelection 수정
FpRaArNkK 4fb4db7
[Feat] Domain - UserPolicy,TextValidator 작성
FpRaArNkK 364e1f7
[Fix] TTextFiled 내부 TextColor State 추가
FpRaArNkK 33245a6
[Feat] CreateProfile 화면 작성
FpRaArNkK 503b4a8
[Feat] 화면 최초 시작 시 폰트 등록 추가
FpRaArNkK 4f5c79c
[Chore] 프로필 이미지 비율 수정
FpRaArNkK 741f0f7
[Delete] 중복 파일 제거
FpRaArNkK 58d5b9e
[Chore] 사용 변수 리네이밍
FpRaArNkK e640c17
[Chore] import, 접근제어자 수정
FpRaArNkK f3e4a43
[Feat] 코드 리뷰 반영 중
FpRaArNkK 47f3616
[Feat] UserTypeSelection 리듀서 구조 수정
FpRaArNkK bea409b
[Setting] Lint 룰 수정
FpRaArNkK 64a161a
[Feat] CreateProfile 리듀서 구조 수정
FpRaArNkK 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
Binary file removed
BIN
-4.86 KB
...cassets/Images/img_default_profile_image.imageset/img_default_profile_image.png
Binary file not shown.
Binary file removed
BIN
-9.98 KB
...sets/Images/img_default_profile_image.imageset/[email protected]
Binary file not shown.
Binary file removed
BIN
-15.3 KB
...sets/Images/img_default_profile_image.imageset/[email protected]
Binary file not shown.
6 changes: 3 additions & 3 deletions
6
...ault_profile_image.imageset/Contents.json → ...ault_trainee_image.imageset/Contents.json
This file contains 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
Binary file added
BIN
+4.81 KB
...ts.xcassets/Images/img_default_trainee_image.imageset/basic profile_trainee.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+9.76 KB
...xcassets/Images/img_default_trainee_image.imageset/basic [email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+15 KB
...xcassets/Images/img_default_trainee_image.imageset/basic [email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions
23
...nSystem/Resources/Assets.xcassets/Images/img_default_trainer_image.imageset/Contents.json
This file contains 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,23 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "basic profile_trainer.png", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"filename" : "basic [email protected]", | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"filename" : "basic [email protected]", | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+4.91 KB
...ts.xcassets/Images/img_default_trainer_image.imageset/basic profile_trainer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+10 KB
...xcassets/Images/img_default_trainer_image.imageset/basic [email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+15.3 KB
...xcassets/Images/img_default_trainer_image.imageset/basic [email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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 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 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,21 @@ | ||
// | ||
// UserType.swift | ||
// Domain | ||
// | ||
// Created by 박민서 on 1/17/25. | ||
// Copyright © 2025 yapp25thTeamTnT. All rights reserved. | ||
// | ||
|
||
public enum UserType { | ||
case trainer | ||
case trainee | ||
|
||
public var koreanName: String { | ||
switch self { | ||
case .trainer: | ||
return "트레이너" | ||
case .trainee: | ||
return "트레이니" | ||
} | ||
} | ||
} |
This file contains 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 @@ | ||
// | ||
// UserPolicy.swift | ||
// Domain | ||
// | ||
// Created by 박민서 on 1/17/25. | ||
// Copyright © 2025 yapp25thTeamTnT. All rights reserved. | ||
// | ||
|
||
public struct UserPolicy { | ||
/// 사용자 이름 최대 길이 제한 (공백 포함) | ||
public static let maxNameLength: Int = 15 | ||
|
||
/// 사용자 이름 가능 문자: 한글/영어/공백만 허용 (특수문자 불가) | ||
public static let allowedCharactersRegex = "^[ㄱ-ㅎㅏ-ㅣ가-힣a-zA-Z ]*$" | ||
} | ||
This file contains 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,31 @@ | ||
// | ||
// TextValidator.swift | ||
// Domain | ||
// | ||
// Created by 박민서 on 1/17/25. | ||
// Copyright © 2025 yapp25thTeamTnT. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
public enum TextValidator { | ||
/// 사용자가 입력할 때 즉각적인 유효성 검사를 수행하는 함수 | ||
/// - Parameters: | ||
/// - text: 검증할 문자열 | ||
/// - maxLength: 최대 입력 가능 길이 | ||
/// - regexPattern: 허용할 문자에 대한 정규식 | ||
/// - Returns: 입력이 유효한지 여부 (`true` = 허용, `false` = 입력 불가) | ||
public static func isValidInput( | ||
_ text: String, | ||
maxLength: Int, | ||
regexPattern: String | ||
) -> Bool { | ||
guard text.count <= maxLength, | ||
let regex = try? NSRegularExpression(pattern: regexPattern) else { | ||
return false | ||
} | ||
|
||
let range: NSRange = .init(location: 0, length: text.utf16.count) | ||
return regex.firstMatch(in: text, options: [], range: range) != nil | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
TnT/Projects/Presentation/Sources/Onboarding/CreateProfile/CreateProfileFeature.swift
This file contains 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,9 @@ | ||
// | ||
// CreateProfileFeature.swift | ||
// Presentation | ||
// | ||
// Created by 박민서 on 1/17/25. | ||
// Copyright © 2025 yapp25thTeamTnT. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
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. 얘 파일이름 똑같은애가 2개가 있는데 컴파일러가 안잡아줬나요? 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. 엇.. 브랜치를 바꾸면서 작업하다보니 놓쳤던 것 같습니다..! 수정하겠습니다 감사합니다! |
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.
정책 관련 특정 값들을 저장해놓는 것을 요구 사항으로 생각하고, enun과 struct 중에 고민했었습니다.
추후 추가/수정 시에도 - 정책 내부에 별도의 구조체를 갖거나, 중첩 타입이 있을 경우 enum보다는 struct가 더 자연스럽지 않을까
.. 싶은 이유에서 struct로 작성했습니다!