mirror of
https://github.com/sudosylabs/vnidrop.git
synced 2026-08-05 10:29:58 +02:00
refactor(apple): move share to the toolbar and delete to the bottom
Put a share icon in the transfer-details toolbar (opening the QR/share panel) in place of the delete button, drop the now-redundant Share row from the list, and move Delete transfer into the bottom section alongside Stop sharing.
This commit is contained in:
@@ -44,22 +44,19 @@ struct TransferDetailsView: View {
|
||||
count: pendingReceivers + completedReceivers,
|
||||
onTap: model.openReceivers
|
||||
)
|
||||
DetailDestination(
|
||||
title: String(localized: L10n.Transfer.shareTitle),
|
||||
description: String(localized: L10n.Transfer.shareDescription),
|
||||
count: 0,
|
||||
onTap: model.openShare
|
||||
)
|
||||
}
|
||||
|
||||
if isActiveShare {
|
||||
Section {
|
||||
if isActiveShare {
|
||||
Button(role: .destructive) {
|
||||
showStopConfirmation = true
|
||||
} label: {
|
||||
Label(String(localized: L10n.Send.stopSharing), systemSymbol: .stopCircle)
|
||||
}
|
||||
}
|
||||
Button(role: .destructive, action: model.requestDeleteTransfer) {
|
||||
Label(String(localized: L10n.Button.deleteTransfer), systemSymbol: .trash)
|
||||
}
|
||||
}
|
||||
}
|
||||
.formStyle(.grouped)
|
||||
@@ -69,9 +66,10 @@ struct TransferDetailsView: View {
|
||||
#endif
|
||||
.toolbar {
|
||||
ToolbarItem(placement: .primaryAction) {
|
||||
Button(role: .destructive, action: model.requestDeleteTransfer) {
|
||||
Image(systemSymbol: .trash)
|
||||
Button(action: model.openShare) {
|
||||
Label(String(localized: L10n.Transfer.shareTitle), systemSymbol: .squareAndArrowUp)
|
||||
}
|
||||
.help(String(localized: L10n.Transfer.shareTitle))
|
||||
}
|
||||
}
|
||||
.confirmationDialog(
|
||||
|
||||
Reference in New Issue
Block a user