mirror of
https://github.com/passepartoutvpn/passepartout-apple.git
synced 2025-01-31 04:52:05 +00:00
Use provider description as profile name
This commit is contained in:
parent
42c0d7e932
commit
f6c93fc2f7
@ -85,7 +85,7 @@ private extension AddProfileMenu {
|
|||||||
registry: registry,
|
registry: registry,
|
||||||
onSelect: {
|
onSelect: {
|
||||||
var copy = $0
|
var copy = $0
|
||||||
copy.name = newName
|
copy.name = profileManager.firstUniqueName(from: copy.name)
|
||||||
onNewProfile(copy, copy.modules.first?.id)
|
onNewProfile(copy, copy.modules.first?.id)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@ -133,6 +133,7 @@ private struct ProvidersSubmenu: View {
|
|||||||
func profileButton(for provider: ProviderMetadata) -> some View {
|
func profileButton(for provider: ProviderMetadata) -> some View {
|
||||||
Button(provider.description) {
|
Button(provider.description) {
|
||||||
var editable = EditableProfile()
|
var editable = EditableProfile()
|
||||||
|
editable.name = provider.description
|
||||||
if var newModule = moduleType.newModule(with: registry) as? any ProviderModuleBuilder {
|
if var newModule = moduleType.newModule(with: registry) as? any ProviderModuleBuilder {
|
||||||
newModule.providerId = provider.id
|
newModule.providerId = provider.id
|
||||||
editable.modules.append(newModule)
|
editable.modules.append(newModule)
|
||||||
|
Loading…
Reference in New Issue
Block a user