correct parse the identyfile and allow remove tags

This commit is contained in:
Adem Baccara
2025-09-10 21:59:46 +01:00
parent b71ef74aaa
commit bb5b7554e6
8 changed files with 69 additions and 177 deletions
+5 -5
View File
@@ -332,13 +332,13 @@ func (t *tui) showEditTagsForm(server domain.Server) {
form.AddButton("Save", func() {
text := strings.TrimSpace(form.GetFormItem(0).(*tview.InputField).GetText())
var tags []string
if text != "" {
for _, part := range strings.Split(text, ",") {
if s := strings.TrimSpace(part); s != "" {
tags = append(tags, s)
}
for _, part := range strings.Split(text, ",") {
if s := strings.TrimSpace(part); s != "" {
tags = append(tags, s)
}
}
newServer := server
newServer.Tags = tags
_ = t.serverService.UpdateServer(server, newServer)