add create label option on share ext

This commit is contained in:
Satindar Dhillon 2022-07-20 10:13:45 -07:00
parent f3d2b6c89f
commit 868886ab83

View file

@ -240,11 +240,25 @@ struct ApplyLabelsListView: View {
#endif
}
}
Button(
action: { viewModel.showCreateLabelModal = true },
label: {
HStack {
Image(systemName: "plus.circle.fill").foregroundColor(.green)
Text("Create a new Label").foregroundColor(.appGrayTextContrast)
Spacer()
}
}
)
.disabled(viewModel.isLoading)
}
.listStyle(PlainListStyle())
.padding(.vertical, 0)
.task {
await viewModel.loadLabels(dataService: dataService, item: linkedItem)
}
.sheet(isPresented: $viewModel.showCreateLabelModal) {
CreateLabelView(viewModel: viewModel)
}
}
}