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
9 changes: 9 additions & 0 deletions Localization/Localizations/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -1328,6 +1328,9 @@
}
}
}
},
"Are you sure you want to resume current tasks?" : {

},
"Availability" : {
"localizations" : {
Expand Down Expand Up @@ -1932,6 +1935,9 @@
}
}
}
},
"Confirm Resume Current" : {

},
"Connected Leeches" : {
"localizations" : {
Expand Down Expand Up @@ -6145,6 +6151,9 @@
}
}
}
},
"Resume Current Tasks" : {

},
"Resume Task" : {
"localizations" : {
Expand Down
1 change: 1 addition & 0 deletions qBitControl.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -875,6 +875,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = qBitControl/qBitControl.entitlements;
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 18;
DEVELOPMENT_ASSET_PATHS = "";
Expand Down
10 changes: 0 additions & 10 deletions qBitControl.xcworkspace/contents.xcworkspacedata

This file was deleted.

8 changes: 0 additions & 8 deletions qBitControl.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist

This file was deleted.

4 changes: 2 additions & 2 deletions qBitControl/Models/AlertIdentifier.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import Foundation

struct AlertIdentifier: Identifiable {
enum Choice {
case resumeAll, pauseAll
case resumeCurrent, resumeAll, pauseAll
}

var id: Choice
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ struct TorrentListDefaultToolbar: ToolbarContent {
}

Section {
Button {
viewModel.alertIdentifier = AlertIdentifier(id: .resumeCurrent)
} label: {
Image(systemName: "play")
.rotationEffect(.degrees(180))
Text("Resume Current Tasks")
}

Button {
viewModel.alertIdentifier = AlertIdentifier(id: .resumeAll)
} label: {
Expand Down Expand Up @@ -77,6 +85,10 @@ struct TorrentListDefaultToolbar: ToolbarContent {
Image(systemName: "ellipsis.circle")
}.alert(item: $viewModel.alertIdentifier) { alert in
switch(alert.id) {
case .resumeCurrent:
return Alert(title: Text("Confirm Resume Current"), message: Text("Are you sure you want to resume current tasks?"), primaryButton: .default(Text("Resume")) {
qBittorrent.resumeTorrents(hashes: viewModel.filteredTorrents.map { $0.hash })
}, secondaryButton: .cancel())
case .resumeAll:
return Alert(title: Text("Confirm Resume All"), message: Text("Are you sure you want to resume all tasks?"), primaryButton: .default(Text("Resume")) {
qBittorrent.resumeAllTorrents()
Expand Down