-
-
Notifications
You must be signed in to change notification settings - Fork 299
feat(connections): support multiple tags per connection with tag filtering (#744) #1753
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -230,6 +230,9 @@ internal enum DeeplinkParser { | |
| func value(_ key: String) -> String? { | ||
| queryItems.first(where: { $0.name == key })?.value | ||
| } | ||
| func values(_ key: String) -> [String] { | ||
| queryItems.filter { $0.name == key }.compactMap { $0.value } | ||
| } | ||
|
|
||
| guard let name = value("name"), !name.isEmpty else { | ||
| return .failure(.missingRequiredParam("name")) | ||
|
|
@@ -323,6 +326,7 @@ internal enum DeeplinkParser { | |
| sslConfig: sslConfig, | ||
| color: value("color"), | ||
| tagName: value("tagName"), | ||
| tagNames: values("tagName").isEmpty ? nil : values("tagName"), | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
For a deeplink such as Useful? React with 👍 / 👎. |
||
| groupName: value("groupName"), | ||
| sshProfileId: nil, | ||
| safeModeLevel: value("safeModeLevel"), | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TableProMobile persists
[DatabaseConnection]by JSON-encoding this public model, but tagged connections now serialize onlytagIds. The previous mobile model decoded onlytagId, so opening the same on-disk data with an older build drops even the first tag, unlike the macOS stored model and sync/export paths that dual-write the legacy field for compatibility. EncodetagIds[0]under.tagIdhere when the array is non-empty.Useful? React with 👍 / 👎.