@@ -182,24 +182,9 @@ struct CorkApp: App
182182 setAppBadge ( outdatedPackageNotificationType: outdatedPackageNotificationType)
183183 }
184184 }
185- . fileExporter (
186- isPresented: $isShowingBrewfileExporter,
187- document: StringFile ( initialText: brewfileContents) ,
188- contentType: . homebrewBackup,
189- defaultFilename: defaultBackupDateFormat != . omitted ? String ( localized: " brewfile.export.default-export-name- \( Date ( ) . formatted ( date: defaultBackupDateFormat, time: . omitted) ) " ) : String ( localized: " brewfile.export.default-export-name.empty " )
190- )
191- { result in
192- switch result
193- {
194- case . success( let success) :
195- AppConstants . shared. logger. log ( " Succeeded in exporting: \( success, privacy: . public) " )
196- case . failure( let failure) :
197- AppConstants . shared. logger. error ( " Failed in exporting: \( failure, privacy: . public) " )
198- }
199- }
200185 . fileImporter (
201186 isPresented: $isShowingBrewfileImporter,
202- allowedContentTypes: [ . homebrewBackup ] ,
187+ allowedContentTypes: [ . brewbak ] ,
203188 allowsMultipleSelection: false
204189 )
205190 { result in
@@ -429,6 +414,14 @@ struct CorkApp: App
429414 @ViewBuilder
430415 var backupAndRestoreMenuBarSection : some View
431416 {
417+ Button
418+ {
419+ appState. showSheet ( ofType: . brewfileExport)
420+ } label: {
421+ Label ( " navigation.menu.import-export.export-brewfile " , systemImage: " square.and.arrow.up " )
422+ }
423+
424+ /*
432425 AsyncButton
433426 {
434427 do throws(BrewfileManager.BrewfileDumpingError)
@@ -459,7 +452,8 @@ struct CorkApp: App
459452 Label("navigation.menu.import-export.export-brewfile", systemImage: "square.and.arrow.up")
460453 }
461454 .asyncButtonStyle(.plainStyle)
462-
455+ */
456+
463457 AsyncButton
464458 {
465459 do throws ( BrewfileManager . BrewfileReadingError)
0 commit comments