File tree Expand file tree Collapse file tree
DevLogApp/Sources/Resource
DevLogPresentation/Sources/Home Expand file tree Collapse file tree Original file line number Diff line number Diff line change 26892689 }
26902690 }
26912691 },
2692+ "todo_write" : {
2693+ "extractionState" : "manual",
2694+ "localizations" : {
2695+ "en" : {
2696+ "stringUnit" : {
2697+ "state" : "translated",
2698+ "value" : "Write"
2699+ }
2700+ },
2701+ "ko" : {
2702+ "stringUnit" : {
2703+ "state" : "translated",
2704+ "value" : "작성"
2705+ }
2706+ }
2707+ }
2708+ },
26922709 "todo_editor_description_optional" : {
26932710 "extractionState" : "manual",
26942711 "localizations" : {
Original file line number Diff line number Diff line change @@ -106,32 +106,27 @@ struct TodoEditorView: View {
106106 }
107107
108108 private var tabViewSelector : some View {
109- VStack ( spacing: 0 ) {
110- HStack ( spacing: 0 ) {
111- Button ( action: {
112- viewModel. send ( . setTabViewTag( . editor) )
113- field = . content
114- } ) {
115- Text ( String ( localized: " todo_edit " ) )
116- . frame ( maxWidth: . infinity)
117- . foregroundStyle (
118- viewModel. state. tabViewTag == . editor ? Color . primary : Color . secondary
119- )
120- }
121- Divider ( )
122- Button ( action: {
123- transitionToPreview ( )
124- } ) {
125- Text ( String ( localized: " todo_preview " ) )
126- . frame ( maxWidth: . infinity)
127- . foregroundStyle (
128- viewModel. state. tabViewTag == . preview ? Color . primary : Color . gray
129- )
109+ Picker (
110+ " " ,
111+ selection: Binding (
112+ get: { viewModel. state. tabViewTag } ,
113+ set: { tag in
114+ if tag == . editor {
115+ viewModel. send ( . setTabViewTag( . editor) )
116+ field = . content
117+ } else {
118+ transitionToPreview ( )
119+ }
130120 }
131- }
132- . padding ( . vertical, 10 )
133- . background ( Color ( . systemBackground) )
121+ )
122+ ) {
123+ Text ( String ( localized: " todo_write " ) )
124+ . tag ( TodoEditorViewModel . Tag. editor)
125+ Text ( String ( localized: " todo_preview " ) )
126+ . tag ( TodoEditorViewModel . Tag. preview)
134127 }
128+ . pickerStyle ( . segmented)
129+ . padding ( . horizontal)
135130 }
136131
137132 private var tabView : some View {
You can’t perform that action at this time.
0 commit comments