mirror of
https://github.com/eduardolat/pgbackweb.git
synced 2026-05-20 03:49:12 -05:00
Remove loading indicators from various dashboard pages for a cleaner UI
This commit is contained in:
@@ -52,15 +52,9 @@ func indexPage(reqCtx reqctx.Ctx) gomponents.Node {
|
||||
html.TBody(
|
||||
htmx.HxGet("/dashboard/backups/list?page=1"),
|
||||
htmx.HxTrigger("load"),
|
||||
htmx.HxIndicator("#list-backups-loading"),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
html.Div(
|
||||
html.Class("flex justify-center mt-4"),
|
||||
component.HxLoadingLg("list-backups-loading"),
|
||||
),
|
||||
},
|
||||
}),
|
||||
}
|
||||
|
||||
@@ -137,7 +137,6 @@ func listBackups(
|
||||
)),
|
||||
htmx.HxTrigger("intersect once"),
|
||||
htmx.HxSwap("afterend"),
|
||||
htmx.HxIndicator("#list-backups-loading"),
|
||||
))
|
||||
}
|
||||
|
||||
|
||||
@@ -44,15 +44,9 @@ func indexPage(reqCtx reqctx.Ctx) gomponents.Node {
|
||||
html.TBody(
|
||||
htmx.HxGet("/dashboard/databases/list?page=1"),
|
||||
htmx.HxTrigger("load"),
|
||||
htmx.HxIndicator("#list-databases-loading"),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
html.Div(
|
||||
html.Class("flex justify-center mt-4"),
|
||||
component.HxLoadingLg("list-databases-loading"),
|
||||
),
|
||||
},
|
||||
}),
|
||||
}
|
||||
|
||||
@@ -119,7 +119,6 @@ func listDatabases(
|
||||
)),
|
||||
htmx.HxTrigger("intersect once"),
|
||||
htmx.HxSwap("afterend"),
|
||||
htmx.HxIndicator("#list-databases-loading"),
|
||||
))
|
||||
}
|
||||
|
||||
|
||||
@@ -57,15 +57,9 @@ func indexPage(reqCtx reqctx.Ctx) gomponents.Node {
|
||||
html.TBody(
|
||||
htmx.HxGet("/dashboard/destinations/list?page=1"),
|
||||
htmx.HxTrigger("load"),
|
||||
htmx.HxIndicator("#list-destinations-loading"),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
html.Div(
|
||||
html.Class("flex justify-center mt-4"),
|
||||
component.HxLoadingLg("list-destinations-loading"),
|
||||
),
|
||||
},
|
||||
}),
|
||||
}
|
||||
|
||||
@@ -148,7 +148,6 @@ func listDestinations(
|
||||
)),
|
||||
htmx.HxTrigger("intersect once"),
|
||||
htmx.HxSwap("afterend"),
|
||||
htmx.HxIndicator("#list-destinations-loading"),
|
||||
))
|
||||
}
|
||||
|
||||
|
||||
@@ -74,15 +74,9 @@ func indexPage(reqCtx reqctx.Ctx, queryData execsQueryData) gomponents.Node {
|
||||
return url
|
||||
}()),
|
||||
htmx.HxTrigger("load"),
|
||||
htmx.HxIndicator("#list-executions-loading"),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
html.Div(
|
||||
html.Class("flex justify-center mt-4"),
|
||||
component.HxLoadingLg("list-executions-loading"),
|
||||
),
|
||||
},
|
||||
}),
|
||||
}
|
||||
|
||||
@@ -137,7 +137,6 @@ func listExecutions(
|
||||
}()),
|
||||
htmx.HxTrigger("intersect once"),
|
||||
htmx.HxSwap("afterend"),
|
||||
htmx.HxIndicator("#list-executions-loading"),
|
||||
))
|
||||
}
|
||||
|
||||
|
||||
@@ -69,15 +69,9 @@ func indexPage(reqCtx reqctx.Ctx, queryData resQueryData) gomponents.Node {
|
||||
return url
|
||||
}()),
|
||||
htmx.HxTrigger("load"),
|
||||
htmx.HxIndicator("#list-restorations-loading"),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
html.Div(
|
||||
html.Class("flex justify-center mt-4"),
|
||||
component.HxLoadingLg("list-restorations-loading"),
|
||||
),
|
||||
},
|
||||
}),
|
||||
}
|
||||
|
||||
@@ -126,7 +126,6 @@ func listRestorations(
|
||||
}()),
|
||||
htmx.HxTrigger("intersect once"),
|
||||
htmx.HxSwap("afterend"),
|
||||
htmx.HxIndicator("#list-restorations-loading"),
|
||||
))
|
||||
}
|
||||
|
||||
|
||||
@@ -47,14 +47,8 @@ func indexPage(reqCtx reqctx.Ctx) gomponents.Node {
|
||||
html.TBody(
|
||||
htmx.HxGet("/dashboard/webhooks/list?page=1"),
|
||||
htmx.HxTrigger("load"),
|
||||
htmx.HxIndicator("#list-webhooks-loading"),
|
||||
),
|
||||
),
|
||||
|
||||
html.Div(
|
||||
html.Class("flex justify-center mt-4"),
|
||||
component.HxLoadingLg("list-webhooks-loading"),
|
||||
),
|
||||
),
|
||||
},
|
||||
}),
|
||||
|
||||
@@ -102,7 +102,6 @@ func listWebhooks(
|
||||
}()),
|
||||
htmx.HxTrigger("intersect once"),
|
||||
htmx.HxSwap("afterend"),
|
||||
htmx.HxIndicator("#list-webhooks-loading"),
|
||||
))
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ package layout
|
||||
import (
|
||||
"github.com/eduardolat/pgbackweb/internal/view/reqctx"
|
||||
"github.com/eduardolat/pgbackweb/internal/view/web/component"
|
||||
"github.com/eduardolat/pgbackweb/internal/view/web/htmx"
|
||||
"github.com/maragudk/gomponents"
|
||||
"github.com/maragudk/gomponents/components"
|
||||
"github.com/maragudk/gomponents/html"
|
||||
@@ -30,6 +31,7 @@ func Dashboard(reqCtx reqctx.Ctx, params DashboardParams) gomponents.Node {
|
||||
head(),
|
||||
},
|
||||
Body: []gomponents.Node{
|
||||
htmx.HxIndicator("#header-indicator"),
|
||||
components.Classes{
|
||||
"w-screen h-screen bg-base-200": true,
|
||||
"flex justify-start overflow-hidden": true,
|
||||
|
||||
@@ -29,6 +29,7 @@ func dashboardHeader() gomponents.Node {
|
||||
}),
|
||||
component.StarOnGithub(component.SizeMd),
|
||||
dashboardHeaderCheckForUpdates(),
|
||||
component.HxLoadingMd("header-indicator"),
|
||||
),
|
||||
html.Div(
|
||||
html.Class("flex justify-end items-center space-x-2"),
|
||||
|
||||
Reference in New Issue
Block a user