diff options
| author | Fuwn <[email protected]> | 2025-06-18 05:14:57 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-06-18 05:14:57 -0700 |
| commit | 5b2948698250b3000033ff284696b5d634c20f1b (patch) | |
| tree | ec32b930f537662d090d6e812e8662d6ebbccc29 | |
| parent | feat: Development commit (diff) | |
| download | sora-testing-5b2948698250b3000033ff284696b5d634c20f1b.tar.xz sora-testing-5b2948698250b3000033ff284696b5d634c20f1b.zip | |
feat: Development commit
| -rw-r--r-- | Sora/Views/Generic/GenericListView.swift | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/Sora/Views/Generic/GenericListView.swift b/Sora/Views/Generic/GenericListView.swift index a46c392..c021c76 100644 --- a/Sora/Views/Generic/GenericListView.swift +++ b/Sora/Views/Generic/GenericListView.swift @@ -176,9 +176,12 @@ struct GenericListView<T: Identifiable & Hashable & GenericItem>: View { // swi #if os(macOS) ToolbarItem { - Button(action: { - isShowingRemoveAllConfirmation = true - }) { + Button( + role: .destructive, + action: { + isShowingRemoveAllConfirmation = true + } + ) { Label("Remove All", systemImage: "trash") } } @@ -229,22 +232,27 @@ struct GenericListView<T: Identifiable & Hashable & GenericItem>: View { // swi Label("Provider", systemImage: "globe") } - Button(action: { - isShowingRemoveAllConfirmation = true - }) { + Button( + role: .destructive, + action: { + isShowingRemoveAllConfirmation = true + } + ) { Label("Remove All", systemImage: "trash") } } } #endif } - .confirmationDialog( + .alert( removeAllMessage, isPresented: $isShowingRemoveAllConfirmation ) { Button(removeAllButtonText) { removeAllAction() } + + Button("Cancel", role: .cancel) { () } } .alert( "New Collection", |