Refresh fix, Dungeon Builder v2

This commit is contained in:
dingo
2026-01-04 21:35:42 -05:00
parent 89e6684288
commit 7de9bd2761
8 changed files with 1559 additions and 67 deletions
+7 -2
View File
@@ -5,6 +5,8 @@
ViewData["Title"] = "Recipes";
}
@Html.AntiForgeryToken()
<div class="space-y-6">
<!-- Header -->
<div class="flex items-center justify-between">
@@ -214,9 +216,12 @@
btn.innerHTML = '<svg class="w-5 h-5 animate-spin" fill="none" stroke="currentColor" viewBox="0 0 24 24"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path></svg> Refreshing...';
try {
const response = await fetch('/admin/api/refresh-cache?type=recipes', {
const response = await fetch('/admin/api?handler=RefreshCache&type=recipes', {
method: 'POST',
credentials: 'same-origin'
credentials: 'same-origin',
headers: {
'RequestVerificationToken': document.querySelector('input[name="__RequestVerificationToken"]')?.value || ''
}
});
const data = await response.json();