@@ -11,23 +11,26 @@ import Preferences
11
11
import About
12
12
import WelcomeModule
13
13
import ExtensionsStore
14
+ import Feedback
15
+ import CodeEditSymbols
14
16
15
- class CodeEditApplication : NSApplication {
17
+ final class CodeEditApplication : NSApplication {
16
18
let strongDelegate = AppDelegate ( )
17
19
18
20
override init ( ) {
19
21
super. init ( )
20
22
self . delegate = strongDelegate
21
23
}
22
24
25
+ @available ( * , unavailable)
23
26
required init ? ( coder: NSCoder ) {
24
27
fatalError ( " init(coder:) has not been implemented " )
25
28
}
26
29
27
30
}
28
31
29
32
@NSApplicationMain
30
- class AppDelegate : NSObject , NSApplicationDelegate , ObservableObject {
33
+ final class AppDelegate : NSObject , NSApplicationDelegate , ObservableObject {
31
34
func applicationWillFinishLaunching( _ notification: Notification ) {
32
35
_ = CodeEditDocumentController . shared
33
36
}
@@ -54,12 +57,10 @@ class AppDelegate: NSObject, NSApplicationDelegate, ObservableObject {
54
57
}
55
58
}
56
59
57
- DispatchQueue ( label: " extensions.preload " ) . async {
58
- do {
59
- try ExtensionsManager . shared? . preload ( )
60
- } catch let error {
61
- print ( error)
62
- }
60
+ do {
61
+ try ExtensionsManager . shared? . preload ( )
62
+ } catch let error {
63
+ print ( error)
63
64
}
64
65
}
65
66
@@ -145,9 +146,12 @@ class AppDelegate: NSObject, NSApplicationDelegate, ObservableObject {
145
146
}
146
147
147
148
} else {
148
- CodeEditDocumentController . shared. openDocument { _, _ in
149
+ windowController. window? . close ( )
150
+ CodeEditDocumentController . shared. openDocument ( onCompletion: { _, _ in
149
151
opened ( )
150
- }
152
+ } , onCancel: {
153
+ self . openWelcome ( self )
154
+ } )
151
155
}
152
156
} ,
153
157
newDocument: {
@@ -167,6 +171,10 @@ class AppDelegate: NSObject, NSApplicationDelegate, ObservableObject {
167
171
AboutView ( ) . showWindow ( width: 530 , height: 220 )
168
172
}
169
173
174
+ @IBAction func openFeedback( _ sender: Any ) {
175
+ FeedbackView ( ) . showWindow ( )
176
+ }
177
+
170
178
// MARK: - Preferences
171
179
172
180
private lazy var preferencesWindowController = PreferencesWindowController (
@@ -183,7 +191,7 @@ class AppDelegate: NSObject, NSApplicationDelegate, ObservableObject {
183
191
title: " Accounts " ,
184
192
toolbarIcon: NSImage ( systemSymbolName: " at " , accessibilityDescription: nil ) !
185
193
) {
186
- PreferencesPlaceholderView ( )
194
+ PreferenceAccountsView ( )
187
195
} ,
188
196
Preferences . Pane (
189
197
identifier: Preferences . PaneIdentifier ( " Behaviors " ) ,
@@ -231,9 +239,9 @@ class AppDelegate: NSObject, NSApplicationDelegate, ObservableObject {
231
239
Preferences . Pane (
232
240
identifier: Preferences . PaneIdentifier ( " SourceControl " ) ,
233
241
title: " Source Control " ,
234
- toolbarIcon: NSImage ( systemSymbolName : " square.stack " , accessibilityDescription : nil ) !
242
+ toolbarIcon: NSImage . vault
235
243
) {
236
- PreferencesPlaceholderView ( )
244
+ PreferenceSourceControlView ( )
237
245
} ,
238
246
Preferences . Pane (
239
247
identifier: Preferences . PaneIdentifier ( " Components " ) ,
0 commit comments