Use provider description as profile name

This commit is contained in:
Davide 2024-11-28 11:14:23 +01:00
parent 42c0d7e932
commit f6c93fc2f7
No known key found for this signature in database
GPG Key ID: A48836171C759F5E

View File

@ -85,7 +85,7 @@ private extension AddProfileMenu {
registry: registry,
onSelect: {
var copy = $0
copy.name = newName
copy.name = profileManager.firstUniqueName(from: copy.name)
onNewProfile(copy, copy.modules.first?.id)
}
)
@ -133,6 +133,7 @@ private struct ProvidersSubmenu: View {
func profileButton(for provider: ProviderMetadata) -> some View {
Button(provider.description) {
var editable = EditableProfile()
editable.name = provider.description
if var newModule = moduleType.newModule(with: registry) as? any ProviderModuleBuilder {
newModule.providerId = provider.id
editable.modules.append(newModule)