-
Notifications
You must be signed in to change notification settings - Fork 0
feat, style: [검색뷰] 키링뭉치 검색 구현, [뭉치 상세뷰] 키링 상세뷰와 디자인 유사하게 변경 #59
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
The head ref may contain hidden characters: "feat/\uAC80\uC0C9\uBDF0---\uD0A4\uB9C1\uBB49\uCE58-\uAC80\uC0C9-\uAD6C\uD604"
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
c86b766
feat: 뭉치 이름 검색 기능 추가
jini-coding 8cd68c4
style: 헤더 타이틀 패딩값 조정
jini-coding 862aee6
style: 뭉치 이름 내 검색 키워드 하이라이트 적용
jini-coding b870d5a
feat: 세그먼트 분리용 변수 선언
jini-coding 2e0a459
feat: 검색뷰 내 키링/뭉치 세그먼트 컨트롤 UI 추가
jini-coding ad8a3ec
feat: 뭉치 정렬 기능 추가
jini-coding 78daacc
fix: 키링/뭉치 탭 전환 시 정렬 방식 독립적으로 유지
jini-coding da5af0f
style: 보관함 헤더 탭별 패딩값 동일하게 조정
jini-coding a76bcb1
fix: 키링 정보 수정 후 보관함 대신 상세뷰로 이동
jini-coding 7d4cd18
chore: 위젯 가이딩뷰 라우터 연결
jini-coding 269895b
feat: 메인 뭉치일 때 삭제 버튼 비활성화로 변경
jini-coding 39da8ef
feat: 뭉치 상세뷰에 공유 시트 추가
jini-coding e6644f9
fix: 네비게이션바 뭉치 이름 쏠림 현상 픽스
jini-coding 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
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
26 changes: 26 additions & 0 deletions
26
Keychy/Keychy/Presentation/Bundle/ViewModels/BundleViewModel+Filter.swift
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,26 @@ | ||
| // | ||
| // BundleViewModel+Filter.swift | ||
| // Keychy | ||
| // | ||
| // Created by Jini on 2/9/26. | ||
| // | ||
|
|
||
| import SwiftUI | ||
|
|
||
| extension BundleViewModel { | ||
| // MARK: - 검색 키워드 필터링 | ||
| /// 검색어로 뭉치 필터링 (이름 기준) | ||
| func getFilteredBundles(searchText: String = "") -> [KeyringBundle] { | ||
| var result = bundles | ||
|
|
||
| // 검색 필터 | ||
| if !searchText.isEmpty { | ||
| result = result.filter { bundle in | ||
| bundle.name.localizedCaseInsensitiveContains(searchText) | ||
| } | ||
| } | ||
|
|
||
| // 정렬 적용 | ||
| return sortBundles(result) | ||
| } | ||
| } |
43 changes: 43 additions & 0 deletions
43
Keychy/Keychy/Presentation/Bundle/ViewModels/BundleViewModel+Sort.swift
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,43 @@ | ||
| // | ||
| // BundleViewModel+Sort.swift | ||
| // Keychy | ||
| // | ||
| // Created by Jini on 2/9/26. | ||
| // | ||
|
|
||
| import SwiftUI | ||
|
|
||
| extension BundleViewModel { | ||
| // MARK: - 정렬 방식 | ||
|
|
||
| /// 정렬 기준 변경 및 즉시 적용 | ||
| func updateSortOrder(_ newSort: String) { | ||
| selectedSort = newSort | ||
| } | ||
|
|
||
| /// 뭉치 배열을 정렬 (메인 뭉치는 항상 최상단 유지) | ||
| func sortBundles(_ bundles: [KeyringBundle]) -> [KeyringBundle] { | ||
| // 메인 뭉치와 일반 뭉치 분리 | ||
| let mainBundles = bundles.filter { $0.isMain } | ||
| let normalBundles = bundles.filter { !$0.isMain } | ||
|
|
||
| // 일반 뭉치를 선택된 정렬 기준으로 정렬 | ||
| let sortedNormalBundles: [KeyringBundle] | ||
|
|
||
| switch selectedSort { | ||
| case "최신순": | ||
| sortedNormalBundles = normalBundles.sorted { $0.createdAt > $1.createdAt } | ||
| case "오래된순": | ||
| sortedNormalBundles = normalBundles.sorted { $0.createdAt < $1.createdAt } | ||
| case "이름순": | ||
| sortedNormalBundles = normalBundles.sorted { | ||
| $0.name.localizedStandardCompare($1.name) == .orderedAscending | ||
| } | ||
| default: | ||
| sortedNormalBundles = normalBundles.sorted { $0.createdAt > $1.createdAt } | ||
| } | ||
|
|
||
| // 메인 뭉치(최신순 정렬) + 정렬된 일반 뭉치 | ||
| return mainBundles.sorted { $0.createdAt > $1.createdAt } + sortedNormalBundles | ||
| } | ||
| } |
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
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
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.
지금보니 제가 디테일뷰,완성뷰에 둘다 만들어뒀네요
후에 BundleViewModel+VideoGen으로 통합해도 될듯합니당