Add clan-purge and player-purge. Optimized performance with template-init.
This commit is contained in:
@@ -17,54 +17,40 @@
|
||||
<ul class="dropdown-menu">
|
||||
<li><h6 class="dropdown-header">ACCOUNTS</h6></li>
|
||||
<li>
|
||||
<button class="dropdown-item fs-5 text-info-emphasis fst-italic"
|
||||
<button class="dropdown-item fs-5 text-info-emphasis"
|
||||
hx-post="/admin/create_code" hx-trigger="confirmed" hx-swap="none"
|
||||
onclick="createCodeDialog(this)">
|
||||
Create Code
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<button class="dropdown-item fs-5 text-info-emphasis fst-italic"
|
||||
hx-get="/admin/reset_password" hx-trigger="confirmed" hx-swap="none"
|
||||
onclick="confirmAndTrigger(this)">
|
||||
Reset Password
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<button class="dropdown-item fs-5 text-info-emphasis fst-italic"
|
||||
hx-get="/admin/disable_account" hx-trigger="confirmed" hx-swap="none"
|
||||
onclick="confirmAndTrigger(this)">
|
||||
Disable Account
|
||||
</button>
|
||||
</li>
|
||||
<li><hr class="dropdown-divider"></li>
|
||||
<li><h6 class="dropdown-header">TOOLS</h6></li>
|
||||
<li>
|
||||
<button class="dropdown-item fs-5 text-warning-emphasis"
|
||||
hx-get="/admin/clear_cache" hx-trigger="confirmed" hx-swap="none"
|
||||
hx-delete="/admin/clear_cache" hx-trigger="confirmed" hx-swap="none"
|
||||
onclick="confirmAndTrigger(this)">
|
||||
Clear Cache
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<button class="dropdown-item fs-5 text-warning-emphasis fst-italic"
|
||||
<button class="dropdown-item fs-5 text-warning-emphasis visually-hidden"
|
||||
hx-get="/admin/update_cache" hx-trigger="confirmed" hx-swap="none"
|
||||
onclick="confirmAndTrigger(this)">
|
||||
onclick="alert('Not implemented yet')">
|
||||
Update Cache
|
||||
</button>
|
||||
</li>
|
||||
<li><hr class="dropdown-divider"></li>
|
||||
<li><h6 class="dropdown-header">DANGER ZONE</h6></li>
|
||||
<li>
|
||||
<button class="dropdown-item fs-5 text-danger-emphasis fst-italic"
|
||||
hx-get="/admin/purge_players" hx-trigger="confirmed" hx-swap="none"
|
||||
<button class="dropdown-item fs-5 text-danger-emphasis"
|
||||
hx-delete="/admin/purge_players" hx-trigger="confirmed" hx-swap="none"
|
||||
onclick="confirmAndTrigger(this)">
|
||||
Purge Players
|
||||
</button>
|
||||
</li>
|
||||
<li>
|
||||
<button class="dropdown-item fs-5 text-danger-emphasis fst-italic"
|
||||
hx-get="/admin/purge_cache" hx-trigger="confirmed" hx-swap="none"
|
||||
<button class="dropdown-item fs-5 text-danger-emphasis"
|
||||
hx-delete="/admin/purge_clans" hx-trigger="confirmed" hx-swap="none"
|
||||
onclick="confirmAndTrigger(this)">
|
||||
Purge Clans
|
||||
</button>
|
||||
@@ -95,6 +81,10 @@
|
||||
title: 'Action executed',
|
||||
text: event.detail.xhr.response,
|
||||
icon: event.detail.xhr.status === 200 ? 'success' : 'error'
|
||||
}).then(() => {
|
||||
if (event.detail.requestConfig.verb === "delete") {
|
||||
location.reload();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user