mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-07-02 03:24:20 +00:00
WIP
This commit is contained in:
@@ -3,33 +3,33 @@
|
||||
{% block title %}Dashboard - DarkflameServer{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<!-- Main Content -->
|
||||
<main style="margin-left: 280px;">
|
||||
<div class="container-fluid p-3 p-md-4">
|
||||
|
||||
<div class="row g-3">
|
||||
{% include "server_status.jinja2" %}
|
||||
{% include "statistics.jinja2" %}
|
||||
</div>
|
||||
|
||||
{% include "world_instances.jinja2" %}
|
||||
<div class="container-fluid py-5 px-4">
|
||||
<div class="dashboard-header mb-4">
|
||||
<div>
|
||||
<h1>Welcome to DarkflameServer Dashboard</h1>
|
||||
<p class="text-muted">Real-time server monitoring and administration</p>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
<div class="row g-3">
|
||||
{% include "server_status.jinja2" %}
|
||||
{% include "statistics.jinja2" %}
|
||||
</div>
|
||||
|
||||
{% include "world_instances.jinja2" %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
<script src="/js/dashboard.js"></script>
|
||||
<script>
|
||||
// Check authentication and initialize dashboard
|
||||
// Initialize dashboard when dashboard.js is loaded
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
// checkAuthentication is now async and calls connectWebSocket when ready
|
||||
checkAuthentication();
|
||||
|
||||
// Setup logout button
|
||||
document.getElementById('logoutBtn').addEventListener('click', (e) => {
|
||||
e.preventDefault();
|
||||
logout();
|
||||
});
|
||||
// Wait a bit for dashboard.js to load
|
||||
setTimeout(() => {
|
||||
if (typeof checkAuthentication === 'function') {
|
||||
checkAuthentication();
|
||||
}
|
||||
}, 100);
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user