Skip to content

Commit cbafedb

Browse files
authored
설정 기본 화면에 Figma 디자인을 적용한다 (#919)
* ui: 설정 기본 화면 카드 구성 * chore: 불필요 코드 제거 * refactor: NavigationBackButton 공통화 * ui: 설정 화면 탑바와 카드 표현 정리 * ui: 프로필 설정 탑바 버튼 표현 통일 * ui: 탑바 상단 패딩 제거 * refactor: iconStyle 공통화
1 parent 1499dbb commit cbafedb

15 files changed

Lines changed: 537 additions & 148 deletions

File tree

‎Application/Presentation/Development/Sources/Record/Detail/RecordDetailView.swift‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public struct RecordDetailView: View {
9595

9696
private var topBar: some View {
9797
HStack {
98-
RecordBackButton(action: dismiss.callAsFunction)
98+
NavigationBackButton(action: dismiss.callAsFunction)
9999
.disabled(store.isRestoring)
100100
Spacer()
101101
}

‎Application/Presentation/Development/Sources/Record/History/RecordVersionDetailView.swift‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ struct RecordVersionDetailView: View {
5151

5252
private var topBar: some View {
5353
HStack {
54-
RecordBackButton(action: dismiss.callAsFunction)
54+
NavigationBackButton(action: dismiss.callAsFunction)
5555
.disabled(store.isRestoring)
5656
Spacer()
5757
}

‎Application/Presentation/Development/Sources/Record/History/RecordVersionHistoryView.swift‎

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ struct RecordVersionHistoryView: View {
4747

4848
private var topBar: some View {
4949
HStack {
50-
RecordBackButton(action: dismiss.callAsFunction)
50+
NavigationBackButton(action: dismiss.callAsFunction)
5151
Spacer()
5252
}
5353
.padding(.horizontal)
@@ -264,26 +264,6 @@ struct RecordVersionBadge: View {
264264
}
265265
}
266266

267-
struct RecordBackButton: View {
268-
let action: () -> Void
269-
270-
var body: some View {
271-
if #available(iOS 26.0, *) {
272-
Button(action: action) {
273-
Image(systemName: "chevron.left")
274-
}
275-
.topBarButtonStyle()
276-
} else {
277-
Button(action: action) {
278-
Image(systemName: "chevron.left")
279-
.font(.title3.weight(.semibold))
280-
.frame(width: 28, height: 28)
281-
}
282-
.adaptiveButtonStyle(shape: .circle, color: .surface, glassEffect: .enabled)
283-
}
284-
}
285-
}
286-
287267
private struct VersionDestination: Identifiable {
288268
let version: DevelopmentRecord.Version
289269
var id: String { version.id }

‎Application/Presentation/HomeTab/Sources/Category/CheckBox.swift‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,3 @@ struct CheckBox: View {
3030
.font(font)
3131
}
3232
}
33-
34-
#Preview {
35-
CheckBox(isChecked: true)
36-
}

‎Application/Presentation/HomeTab/Sources/Home/HomeView.swift‎

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import Domain
1212
import PresentationShared
1313

1414
public struct HomeView: View {
15-
@Environment(\.colorScheme) private var colorScheme
1615
@Environment(\.dynamicTypeSize) private var dynamicTypeSize
1716
@Environment(\.openWindow) private var openWindow
1817
@Environment(\.isiOSAppOnMac) private var isiOSAppOnMac
@@ -341,14 +340,14 @@ public struct HomeView: View {
341340
private func todoCategoryRow(_ item: TodoCategoryItem) -> some View {
342341
NavigationLink(value: HomeRoute.category(item)) {
343342
VStack(spacing: 10) {
344-
RoundedRectangle(cornerRadius: 20)
345-
.fill(categoryIconBackground(item))
343+
Image(systemName: item.symbolName)
344+
.font(.title2.bold())
346345
.frame(width: categoryIconSize, height: categoryIconSize)
347-
.overlay {
348-
Image(systemName: item.symbolName)
349-
.font(.title2.bold())
350-
.foregroundStyle(categoryIconForeground(item))
351-
}
346+
.iconStyle(
347+
color: item.color,
348+
in: RoundedRectangle(cornerRadius: 20)
349+
)
350+
.accessibilityHidden(true)
352351
Text(item.localizedName)
353352
.font(.subheadline)
354353
.foregroundStyle(Color.textSecondary)
@@ -394,20 +393,6 @@ public struct HomeView: View {
394393
store.send(.view(.tapTodoCategory(todoCategory)))
395394
}
396395
}
397-
private func categoryIconBackground(_ item: TodoCategoryItem) -> Color {
398-
if colorScheme == .dark {
399-
return item.color
400-
}
401-
402-
return item.color.opacity(0.12)
403-
}
404-
private func categoryIconForeground(_ item: TodoCategoryItem) -> Color {
405-
if colorScheme == .dark {
406-
return .white
407-
}
408-
409-
return item.color
410-
}
411396
private func refreshDevelopmentGoals() {
412397
store.send(.view(.fetchData))
413398
}

‎Application/Presentation/PresentationShared/Resources/Localizable.xcstrings‎

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2699,6 +2699,23 @@
26992699
}
27002700
}
27012701
},
2702+
"settings_account_section" : {
2703+
"extractionState" : "manual",
2704+
"localizations" : {
2705+
"en" : {
2706+
"stringUnit" : {
2707+
"state" : "translated",
2708+
"value" : "Account"
2709+
}
2710+
},
2711+
"ko" : {
2712+
"stringUnit" : {
2713+
"state" : "translated",
2714+
"value" : "계정"
2715+
}
2716+
}
2717+
}
2718+
},
27022719
"settings_alert_delete_account_message" : {
27032720
"extractionState" : "manual",
27042721
"localizations" : {
@@ -2784,6 +2801,23 @@
27842801
}
27852802
}
27862803
},
2804+
"settings_delete_account_subtitle" : {
2805+
"extractionState" : "manual",
2806+
"localizations" : {
2807+
"en" : {
2808+
"stringUnit" : {
2809+
"state" : "translated",
2810+
"value" : "All data will be deleted."
2811+
}
2812+
},
2813+
"ko" : {
2814+
"stringUnit" : {
2815+
"state" : "translated",
2816+
"value" : "모든 데이터가 삭제됩니다."
2817+
}
2818+
}
2819+
}
2820+
},
27872821
"settings_delete_account_action" : {
27882822
"extractionState" : "manual",
27892823
"localizations" : {
@@ -2801,6 +2835,40 @@
28012835
}
28022836
}
28032837
},
2838+
"settings_app_section" : {
2839+
"extractionState" : "manual",
2840+
"localizations" : {
2841+
"en" : {
2842+
"stringUnit" : {
2843+
"state" : "translated",
2844+
"value" : "App Settings"
2845+
}
2846+
},
2847+
"ko" : {
2848+
"stringUnit" : {
2849+
"state" : "translated",
2850+
"value" : "앱 설정"
2851+
}
2852+
}
2853+
}
2854+
},
2855+
"settings_information_section" : {
2856+
"extractionState" : "manual",
2857+
"localizations" : {
2858+
"en" : {
2859+
"stringUnit" : {
2860+
"state" : "translated",
2861+
"value" : "Storage & Information"
2862+
}
2863+
},
2864+
"ko" : {
2865+
"stringUnit" : {
2866+
"state" : "translated",
2867+
"value" : "저장 공간 및 정보"
2868+
}
2869+
}
2870+
}
2871+
},
28042872
"settings_join_beta" : {
28052873
"extractionState" : "manual",
28062874
"localizations" : {
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
//
2+
// NavigationBackButton.swift
3+
// PresentationShared
4+
//
5+
// Created by opfic on 9/24/26.
6+
//
7+
8+
import SwiftUI
9+
10+
public struct NavigationBackButton: View {
11+
private let action: () -> Void
12+
13+
public init(action: @escaping () -> Void) {
14+
self.action = action
15+
}
16+
17+
public var body: some View {
18+
if #available(iOS 26.0, *) {
19+
Button(action: action) {
20+
Image(systemName: "chevron.left")
21+
}
22+
.topBarButtonStyle()
23+
} else {
24+
Button(action: action) {
25+
Image(systemName: "chevron.left")
26+
.font(.title3.weight(.semibold))
27+
.frame(width: 28, height: 28)
28+
}
29+
.adaptiveButtonStyle(shape: .circle, color: .surface, glassEffect: .enabled)
30+
}
31+
}
32+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
//
2+
// View+IconStyle.swift
3+
// PresentationShared
4+
//
5+
// Created by opfic on 9/24/26.
6+
//
7+
8+
import SwiftUI
9+
10+
public extension View {
11+
func iconStyle<S: Shape>(
12+
color: Color,
13+
in shape: S
14+
) -> some View {
15+
modifier(IconStyleModifier(color: color, shape: shape))
16+
}
17+
}
18+
19+
private struct IconStyleModifier<S: Shape>: ViewModifier {
20+
@Environment(\.colorScheme) private var colorScheme
21+
let color: Color
22+
let shape: S
23+
24+
func body(content: Content) -> some View {
25+
content
26+
.foregroundStyle(colorScheme == .dark ? Color.white : color)
27+
.background(
28+
colorScheme == .dark ? color : color.opacity(0.12),
29+
in: shape
30+
)
31+
}
32+
}

‎Application/Presentation/ProfileTab/Sources/Profile/GoalSummaryCard.swift‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,8 @@ struct GoalSummaryCard: View {
102102
VStack(spacing: 8) {
103103
Image(systemName: symbol)
104104
.font(.subheadline.weight(.semibold))
105-
.foregroundStyle(color)
106105
.frame(width: 36, height: 36)
107-
.background(Color.surface, in: .circle)
106+
.iconStyle(color: color, in: Circle())
108107
Text(title, bundle: PresentationResources.bundle)
109108
.font(.caption)
110109
.foregroundStyle(Color.textSecondary)

‎Application/Presentation/ProfileTab/Sources/Profile/ProfileView.swift‎

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -91,22 +91,12 @@ public struct ProfileView: View {
9191
Text("nav_profile", bundle: PresentationResources.bundle)
9292
.font(.largeTitle.bold())
9393
Spacer()
94-
if #available(iOS 26.0, *) {
95-
Button {
96-
path.append(.settings)
97-
} label: {
98-
Image(systemName: "gearshape")
99-
}
100-
.topBarButtonStyle()
101-
} else {
102-
Button {
103-
path.append(.settings)
104-
} label: {
105-
Image(systemName: "gearshape")
106-
.foregroundStyle(Color.textTertiary)
107-
}
108-
.adaptiveButtonStyle()
94+
Button {
95+
path.append(.settings)
96+
} label: {
97+
Image(systemName: "gearshape")
10998
}
99+
.topBarButtonStyle()
110100
}
111101
}
112102
.padding(.bottom, 8)

0 commit comments

Comments
 (0)