@@ -3,33 +3,34 @@ import GutenbergKit
3
3
4
4
struct EditorView : View {
5
5
private let configuration : EditorConfiguration
6
+ @Environment ( \. dismiss) private var dismiss
6
7
7
8
init ( configuration: EditorConfiguration ) {
8
9
self . configuration = configuration
9
10
}
10
11
11
12
var body : some View {
12
13
_EditorView ( configuration: configuration)
14
+ . navigationBarBackButtonHidden ( true )
13
15
. toolbar {
14
- ToolbarItemGroup ( placement: . topBarLeading) {
15
- Button ( action: { } , label: {
16
+ ToolbarItem ( placement: . topBarLeading) {
17
+ Button ( action: {
18
+ dismiss ( )
19
+ } , label: {
16
20
Image ( systemName: " xmark " )
17
21
} )
18
22
}
23
+
19
24
ToolbarItemGroup ( placement: . topBarTrailing) {
20
25
Button ( action: { } , label: {
21
26
Image ( systemName: " arrow.uturn.backward " )
22
- } )
27
+ } ) . disabled ( true )
23
28
Button ( action: { } , label: {
24
29
Image ( systemName: " arrow.uturn.forward " )
25
30
} ) . disabled ( true )
26
31
}
27
32
28
33
ToolbarItemGroup ( placement: . topBarTrailing) {
29
- Button ( action: { } , label: {
30
- Image ( systemName: " safari " )
31
- } )
32
-
33
34
moreMenu
34
35
}
35
36
}
@@ -40,25 +41,19 @@ struct EditorView: View {
40
41
Section {
41
42
Button ( action: { } , label: {
42
43
Label ( " Code Editor " , systemImage: " curlybraces " )
43
- } )
44
- Button ( action: { } , label: {
45
- Label ( " Outline " , systemImage: " list.bullet.indent " )
46
- } )
44
+ } ) . disabled ( true )
47
45
Button ( action: /*@START_MENU_TOKEN@*/{ } /*@END_MENU_TOKEN@*/, label: {
48
46
Label ( " Preview " , systemImage: " safari " )
49
- } )
50
- }
51
- Section {
47
+ } ) . disabled ( true )
52
48
Button ( action: /*@START_MENU_TOKEN@*/{ } /*@END_MENU_TOKEN@*/, label: {
53
49
Label ( " Revisions (42) " , systemImage: " clock.arrow.circlepath " )
54
- } )
50
+ } ) . disabled ( true )
55
51
Button ( action: /*@START_MENU_TOKEN@*/{ } /*@END_MENU_TOKEN@*/, label: {
56
52
Label ( " Post Settings " , systemImage: " gearshape " )
57
- } )
58
-
53
+ } ) . disabled ( true )
59
54
Button ( action: /*@START_MENU_TOKEN@*/{ } /*@END_MENU_TOKEN@*/, label: {
60
55
Label ( " Help " , systemImage: " questionmark.circle " )
61
- } )
56
+ } ) . disabled ( true )
62
57
}
63
58
Section {
64
59
Text ( " Blocks: 4, Words: 8, Characters: 15 " )
@@ -68,7 +63,6 @@ struct EditorView: View {
68
63
} label: {
69
64
Image ( systemName: " ellipsis " )
70
65
}
71
- . tint ( Color . primary)
72
66
}
73
67
}
74
68
0 commit comments