stub in edit labels modal
This commit is contained in:
@ -68,7 +68,7 @@ struct GridCardNavigationLink: View {
|
||||
viewModel.itemAppeared(item: item, searchQuery: searchQuery, dataService: dataService)
|
||||
}
|
||||
}
|
||||
.aspectRatio(2.1, contentMode: .fill)
|
||||
.aspectRatio(1.8, contentMode: .fill)
|
||||
.scaleEffect(scale)
|
||||
}
|
||||
}
|
||||
|
||||
@ -167,6 +167,9 @@ import Views
|
||||
}
|
||||
}
|
||||
}
|
||||
.sheet(item: $viewModel.itemUnderLabelEdit, onDismiss: { print("edit label modal dismissed") }) { item in
|
||||
Text("editing item with id: \(item.id)")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -323,6 +326,8 @@ import Views
|
||||
case .delete:
|
||||
itemToRemove = item
|
||||
confirmationShown = true
|
||||
case .editLabels:
|
||||
viewModel.itemUnderLabelEdit = item
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -14,6 +14,7 @@ final class HomeFeedViewModel: ObservableObject {
|
||||
@Published var items = [FeedItem]()
|
||||
@Published var isLoading = false
|
||||
@Published var showPushNotificationPrimer = false
|
||||
@Published var itemUnderLabelEdit: FeedItem?
|
||||
var cursor: String?
|
||||
var sendProgressUpdates = false
|
||||
|
||||
|
||||
@ -5,6 +5,7 @@ import Utils
|
||||
public enum GridCardAction {
|
||||
case toggleArchiveStatus
|
||||
case delete
|
||||
case editLabels
|
||||
}
|
||||
|
||||
public struct GridCard: View {
|
||||
@ -42,6 +43,10 @@ public struct GridCard: View {
|
||||
|
||||
var contextMenuView: some View {
|
||||
Group {
|
||||
Button(
|
||||
action: { menuActionHandler(.editLabels) },
|
||||
label: { Label("Edit Labels", systemImage: "tag") }
|
||||
)
|
||||
Button(
|
||||
action: { menuActionHandler(.toggleArchiveStatus) },
|
||||
label: {
|
||||
|
||||
Reference in New Issue
Block a user