Launcher: groupe same app instances. added url inside tooltip.
Change-Id: Ib2f6ed3507ceae4c85aad024e62cab4bd460ee25
diff --git a/core/installer/welcome/launcher.go b/core/installer/welcome/launcher.go
index 51313eb..9d2b2f4 100644
--- a/core/installer/welcome/launcher.go
+++ b/core/installer/welcome/launcher.go
@@ -6,6 +6,7 @@
"html/template"
"log"
"net/http"
+ "sort"
"strings"
"github.com/giolekva/pcloud/core/installer"
@@ -58,6 +59,21 @@
Url: a.URL,
})
}
+ sort.Slice(ret, func(i, j int) bool {
+ if ret[i].Name == "app-manager" {
+ return true
+ }
+ if ret[j].Name == "app-manager" {
+ return false
+ }
+ if ret[i].Name == "headscale" {
+ return ret[j].Name != "app-manager"
+ }
+ if ret[j].Name == "headscale" {
+ return false
+ }
+ return ret[i].Name < ret[j].Name
+ })
return ret, nil
}