Update web/templates/settings/home.html
This commit is contained in:
parent
f2d2eef9be
commit
85db9ee4dc
@ -40,11 +40,25 @@
|
||||
headers: { "X-CSRFToken": getCookie("csrftoken") }
|
||||
})
|
||||
.then(function(r){ return r.ok ? r.json() : Promise.reject(); })
|
||||
.then(function(){
|
||||
.then(function(data){
|
||||
// Clear likely client-side copies too (harmless if not present)
|
||||
var keys = ["recent_searches","recent_entries","recent_viewed","recently_viewed","recent_results","recentSearches","recentEntries"];
|
||||
try {
|
||||
keys.forEach(function(k){ localStorage.removeItem(k); sessionStorage.removeItem(k); });
|
||||
} catch(e) {}
|
||||
// Clear same-named cookies if any
|
||||
try {
|
||||
var expire = "expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/";
|
||||
keys.forEach(function(k){ document.cookie = k + "=; " + expire; });
|
||||
} catch(e) {}
|
||||
// Toast
|
||||
if (toast){
|
||||
toast.textContent = "History cleared.";
|
||||
toast.style.opacity = "1";
|
||||
setTimeout(function(){ toast.style.opacity = "0"; }, 1500);
|
||||
}
|
||||
// Optional: log which server keys were removed
|
||||
if (data && data.cleared) { console.log("Cleared server keys:", data.cleared); }
|
||||
})
|
||||
.catch(function(){ /* silent per spec */ });
|
||||
});
|
||||
@ -165,8 +179,8 @@
|
||||
<label>Message</label>
|
||||
<textarea name="message" rows="6" class="tool-input" placeholder="What’s new in this release…"></textarea>
|
||||
<label style="display:flex; gap:6px; align-items:center; margin-top:8px;">
|
||||
+ <input type="checkbox" name="is_active" checked> Active
|
||||
+ </label>
|
||||
<input type="checkbox" name="is_active" checked> Active
|
||||
</label>
|
||||
|
||||
{% endif %}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user