Add app folder notice. (#704)

This commit is contained in:
Max Goedjen
2025-09-14 01:43:00 -07:00
committed by GitHub
parent f76766a9d5
commit 5d5ae5bab4
2 changed files with 31 additions and 9 deletions

View File

@@ -167,17 +167,17 @@ extension ContentView {
.foregroundColor(.white)
})
.buttonStyle(ToolbarStatusButtonStyle(color: .orange))
.popover(isPresented: $showingAppPathNotice, attachmentAnchor: attachmentAnchor, arrowEdge: .bottom) {
VStack {
Image(systemName: "exclamationmark.triangle")
.resizable()
.aspectRatio(contentMode: .fit)
.frame(width: 64)
Text(.appNotInApplicationsNoticeDetailDescription)
.frame(maxWidth: 300)
.confirmationDialog(.appNotInApplicationsNoticeTitle, isPresented: $showingAppPathNotice) {
Button(.appNotInApplicationsNoticeCancelButton, role: .cancel) {
}
.padding()
Button(.appNotInApplicationsNoticeQuitButton) {
NSWorkspace.shared.selectFile(Bundle.main.bundlePath, inFileViewerRootedAtPath: Bundle.main.bundlePath)
NSApplication.shared.terminate(nil)
}
} message: {
Text(.appNotInApplicationsNoticeDetailDescription)
}
.dialogIcon(Image(systemName: "folder.fill.badge.questionmark"))
}
}