v0.12.1: fix vv version display, HDD default path, backup status colors, button contrast
- Bug 1: Remove hardcoded 'v' prefix from templates (layout.html, settings.html); version tag already contains 'v' - Bug 2: primaryHDDPath() and metrics collector now use GetDefaultStoragePath() instead of paths[0].Path so the real HDD is used, not the first (SSD) path - Bug 3: Apps without HDD data show green/yellow based on volumeLastStatus instead of always gray - Bug 5: Add default background rgba(255,255,255,0.1) to .btn to fix white-on-transparent readability Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -102,8 +102,8 @@ func main() {
|
||||
if metricsStore != nil {
|
||||
defer metricsStore.Close()
|
||||
metricsHDDPath := cfg.Paths.HDDPath
|
||||
if paths := sett.GetStoragePaths(); len(paths) > 0 {
|
||||
metricsHDDPath = paths[0].Path
|
||||
if p := sett.GetDefaultStoragePath(); p != "" {
|
||||
metricsHDDPath = p
|
||||
}
|
||||
metricsCollector := metrics.NewMetricsCollector(metricsStore, cpuCollector, metricsHDDPath, logger)
|
||||
metricsCollector.Start(ctx)
|
||||
|
||||
@@ -654,9 +654,17 @@ func (s *Server) buildAppBackupRows(
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// No HDD data — fully automatic
|
||||
row.Status = "auto"
|
||||
row.StatusText = "Automatikus mentés (nincs felhasználói adat)"
|
||||
// No HDD data — everything backed up automatically via restic
|
||||
if volumeLastStatus == "ok" {
|
||||
row.Status = "green"
|
||||
row.StatusText = "Mentés rendben"
|
||||
} else if volumeLastStatus == "error" {
|
||||
row.Status = "yellow"
|
||||
row.StatusText = "Kötetek mentése sikertelen"
|
||||
} else {
|
||||
row.Status = "auto"
|
||||
row.StatusText = "Automatikus mentés"
|
||||
}
|
||||
}
|
||||
|
||||
// If DB dump failed for this app, degrade to yellow (if not already red)
|
||||
|
||||
@@ -150,10 +150,10 @@ func (s *Server) ServeStorageAPI(w http.ResponseWriter, r *http.Request) {
|
||||
s.storageAPIHandler(w, r)
|
||||
}
|
||||
|
||||
// primaryHDDPath returns the first registered storage path, or the legacy config value.
|
||||
// primaryHDDPath returns the default storage path, or the legacy config value.
|
||||
func (s *Server) primaryHDDPath() string {
|
||||
if paths := s.settings.GetStoragePaths(); len(paths) > 0 {
|
||||
return paths[0].Path
|
||||
if p := s.settings.GetDefaultStoragePath(); p != "" {
|
||||
return p
|
||||
}
|
||||
return s.cfg.Paths.HDDPath
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<div class="sidebar-bottom">
|
||||
<a href="/settings" class="sidebar-settings-link {{if eq .Page "settings"}}active{{end}}">⚙ Beállítások</a>
|
||||
<div class="sidebar-footer">
|
||||
<span class="version">v{{.Version}}</span>
|
||||
<span class="version">{{.Version}}</span>
|
||||
{{if .AuthEnabled}}<a href="/logout" class="logout-link">Kijelentkezés ↗</a>{{end}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
</div>
|
||||
<div class="settings-row">
|
||||
<span class="settings-label">Controller verzió</span>
|
||||
<span class="settings-value mono">v{{.Version}}</span>
|
||||
<span class="settings-value mono">{{.Version}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -440,6 +440,7 @@ h3 {
|
||||
text-decoration: none;
|
||||
color: #fff;
|
||||
font-family: inherit;
|
||||
background: rgba(255,255,255,0.1);
|
||||
}
|
||||
.btn:hover { transform: translateY(-1px); }
|
||||
.btn:active { transform: scale(.97); }
|
||||
|
||||
Reference in New Issue
Block a user