-
Notifications
You must be signed in to change notification settings - Fork 0
feature/#54 - 리스트뷰 placeholder 모델 적용 #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
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
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
6 changes: 6 additions & 0 deletions
6
Projects/DVDesign/Resources/Assets.xcassets/ServiceLogos/Contents.json
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,6 @@ | ||
| { | ||
| "info" : { | ||
| "author" : "xcode", | ||
| "version" : 1 | ||
| } | ||
| } |
16 changes: 16 additions & 0 deletions
16
Projects/DVDesign/Resources/Assets.xcassets/ServiceLogos/github.imageset/Contents.json
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,16 @@ | ||
| { | ||
| "images" : [ | ||
| { | ||
| "filename" : "github.svg", | ||
| "idiom" : "universal" | ||
| } | ||
| ], | ||
| "info" : { | ||
| "author" : "xcode", | ||
| "version" : 1 | ||
| }, | ||
| "properties" : { | ||
| "preserves-vector-representation" : true, | ||
| "template-rendering-intent" : "template" | ||
| } | ||
| } |
1 change: 1 addition & 0 deletions
1
...ects/DVDesign/Resources/Assets.xcassets/ServiceLogos/github.imageset/github.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions
16
Projects/DVDesign/Resources/Assets.xcassets/ServiceLogos/google.imageset/Contents.json
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,16 @@ | ||
| { | ||
| "images" : [ | ||
| { | ||
| "filename" : "google.svg", | ||
| "idiom" : "universal" | ||
| } | ||
| ], | ||
| "info" : { | ||
| "author" : "xcode", | ||
| "version" : 1 | ||
| }, | ||
| "properties" : { | ||
| "preserves-vector-representation" : true, | ||
| "template-rendering-intent" : "template" | ||
| } | ||
| } |
1 change: 1 addition & 0 deletions
1
...ects/DVDesign/Resources/Assets.xcassets/ServiceLogos/google.imageset/google.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions
16
Projects/DVDesign/Resources/Assets.xcassets/ServiceLogos/kakaotalk.imageset/Contents.json
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,16 @@ | ||
| { | ||
| "images" : [ | ||
| { | ||
| "filename" : "kakaotalk.svg", | ||
| "idiom" : "universal" | ||
| } | ||
| ], | ||
| "info" : { | ||
| "author" : "xcode", | ||
| "version" : 1 | ||
| }, | ||
| "properties" : { | ||
| "preserves-vector-representation" : true, | ||
| "template-rendering-intent" : "original" | ||
| } | ||
| } |
1 change: 1 addition & 0 deletions
1
...VDesign/Resources/Assets.xcassets/ServiceLogos/kakaotalk.imageset/kakaotalk.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions
16
Projects/DVDesign/Resources/Assets.xcassets/ServiceLogos/naver.imageset/Contents.json
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,16 @@ | ||
| { | ||
| "images" : [ | ||
| { | ||
| "filename" : "naver.svg", | ||
| "idiom" : "universal" | ||
| } | ||
| ], | ||
| "info" : { | ||
| "author" : "xcode", | ||
| "version" : 1 | ||
| }, | ||
| "properties" : { | ||
| "preserves-vector-representation" : true, | ||
| "template-rendering-intent" : "template" | ||
| } | ||
| } |
1 change: 1 addition & 0 deletions
1
Projects/DVDesign/Resources/Assets.xcassets/ServiceLogos/naver.imageset/naver.svg
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 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
14 changes: 14 additions & 0 deletions
14
Projects/DVDesign/Sources/Foundations/Color/Color+Hex.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,14 @@ | ||
| // Copyright © 2026 Devault. All rights reserved | ||
|
|
||
| import SwiftUI | ||
|
|
||
| extension Color { | ||
| /// 0xRRGGBB 형식의 브랜드 컬러 하드코딩(예: 서비스 로고 색상)에 쓴다. | ||
| init(hex: UInt32) { | ||
| self.init( | ||
| red: Double((hex >> 16) & 0xFF) / 255, | ||
| green: Double((hex >> 8) & 0xFF) / 255, | ||
| blue: Double(hex & 0xFF) / 255 | ||
| ) | ||
| } | ||
| } |
57 changes: 57 additions & 0 deletions
57
Projects/DVDesign/Sources/Foundations/ServiceLogo/ServiceLogoCatalog.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,57 @@ | ||
| // Copyright © 2026 Devault. All rights reserved | ||
|
|
||
| import SwiftUI | ||
|
|
||
| public struct DVServiceLogo { | ||
| public let assetName: String | ||
| public let brandColor: Color | ||
| /// `false`면 SVG가 배경과 글리프를 한 path로 합쳐 그린다(예: KakaoTalk의 사각 배경+말풍선). | ||
| /// 이런 에셋은 `.template` 틴트를 걸면 배경까지 단색으로 뭉개지므로 원본 색상 그대로 그려야 한다. | ||
| public let rendersAsTemplate: Bool | ||
| } | ||
|
|
||
| /// `Secret.service` 자유 텍스트를 정규화해 번들된 브랜드 로고를 찾는다. | ||
| /// 매칭되는 항목이 없으면 `nil`을 반환하며, 호출부는 이니셜 플레이스홀더로 폴백해야 한다. | ||
| public enum ServiceLogoCatalog { | ||
|
|
||
| public static func logo(forService service: String?) -> DVServiceLogo? { | ||
| guard let service else { return nil } | ||
| return logosByAlias[normalize(service)] | ||
| } | ||
|
|
||
| /// 영문/숫자만 남기고 비교한다. "Google Cloud"처럼 알려지지 않은 표기는 | ||
| /// `aliases`에 미리 추가해두지 않는 한 조용히 매칭 실패해 이니셜 폴백으로 빠진다. | ||
| private static func normalize(_ raw: String) -> String { | ||
| raw.lowercased().filter { $0.isLetter || $0.isNumber } | ||
| } | ||
|
|
||
| private struct Entry { | ||
| let logo: DVServiceLogo | ||
| let aliases: [String] | ||
| } | ||
|
|
||
| private static let entries: [Entry] = [ | ||
| Entry( | ||
| logo: DVServiceLogo(assetName: "google", brandColor: Color(hex: 0x4285F4), rendersAsTemplate: true), | ||
| aliases: ["google", "gmail", "googleworkspace"] | ||
| ), | ||
| Entry( | ||
| logo: DVServiceLogo(assetName: "github", brandColor: Color(hex: 0x181717), rendersAsTemplate: true), | ||
| aliases: ["github"] | ||
| ), | ||
| Entry( | ||
| logo: DVServiceLogo(assetName: "naver", brandColor: Color(hex: 0x03C75A), rendersAsTemplate: true), | ||
| aliases: ["naver"] | ||
| ), | ||
| Entry( | ||
| logo: DVServiceLogo(assetName: "kakaotalk", brandColor: Color(hex: 0xFFCD00), rendersAsTemplate: false), | ||
| aliases: ["kakao", "kakaotalk"] | ||
| ), | ||
| ] | ||
|
|
||
| private static let logosByAlias: [String: DVServiceLogo] = entries.reduce(into: [:]) { result, entry in | ||
| for alias in entry.aliases { | ||
| result[alias] = entry.logo | ||
| } | ||
| } | ||
| } | ||
91 changes: 91 additions & 0 deletions
91
Projects/DVPresentation/Sources/Dependencies/SecretClient+Preview.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,91 @@ | ||
| // Copyright © 2026 Devault. All rights reserved | ||
|
|
||
| import Foundation | ||
|
|
||
| import DVDomain | ||
|
|
||
| // MARK: - Preview Fixtures | ||
|
|
||
| extension Secret { | ||
| static let preview = Secret( | ||
| id: UUID(), | ||
| name: "GitHub API Key", | ||
| secretType: .apiKeyToken, | ||
| service: "github", | ||
| createdAt: .now, | ||
| updatedAt: .now, | ||
| payload: SecretPayload(encryptedData: Data(), keyTag: "preview", schemaVersion: 1) | ||
| ) | ||
| } | ||
|
|
||
| extension [Secret] { | ||
| /// 아바타 폴백 3단계(로고 매칭 → service 첫 글자 → secretType 아이콘)를 | ||
| /// 타입 6종에 걸쳐 전부 확인하기 위한 프리뷰 픽스처. | ||
| public static let preview: [Secret] = previewFixtures.map(\.secret) | ||
|
|
||
| /// `.project` 컬렉션 필터링용. `Secret`엔 프로젝트 소속 필드가 없어(실제로는 별도 조인 테이블) 프리뷰에서만 매핑을 들고 있는다. | ||
| public static func preview(in projectID: Project.ID) -> [Secret] { | ||
| previewFixtures | ||
| .filter { $0.secret.deletedAt == nil && $0.projectIDs.contains(projectID) } | ||
| .map(\.secret) | ||
| } | ||
|
|
||
| private static let previewFixtures: [(secret: Secret, projectIDs: Set<UUID>)] = { | ||
| let cheerLotID = [Project].preview[0].id | ||
|
|
||
| return [ | ||
| // 1) 로고 매칭 | ||
| (.preview, [cheerLotID]), // GitHub API Key · service: "github" | ||
| (secret(name: "Google 계정", type: .oauth, service: "google"), [cheerLotID]), | ||
| (secret(name: "네이버 계정", type: .oauth, service: "naver"), []), | ||
| (secret(name: "카카오톡 계정", type: .oauth, service: "kakaotalk"), []), | ||
|
|
||
| // 2) 매칭 실패, service 첫 글자로 폴백 | ||
| (secret(name: "Stripe API Key", type: .apiKeyToken, service: "Stripe"), []), | ||
| (secret(name: "CheerLot DB", type: .database, service: "CheerLot"), [cheerLotID]), | ||
|
|
||
| // 3) service 없음, secretType 아이콘으로 폴백 | ||
| (secret(name: "이름 없는 API 키", type: .apiKeyToken, expiresAt: .now.addingTimeInterval(-86_400)), []), | ||
| (secret(name: "사내 SSO", type: .oauth), []), | ||
| (secret(name: "운영 DB", type: .database, expiresAt: .now.addingTimeInterval(3 * 86_400)), []), | ||
| (secret(name: "배포 서버 SSH 키", type: .sshAndCredentials, expiresAt: .now.addingTimeInterval(20 * 86_400)), []), | ||
| (secret(name: ".env 모음", type: .environmentVariableSet), []), | ||
| (secret(name: "라이선스 키", type: .etc), []), | ||
|
|
||
| // 4) Deleted 컬렉션 전용 | ||
| (secret(name: "삭제된 API 키", type: .apiKeyToken, deletedAt: .now), []), | ||
|
|
||
| // 5) Star(liked) 컬렉션 전용 | ||
| (secret(name: "즐겨찾는 API 키", type: .apiKeyToken, liked: true), []), | ||
| ] | ||
| }() | ||
|
|
||
| private static func secret( | ||
| name: String, | ||
| type: SecretType, | ||
| service: String? = nil, | ||
| expiresAt: Date? = nil, | ||
| liked: Bool = false, | ||
| deletedAt: Date? = nil | ||
| ) -> Secret { | ||
| Secret( | ||
| id: UUID(), | ||
| name: name, | ||
| secretType: type, | ||
| service: service, | ||
| expiresAt: expiresAt, | ||
| liked: liked, | ||
| deletedAt: deletedAt, | ||
| createdAt: .now, | ||
| updatedAt: .now, | ||
| payload: SecretPayload(encryptedData: Data(), keyTag: "preview", schemaVersion: 1) | ||
| ) | ||
| } | ||
| } | ||
|
|
||
| extension [Project] { | ||
| public static let preview: [Project] = [ | ||
| Project(id: UUID(), name: "CheerLot", createdAt: .now, updatedAt: .now), | ||
| Project(id: UUID(), name: "Mobile", createdAt: .now, updatedAt: .now), | ||
| ] | ||
| } |
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.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: DevaultProject/Devault-macOS
Length of output: 514
🏁 Script executed:
Repository: DevaultProject/Devault-macOS
Length of output: 5826
정규화 규칙과 구현의 문자 범위를 일치시키세요.
주석은 영문/숫자만 남긴다고 설명하지만
isLetter/isNumber는 Unicode 문자와 숫자도 통과시킵니다. 현재 alias가 영문 ASCII로 정의되어 있다면 영어+숫자로 엄격히 필터링하거나, Unicode alias가 허용된다고 주석과 alias 정책을 함께 명시하세요.수정 예시
📝 Committable suggestion
🤖 Prompt for AI Agents