You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A highly customizable welcome window built for macOS applications. This package supports NSDocument-based apps and offers the ability to override the recent list for other use cases. It's designed to provide a native and elegant welcome experience for your app at launch, with support for new/open document actions, drag-and-drop functionality, and dynamic layouts.
@mainstructCodeEditApp:App{@Environment(\.dismiss)privatevardismissvarbody:someScene{WelcomeWindow(
// Add two action buttons below your icon
actions:{ dismiss inWelcomeButton(
iconName:"circle.fill",
title:"New Text Document",
action:{NSDocumentController.shared.createFileDocumentWithDialog(
configuration:.init(title:"Create new text document"),
onCompletion:{dismiss()})})WelcomeButton(
iconName:"triangle.fill",
title:"Open Text Document or Folder",
action:{NSDocumentController.shared.openDocumentWithDialog(
configuration:.init(canChooseDirectories:true),
onDialogPresented:{dismiss()},
onCancel:{openWindow(id:"welcome")})})},
// Receive files via drag and drop
onDrop:{ url, dismiss inprint("File dropped at: \(url.path)")Task{NSDocumentController.shared.openDocument(at: url, onCompletion:{dismiss()})}})}}