diff --git a/app/web/views/components/vfavorite/list.templ b/app/web/views/components/vfavorite/list.templ
index 840f123..86d47cf 100644
--- a/app/web/views/components/vfavorite/list.templ
+++ b/app/web/views/components/vfavorite/list.templ
@@ -3,6 +3,8 @@ package vfavorite
import "github.com/cloudness-io/cloudness/types"
import "github.com/cloudness-io/cloudness/app/web/views/shared"
import "github.com/cloudness-io/cloudness/app/utils/routes"
+import "strings"
+import "github.com/cloudness-io/cloudness/app/web/views/components/icons"
templ ListPlaceholder(tenant *types.Tenant) {
@shared.PageSection("Favorites", templ.NopComponent, templ.NopComponent) {
@@ -35,15 +37,18 @@ templ List(favs []*types.FavoriteDTO) {
{ fav.AppName }
}
@shared.TableBodyCell() {
- { fav.ProjectName }
+ { fav.ProjectName }
}
@shared.TableBodyCell() {
- { fav.EnvironmentName }
+ { fav.EnvironmentName }
}
@shared.TableBodyCell() {
if fav.AppDomain != "" {
- { fav.AppDomain }
+
+ { trimProtocol(fav.AppDomain) }
+ @shared.Icon(icons.OutIcon, "size-3 shrink-0")
+
}
}
@@ -54,3 +59,9 @@ templ List(favs []*types.FavoriteDTO) {
}
}
+
+func trimProtocol(url string) string {
+ url = strings.TrimPrefix(url, "https://")
+ url = strings.TrimPrefix(url, "http://")
+ return strings.TrimSuffix(url, "/")
+}