Part A: shared app_list_row partial — ONE row grammar on four surfaces (v0.126.0)
- templates/app_row.html: app_list_row/app_list_row_end (layout_start/_end idiom) — icon+name (+optional secondary) left, caller action block right; compact 44px row; logoURL→PNG→ optional FallbackIcon→hidden onerror chain - applied: Távoli mentés toggle list, Visszaállítás restore-to-verify + .fab lists, dashboard Telepített alkalmazások (state edge + data-href preserved); Alkalmazások collapsed headers ALIGNED (icon+name left, status dot moved right before chevron; expander untouched) - funcmap: dict + appHref; OffboxAppRow/AppBackupRow gain Slug - style.css: .app-row family; stack-card/stack-info/stack-logo/stack-name/stack-desc/ stack-actions rules retired (dashboard rows now shared); .app-backup-row-header matched to the shared row height - scripts/app_row_dedup_gate.py: row markup single-sourced (red-proven: pasted old storage-path-item block → exit 1); render tests per surface (app_row_test.go) - NO behavior change: toggle/download/expander actions byte-identical
This commit is contained in:
@@ -730,6 +730,7 @@ func (s *Server) backupsRestoreHandler(w http.ResponseWriter, r *http.Request) {
|
||||
type OffboxAppRow struct {
|
||||
Name string
|
||||
DisplayName string
|
||||
Slug string // catalog slug for the shared app-row icon (logoURL)
|
||||
Enabled bool
|
||||
}
|
||||
|
||||
@@ -747,7 +748,7 @@ func (s *Server) buildOffboxApps() []OffboxAppRow {
|
||||
if dn == "" {
|
||||
dn = st.Name
|
||||
}
|
||||
out = append(out, OffboxAppRow{Name: st.Name, DisplayName: dn, Enabled: s.settings.IsAppOffbox(st.Name)})
|
||||
out = append(out, OffboxAppRow{Name: st.Name, DisplayName: dn, Slug: st.Meta.Slug, Enabled: s.settings.IsAppOffbox(st.Name)})
|
||||
}
|
||||
return out
|
||||
}
|
||||
@@ -756,6 +757,7 @@ func (s *Server) buildOffboxApps() []OffboxAppRow {
|
||||
type AppBackupRow struct {
|
||||
StackName string
|
||||
DisplayName string
|
||||
Slug string // catalog slug for the aligned header icon (logoURL)
|
||||
Status string // "green", "yellow", "red", "auto"
|
||||
StatusText string // short Hungarian tooltip
|
||||
|
||||
@@ -869,9 +871,17 @@ func (s *Server) buildAppBackupRows(status *backup.FullBackupStatus) []AppBackup
|
||||
}
|
||||
contents := strings.Join(parts, " + ")
|
||||
|
||||
slug := ""
|
||||
if s.stackMgr != nil {
|
||||
if st, ok := s.stackMgr.GetStack(app.StackName); ok {
|
||||
slug = st.Meta.Slug
|
||||
}
|
||||
}
|
||||
|
||||
row := AppBackupRow{
|
||||
StackName: app.StackName,
|
||||
DisplayName: app.DisplayName,
|
||||
Slug: slug,
|
||||
HasHDDData: app.HasHDDData,
|
||||
HasDB: hasDB,
|
||||
HasVolumeData: app.HasVolumeData,
|
||||
|
||||
Reference in New Issue
Block a user