Skip to content

Commit

Permalink
Add bundle export feature
Browse files Browse the repository at this point in the history
  • Loading branch information
alienator88 committed Nov 20, 2024
1 parent bd5cb36 commit 305da1b
Show file tree
Hide file tree
Showing 5 changed files with 611 additions and 552 deletions.
27 changes: 15 additions & 12 deletions Pearcleaner/Logic/AppCommands.swift
Original file line number Diff line number Diff line change
Expand Up @@ -93,35 +93,38 @@ struct AppCommands: Commands {
}
.keyboardShortcut("r", modifiers: .command)

// Button
// {
// if !appState.appInfo.bundleIdentifier.isEmpty {
// appState.showConditionBuilder = true
// }
// } label: {
// Label("Condition Builder", systemImage: "hammer")
// }
// .keyboardShortcut("b", modifiers: .command)
Button
{
if !appState.selectedItems.isEmpty {
createTarArchive(appState: appState)
}
} label: {
Label("Bundle Files...", systemImage: "archivebox")
}
.keyboardShortcut("b", modifiers: .command)
.disabled(appState.selectedItems.isEmpty)

Button
{
if !appState.appInfo.bundleIdentifier.isEmpty {
saveURLsToFile(urls: appState.selectedItems, appState: appState)
saveURLsToFile(appState: appState)
}
} label: {
Label("Export File Paths", systemImage: "square.and.arrow.up")
Label("Export File Paths...", systemImage: "square.and.arrow.up")
}
.keyboardShortcut("e", modifiers: .command)
.disabled(appState.selectedItems.isEmpty)

Button
{
if !appState.appInfo.bundleIdentifier.isEmpty {
saveURLsToFile(urls: appState.selectedItems, appState: appState, copy: true)
saveURLsToFile(appState: appState, copy: true)
}
} label: {
Label("Copy File Paths", systemImage: "square.and.arrow.up")
}
.keyboardShortcut("c", modifiers: [.command, .option])
.disabled(appState.selectedItems.isEmpty)


}
Expand Down
Loading

0 comments on commit 305da1b

Please sign in to comment.