Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions MacPacker/Features/Settings/GeneralSettingsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ struct GeneralSettingsView: View {
@AppStorage(Keys.rememberRecentArchives) var rememberRecentArchives: Bool = true
@AppStorage(Keys.smartExtraction, store: .macPackerShared) var smartExtraction: Bool = true

@AppStorage(Keys.excludeMacMetadata) var excludeMacMetadata = false
@AppStorage(Keys.requireWindowsCompatibleNames) var requireWindowsCompatibleNames = false

var body: some View {
VStack(spacing: 8) {
HStack(alignment: .top) {
Expand Down Expand Up @@ -119,6 +122,27 @@ struct GeneralSettingsView: View {
.padding(.leading, 8)
.frame(width: 240, alignment: .leading)
}
HStack(alignment: .top) {
Text("Exclude Mac-specific metadata", comment: "Global compression setting label")
.frame(width: 200, alignment: .trailing)
VStack(alignment: .leading, spacing: 4) {
Toggle(isOn: $excludeMacMetadata) { EmptyView() }
.labelsHidden()
.accessibilityIdentifier("settings.excludeMacMetadata")
Toggle(isOn: $requireWindowsCompatibleNames) {
Text("Windows-compatible filenames", comment: "Optional filename validation under the metadata exclusion setting")
}
.accessibilityIdentifier("settings.windowsCompatibleNames")
.help(Text("Stops before saving and lists incompatible or conflicting filenames. Files are never renamed.", comment: "Help for the Windows-compatible filename validation setting"))
.disabled(!excludeMacMetadata)
Text("Leaves out .DS_Store, resource forks and Finder metadata when compressing or saving. Hidden flags and custom folder icons are not preserved.", comment: "Consequences of excluding Mac metadata from archives")
.font(.caption)
.foregroundStyle(.secondary)
.fixedSize(horizontal: false, vertical: true)
}
.padding(.leading, 8)
.frame(width: 240, alignment: .leading)
}
}
.padding()
// Turning it off is a privacy switch, so what was collected goes with it —
Expand Down
Loading