FIX: The connection list is now displayed sorted. Current on top.
This commit is contained in:
parent
4a7cc5f7e8
commit
c8b2fadbb0
@ -19,11 +19,12 @@ func ConnectionsList(connections map[string]string, current string) string {
|
|||||||
return html + LIST_CLOSE
|
return html + LIST_CLOSE
|
||||||
}
|
}
|
||||||
|
|
||||||
for name, url := range connections {
|
html += fmt.Sprintf(LIST_ITEM, connections[current], " selected", current)
|
||||||
|
for _, name := range getSortedKeys(connections) {
|
||||||
if name == current {
|
if name == current {
|
||||||
html += fmt.Sprintf(LIST_ITEM, url, " selected", name)
|
continue
|
||||||
} else {
|
} else {
|
||||||
html += fmt.Sprintf(LIST_ITEM, url, "", name)
|
html += fmt.Sprintf(LIST_ITEM, connections[name], "", name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user