Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public struct RecordDetailView: View {

private var topBar: some View {
HStack {
RecordBackButton(action: dismiss.callAsFunction)
NavigationBackButton(action: dismiss.callAsFunction)
.disabled(store.isRestoring)
Spacer()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ struct RecordVersionDetailView: View {

private var topBar: some View {
HStack {
RecordBackButton(action: dismiss.callAsFunction)
NavigationBackButton(action: dismiss.callAsFunction)
.disabled(store.isRestoring)
Spacer()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ struct RecordVersionHistoryView: View {

private var topBar: some View {
HStack {
RecordBackButton(action: dismiss.callAsFunction)
NavigationBackButton(action: dismiss.callAsFunction)
Spacer()
}
.padding(.horizontal)
Expand Down Expand Up @@ -264,26 +264,6 @@ struct RecordVersionBadge: View {
}
}

struct RecordBackButton: View {
let action: () -> Void

var body: some View {
if #available(iOS 26.0, *) {
Button(action: action) {
Image(systemName: "chevron.left")
}
.topBarButtonStyle()
} else {
Button(action: action) {
Image(systemName: "chevron.left")
.font(.title3.weight(.semibold))
.frame(width: 28, height: 28)
}
.adaptiveButtonStyle(shape: .circle, color: .surface, glassEffect: .enabled)
}
}
}

private struct VersionDestination: Identifiable {
let version: DevelopmentRecord.Version
var id: String { version.id }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,3 @@ struct CheckBox: View {
.font(font)
}
}

#Preview {
CheckBox(isChecked: true)
}
29 changes: 7 additions & 22 deletions Application/Presentation/HomeTab/Sources/Home/HomeView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import Domain
import PresentationShared

public struct HomeView: View {
@Environment(\.colorScheme) private var colorScheme
@Environment(\.dynamicTypeSize) private var dynamicTypeSize
@Environment(\.openWindow) private var openWindow
@Environment(\.isiOSAppOnMac) private var isiOSAppOnMac
Expand Down Expand Up @@ -341,14 +340,14 @@ public struct HomeView: View {
private func todoCategoryRow(_ item: TodoCategoryItem) -> some View {
NavigationLink(value: HomeRoute.category(item)) {
VStack(spacing: 10) {
RoundedRectangle(cornerRadius: 20)
.fill(categoryIconBackground(item))
Image(systemName: item.symbolName)
.font(.title2.bold())
.frame(width: categoryIconSize, height: categoryIconSize)
.overlay {
Image(systemName: item.symbolName)
.font(.title2.bold())
.foregroundStyle(categoryIconForeground(item))
}
.iconStyle(
color: item.color,
in: RoundedRectangle(cornerRadius: 20)
)
.accessibilityHidden(true)
Text(item.localizedName)
.font(.subheadline)
.foregroundStyle(Color.textSecondary)
Expand Down Expand Up @@ -394,20 +393,6 @@ public struct HomeView: View {
store.send(.view(.tapTodoCategory(todoCategory)))
}
}
private func categoryIconBackground(_ item: TodoCategoryItem) -> Color {
if colorScheme == .dark {
return item.color
}

return item.color.opacity(0.12)
}
private func categoryIconForeground(_ item: TodoCategoryItem) -> Color {
if colorScheme == .dark {
return .white
}

return item.color
}
private func refreshDevelopmentGoals() {
store.send(.view(.fetchData))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2699,6 +2699,23 @@
}
}
},
"settings_account_section" : {
"extractionState" : "manual",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Account"
}
},
"ko" : {
"stringUnit" : {
"state" : "translated",
"value" : "계정"
}
}
}
},
"settings_alert_delete_account_message" : {
"extractionState" : "manual",
"localizations" : {
Expand Down Expand Up @@ -2784,6 +2801,23 @@
}
}
},
"settings_delete_account_subtitle" : {
"extractionState" : "manual",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "All data will be deleted."
}
},
"ko" : {
"stringUnit" : {
"state" : "translated",
"value" : "모든 데이터가 삭제됩니다."
}
}
}
},
"settings_delete_account_action" : {
"extractionState" : "manual",
"localizations" : {
Expand All @@ -2801,6 +2835,40 @@
}
}
},
"settings_app_section" : {
"extractionState" : "manual",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "App Settings"
}
},
"ko" : {
"stringUnit" : {
"state" : "translated",
"value" : "앱 설정"
}
}
}
},
"settings_information_section" : {
"extractionState" : "manual",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Storage & Information"
}
},
"ko" : {
"stringUnit" : {
"state" : "translated",
"value" : "저장 공간 및 정보"
}
}
}
},
"settings_join_beta" : {
"extractionState" : "manual",
"localizations" : {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
//
// NavigationBackButton.swift
// PresentationShared
//
// Created by opfic on 9/24/26.
//

import SwiftUI

public struct NavigationBackButton: View {
private let action: () -> Void

public init(action: @escaping () -> Void) {
self.action = action
}

public var body: some View {
if #available(iOS 26.0, *) {
Button(action: action) {
Image(systemName: "chevron.left")
}
.topBarButtonStyle()
} else {
Button(action: action) {
Image(systemName: "chevron.left")
.font(.title3.weight(.semibold))
.frame(width: 28, height: 28)
}
.adaptiveButtonStyle(shape: .circle, color: .surface, glassEffect: .enabled)
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
//
// View+IconStyle.swift
// PresentationShared
//
// Created by opfic on 9/24/26.
//

import SwiftUI

public extension View {
func iconStyle<S: Shape>(
color: Color,
in shape: S
) -> some View {
modifier(IconStyleModifier(color: color, shape: shape))
}
}

private struct IconStyleModifier<S: Shape>: ViewModifier {
@Environment(\.colorScheme) private var colorScheme
let color: Color
let shape: S

func body(content: Content) -> some View {
content
.foregroundStyle(colorScheme == .dark ? Color.white : color)
.background(
colorScheme == .dark ? color : color.opacity(0.12),
in: shape
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,8 @@ struct GoalSummaryCard: View {
VStack(spacing: 8) {
Image(systemName: symbol)
.font(.subheadline.weight(.semibold))
.foregroundStyle(color)
.frame(width: 36, height: 36)
.background(Color.surface, in: .circle)
.iconStyle(color: color, in: Circle())
Text(title, bundle: PresentationResources.bundle)
.font(.caption)
.foregroundStyle(Color.textSecondary)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,22 +91,12 @@ public struct ProfileView: View {
Text("nav_profile", bundle: PresentationResources.bundle)
.font(.largeTitle.bold())
Spacer()
if #available(iOS 26.0, *) {
Button {
path.append(.settings)
} label: {
Image(systemName: "gearshape")
}
.topBarButtonStyle()
} else {
Button {
path.append(.settings)
} label: {
Image(systemName: "gearshape")
.foregroundStyle(Color.textTertiary)
}
.adaptiveButtonStyle()
Button {
path.append(.settings)
} label: {
Image(systemName: "gearshape")
}
.topBarButtonStyle()
}
}
.padding(.bottom, 8)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,11 @@ private struct RecentTodoCard: View {
HStack(spacing: 12) {
Image(systemName: category.symbolName)
.font(.title3.weight(.semibold))
.foregroundStyle(category.color)
.frame(width: iconSize, height: iconSize)
.background(category.color.opacity(0.1), in: RoundedRectangle(cornerRadius: 12))
.iconStyle(
color: category.color,
in: RoundedRectangle(cornerRadius: 12)
)
.accessibilityHidden(true)

VStack(alignment: .leading, spacing: 8) {
Expand Down
Loading
Loading