diff --git a/components/dashboard.templ b/components/dashboard.templ index 9a8b6ac..2dbdd41 100644 --- a/components/dashboard.templ +++ b/components/dashboard.templ @@ -50,6 +50,11 @@ func isNewerVersionAvailable(current, latest string) bool { return false } + // Special case for DEV versions - always show update available + if current == "DEV" { + return true + } + // Strip 'v' prefix if present for comparison if strings.HasPrefix(current, "v") { current = current[1:] @@ -62,6 +67,12 @@ func isNewerVersionAvailable(current, latest string) bool { currentParts := strings.Split(current, ".") latestParts := strings.Split(latest, ".") + // Handle non-semver format in either version + if len(currentParts) < 2 || len(latestParts) < 2 { + // If format doesn't match semver pattern, do string comparison + return current != latest && latest != "" + } + // Compare major, minor, patch versions for i := 0; i < len(currentParts) && i < len(latestParts); i++ { // Parse to integers @@ -310,7 +321,7 @@ templ Dashboard(ctx context.Context, data DashboardData) { { data.CurrentVersion } - { data.LatestVersion } Available diff --git a/components/layout.templ b/components/layout.templ index eccb25f..ed9f2bf 100644 --- a/components/layout.templ +++ b/components/layout.templ @@ -364,7 +364,7 @@ templ LayoutWithContext(title string, ctx context.Context) { hx-get="/notifications/dropdown" hx-trigger="click once" hx-target="#notification-dropdown-content" - data-dropdown-placement="bottom-end" + data-dropdown-placement="bottom-start" > View notifications @@ -375,10 +375,10 @@ templ LayoutWithContext(title string, ctx context.Context) {