@@ -181,77 +181,131 @@ private struct InfoSheetView: View {
181181 private let calendar = Calendar . current
182182
183183 var body : some View {
184- NavigationStack {
185- List {
186- Section ( String ( localized: " todo_options_section " , bundle: PresentationResources . bundle) ) {
187- HStack {
188- Text ( String ( localized: " todo_category " , bundle: PresentationResources . bundle) )
189- Spacer ( )
184+ ScrollView {
185+ LazyVStack ( alignment: . leading, spacing: 24 ) {
186+ VStack ( alignment: . leading, spacing: 0 ) {
187+ optionRow (
188+ systemImage: " tag.fill " ,
189+ color: Color . accent,
190+ title: String ( localized: " todo_category " , bundle: PresentationResources . bundle)
191+ ) {
190192 Text ( TodoCategoryItem ( from: todo. category) . localizedName)
191- . foregroundStyle ( . secondary)
193+ . foregroundStyle ( Color . accent)
194+ . lineLimit ( 1 )
192195 }
193196
194- statusRow (
195- title: String ( localized: " todo_completed " , bundle: PresentationResources . bundle) ,
196- systemImage: todo. isCompleted ? " checkmark.circle.fill " : " circle " ,
197- color: todo. isCompleted ? . green : . secondary
198- )
197+ Divider ( )
199198
200- statusRow (
201- title: String ( localized: " todo_pinned " , bundle: PresentationResources . bundle) ,
202- systemImage: todo. isPinned ? " star.fill " : " star " ,
203- color: todo. isPinned ? . orange : . secondary
204- )
199+ optionRow (
200+ systemImage: " circle " ,
201+ color: Color . textSecondary,
202+ title: String ( localized: " todo_completed " , bundle: PresentationResources . bundle)
203+ ) {
204+ Image ( systemName: todo. isCompleted ? " checkmark.circle.fill " : " circle " )
205+ . foregroundStyle ( todo. isCompleted ? Color . accent : Color . textTertiary)
206+ }
207+
208+ Divider ( )
205209
206- HStack {
207- Text ( String ( localized: " todo_due_date " , bundle: PresentationResources . bundle) )
210+ optionRow (
211+ systemImage: " star.fill " ,
212+ color: Color . orange,
213+ title: String ( localized: " todo_pinned " , bundle: PresentationResources . bundle)
214+ ) {
215+ Image ( systemName: todo. isPinned ? " star.fill " : " star " )
216+ . foregroundStyle ( todo. isPinned ? Color . orange : Color . textTertiary)
217+ }
208218
209- Spacer ( )
219+ Divider ( )
210220
221+ optionRow (
222+ systemImage: " calendar " ,
223+ color: Color . textSecondary,
224+ title: String ( localized: " todo_due_date " , bundle: PresentationResources . bundle)
225+ ) {
211226 if let dueDate = todo. dueDate {
212227 Tag ( dueDateText ( for: dueDate) , isEditing: false )
213- . padding ( . vertical, - 4 )
214228 } else {
215229 Text ( String ( localized: " todo_none " , bundle: PresentationResources . bundle) )
216- . foregroundStyle ( . secondary )
230+ . foregroundStyle ( Color . textSecondary )
217231 }
218232 }
219233 }
234+ . background ( Color . surface)
235+ . clipShape ( . rect( cornerRadius: 16 ) )
220236
221- Section ( String ( localized: " todo_tags " , bundle: PresentationResources . bundle) ) {
222- if todo. tags. isEmpty {
223- Text ( String ( localized: " todo_no_tags " , bundle: PresentationResources . bundle) )
224- . foregroundStyle ( . secondary)
225- . padding ( . vertical, 4 )
226- } else {
227- TagList ( todo. tags)
237+ VStack ( alignment: . leading, spacing: 12 ) {
238+ Text ( String ( localized: " todo_tags " , bundle: PresentationResources . bundle) )
239+ . font ( . headline)
240+ . padding ( . horizontal, 16 )
241+
242+ Group {
243+ if todo. tags. isEmpty {
244+ Text ( String ( localized: " todo_no_tags " , bundle: PresentationResources . bundle) )
245+ . foregroundStyle ( Color . textSecondary)
246+ } else {
247+ TagList ( todo. tags, verticalSpacing: 4 , horizontalSpacing: 4 )
248+ }
228249 }
250+ . padding ( 16 )
251+ . frame ( maxWidth: . infinity, alignment: . leading)
252+ . background ( Color . surface)
253+ . clipShape ( . rect( cornerRadius: 16 ) )
229254 }
230255 }
231- . navigationTitle ( String ( localized: " todo_details " , bundle: PresentationResources . bundle) )
232- . navigationBarTitleDisplayMode ( . inline)
233- . toolbar {
234- ToolbarLeadingButton {
256+ . padding ( . horizontal, 16 )
257+ . padding ( . bottom, 16 )
258+ }
259+ . safeAreaInset ( edge: . top, spacing: 0 ) { topBar }
260+ . background ( Color . appBackground. ignoresSafeArea ( ) )
261+ . presentationDragIndicator ( . visible)
262+ }
263+
264+ private var topBar : some View {
265+ ZStack {
266+ Text ( String ( localized: " todo_details " , bundle: PresentationResources . bundle) )
267+ . font ( . headline)
268+ HStack {
269+ Button {
235270 onClose ( )
271+ } label: {
272+ if #available( iOS 26 . 0 , * ) {
273+ Image ( systemName: " xmark " )
274+ } else {
275+ Text ( String ( localized: " common_close " , bundle: PresentationResources . bundle) )
276+ }
236277 }
278+ . topBarButtonStyle ( )
279+ Spacer ( )
237280 }
238281 }
282+ . padding ( . horizontal, 16 )
283+ . padding ( . vertical, 12 )
284+ . background ( Color . appBackground, ignoresSafeAreaEdges: . top)
239285 }
240286
241- @ViewBuilder
242- private func statusRow(
243- title: String ,
287+ private func optionRow< Trailing: View > (
244288 systemImage: String ,
245- color: Color
289+ color: Color ,
290+ title: String ,
291+ @ViewBuilder trailing: ( ) -> Trailing
246292 ) -> some View {
247- HStack {
293+ HStack ( spacing: 12 ) {
294+ Image ( systemName: systemImage)
295+ . font ( . title3)
296+ . foregroundStyle ( color)
297+ . frame ( width: 28 , height: 28 )
298+
248299 Text ( title)
300+ . font ( . headline)
301+ . layoutPriority ( 1 )
249302
250- Spacer ( )
303+ Spacer ( minLength : 8 )
251304
252- Image ( systemName: systemImage)
253- . foregroundStyle ( color)
305+ trailing ( )
254306 }
307+ . padding ( . horizontal, 16 )
308+ . padding ( . vertical, 12 )
255309 }
256310
257311 private func dueDateText( for dueDate: Date ) -> String {
0 commit comments