From 4f14d3b0324fa87dcf6cad2247df6a49c18a852f Mon Sep 17 00:00:00 2001 From: Stu Leak Date: Thu, 4 Dec 2025 12:45:56 -0500 Subject: [PATCH] Add per-entity import actions in empty states and make buttons non-submitting --- internal/web/server.go | 18 +++++++++--------- internal/web/templates/dashboard.html | 14 +++++++------- internal/web/templates/performers.html | 3 ++- internal/web/templates/scenes.html | 12 +++++++----- internal/web/templates/studios.html | 12 +++++++----- 5 files changed, 32 insertions(+), 27 deletions(-) diff --git a/internal/web/server.go b/internal/web/server.go index 0723985..a3b7240 100644 --- a/internal/web/server.go +++ b/internal/web/server.go @@ -14,10 +14,10 @@ import ( "strings" "time" + "git.leaktechnologies.dev/stu/Goondex/internal/config" "git.leaktechnologies.dev/stu/Goondex/internal/db" import_service "git.leaktechnologies.dev/stu/Goondex/internal/import" "git.leaktechnologies.dev/stu/Goondex/internal/model" - "git.leaktechnologies.dev/stu/Goondex/internal/config" "git.leaktechnologies.dev/stu/Goondex/internal/scraper/adultemp" "git.leaktechnologies.dev/stu/Goondex/internal/scraper/tpdb" "git.leaktechnologies.dev/stu/Goondex/internal/sync" @@ -1391,14 +1391,14 @@ func (s *Server) handleAPISettingsKeys(w http.ResponseWriter, r *http.Request) { case http.MethodGet: keys := config.GetAPIKeys() resp := map[string]interface{}{ - "tpdbConfigured": keys.TPDBAPIKey != "", - "aeConfigured": keys.AEAPIKey != "", - "stashdbConfigured": keys.StashDBAPIKey != "", - "stashdbEndpoint": keys.StashDBEndpoint, - "tpdb_api_key": keys.TPDBAPIKey, // local-only UI; if you prefer, mask these - "ae_api_key": keys.AEAPIKey, - "stashdb_api_key": keys.StashDBAPIKey, - "stashdb_endpoint": keys.StashDBEndpoint, // duplicate for UI convenience + "tpdbConfigured": keys.TPDBAPIKey != "", + "aeConfigured": keys.AEAPIKey != "", + "stashdbConfigured": keys.StashDBAPIKey != "", + "stashdbEndpoint": keys.StashDBEndpoint, + "tpdb_api_key": keys.TPDBAPIKey, // local-only UI; if you prefer, mask these + "ae_api_key": keys.AEAPIKey, + "stashdb_api_key": keys.StashDBAPIKey, + "stashdb_endpoint": keys.StashDBEndpoint, // duplicate for UI convenience } json.NewEncoder(w).Encode(APIResponse{ Success: true, diff --git a/internal/web/templates/dashboard.html b/internal/web/templates/dashboard.html index 894db39..a663312 100644 --- a/internal/web/templates/dashboard.html +++ b/internal/web/templates/dashboard.html @@ -96,12 +96,12 @@

Full-library sync with seamless enrichment

- - @@ -182,23 +182,23 @@

- - - - - diff --git a/internal/web/templates/performers.html b/internal/web/templates/performers.html index 42b65c1..cb3e8ad 100644 --- a/internal/web/templates/performers.html +++ b/internal/web/templates/performers.html @@ -68,7 +68,8 @@

Import performers from Adult Empire without the CLI.

- + +
diff --git a/internal/web/templates/scenes.html b/internal/web/templates/scenes.html index 7e77b6d..f2e70ad 100644 --- a/internal/web/templates/scenes.html +++ b/internal/web/templates/scenes.html @@ -51,11 +51,13 @@ {{else}}

No scenes found.

- {{if .Query}} -

Try a different search term or view all scenes.

- {{else}} -

Import scenes using the dashboard or CLI: ./goondex import scene "title"

- {{end}} +
+

Import scenes now.

+
+ +
+
+
{{end}} diff --git a/internal/web/templates/studios.html b/internal/web/templates/studios.html index 4cad2d0..fc06ccd 100644 --- a/internal/web/templates/studios.html +++ b/internal/web/templates/studios.html @@ -43,11 +43,13 @@ {{else}}

No studios found.

- {{if .Query}} -

Try a different search term or view all studios.

- {{else}} -

Import studios using the dashboard or CLI: ./goondex import studio "name"

- {{end}} +
+

Import studios now.

+
+ +
+
+
{{end}}