summaryrefslogtreecommitdiff
path: root/web/templates/settings.html
diff options
context:
space:
mode:
Diffstat (limited to 'web/templates/settings.html')
-rw-r--r--web/templates/settings.html24
1 files changed, 18 insertions, 6 deletions
diff --git a/web/templates/settings.html b/web/templates/settings.html
index 964d319..4df4cb0 100644
--- a/web/templates/settings.html
+++ b/web/templates/settings.html
@@ -157,7 +157,8 @@
.htmx-request .htmx-indicator { display: inline; }
</style>
</head>
-<body>
+<body hx-headers='{"X-CSRF-Token": "{{.CSRFToken}}"}'>
+
<div class="container">
<a href="/" class="back-link">&larr; Back to Dashboard</a>
<h1>Settings</h1>
@@ -312,12 +313,23 @@
<!-- Source Configuration Section -->
<h2>Data Sources</h2>
- <form hx-post="/settings/sync" hx-swap="outerHTML" hx-target="#sources-container" hx-indicator=".sync-indicator">
- <button type="submit" class="btn">
- <span class="sync-indicator htmx-indicator">Syncing...</span>
- Sync Available Sources
+ <div style="display: flex; gap: 8px; align-items: center;">
+ <form hx-post="/settings/sync" hx-swap="outerHTML" hx-target="#sources-container" hx-indicator=".sync-indicator">
+ <button type="submit" class="btn">
+ <span class="sync-indicator htmx-indicator">Syncing...</span>
+ Sync Available Sources
+ </button>
+ </form>
+ <button class="btn btn-danger"
+ hx-post="/settings/clear-cache"
+ hx-target="#sync-log"
+ hx-swap="outerHTML"
+ hx-confirm="Clear all cached data? Next page load will fetch fresh data from all sources.">
+ Clear Cache
</button>
- </form>
+ </div>
+
+ {{template "sync-log" .SyncLog}}
<div id="sources-container" style="margin-top: 16px;">
{{range .Sources}}