231 lines
11 KiB
HTML
231 lines
11 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<meta name="robots" content="noindex, nofollow">
|
|
<link rel="icon" href="{{ url_for('assets', path='img/favicon.ico') }}">
|
|
<title>Blitz Panel | {% block title %}{% endblock %}</title>
|
|
|
|
<!-- Google Font: Source Sans Pro -->
|
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&display=fallback">
|
|
<!-- Font Awesome Icons -->
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
|
|
<!-- Theme style -->
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/admin-lte/3.2.0/css/adminlte.min.css">
|
|
<!-- iCheck Bootstrap -->
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/icheck-bootstrap@3.0.1/icheck-bootstrap.min.css">
|
|
<!-- SweetAlert2 -->
|
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/sweetalert2@11/dist/sweetalert2.min.css">
|
|
<!-- Custom CSS -->
|
|
<link rel="stylesheet" href="{{ url_for('assets', path='css/custom.css') }}">
|
|
{% block stylesheets %}{% endblock %}
|
|
</head>
|
|
|
|
<body class="hold-transition sidebar-mini sidebar-collapse">
|
|
<div class="wrapper">
|
|
|
|
<!-- Navbar -->
|
|
<nav class="main-header navbar navbar-expand navbar-white navbar-light">
|
|
<ul class="navbar-nav">
|
|
<li class="nav-item">
|
|
<a class="nav-link" data-widget="pushmenu" href="#" role="button"><i class="fas fa-bars"></i></a>
|
|
</li>
|
|
</ul>
|
|
<!-- Right navbar links -->
|
|
<ul class="navbar-nav ml-auto">
|
|
<li class="nav-item">
|
|
<a class="nav-link" id="darkModeToggle" href="#">
|
|
<i id="darkModeIcon" class="fas fa-moon"></i>
|
|
</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a class="nav-link" href="{{ url_for('logout') }}">
|
|
<i class="fas fa-sign-out-alt"></i>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
|
|
<!-- Main Sidebar Container -->
|
|
<aside class="main-sidebar sidebar-dark-primary elevation-4">
|
|
<!-- Brand Logo -->
|
|
<a href="{{ url_for('index') }}" class="brand-link">
|
|
<img src="{{ url_for('assets', path='img/logo.png') }}" alt="Blitz Logo"
|
|
class="brand-image img-circle elevation-3" style="opacity: .8">
|
|
<span class="brand-text font-weight-light">Blitz Dashboard</span>
|
|
</a>
|
|
|
|
<!-- Sidebar -->
|
|
<div class="sidebar">
|
|
<!-- Sidebar Menu -->
|
|
<nav class="mt-2">
|
|
<ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu" data-accordion="false">
|
|
<li class="nav-item">
|
|
<a href="{{ url_for('index') }}" class="nav-link {% if request.path == url_for('index') %}active{% endif %}">
|
|
<i class="nav-icon fas fa-tachometer-alt"></i>
|
|
<p>Dashboard</p>
|
|
</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a href="{{ url_for('users') }}" class="nav-link {% if request.path == url_for('users') %}active{% endif %}">
|
|
<i class="nav-icon fas fa-users"></i>
|
|
<p>Users</p>
|
|
</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a href="{{ url_for('settings') }}" class="nav-link {% if request.path == url_for('settings') %}active{% endif %}">
|
|
<i class="nav-icon fas fa-tools"></i>
|
|
<p>Settings</p>
|
|
</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a href="{{ url_for('config') }}" class="nav-link {% if request.path == url_for('config') %}active{% endif %}">
|
|
<i class="nav-icon fas fa-cog"></i>
|
|
<p>Config</p>
|
|
</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a href="#" class="nav-link">
|
|
<i class="nav-icon fas fa-book"></i>
|
|
<p>
|
|
Documentation
|
|
<i class="right fas fa-angle-left"></i>
|
|
</p>
|
|
</a>
|
|
<ul class="nav nav-treeview">
|
|
<li class="nav-item">
|
|
<a href="{{ url_for('index') }}docs" class="nav-link">
|
|
<i class="nav-icon fas fa-network-wired"></i>
|
|
<p>API Documentation</p>
|
|
</a>
|
|
</li>
|
|
<li class="nav-item">
|
|
<a href="https://returnfi.github.io/Hys2-docs/" class="nav-link">
|
|
<i class="nav-icon fas fa-lightbulb"></i>
|
|
<p>Guides & Tutorials</p>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
</div>
|
|
</aside>
|
|
|
|
<!-- Content Wrapper -->
|
|
<div class="content-wrapper">
|
|
{% block content %}{% endblock %}
|
|
</div>
|
|
|
|
<!-- Footer -->
|
|
<footer class="main-footer">
|
|
<div class="d-flex justify-content-between align-items-center flex-wrap">
|
|
<div>
|
|
<a href="https://github.com/ReturnFI/Blitz" target="_blank" class="text-decoration-none mr-2 mb-1 d-inline-block">
|
|
<img src="https://img.shields.io/badge/GitHub-Repository-181717?logo=github" alt="GitHub">
|
|
</a>
|
|
<a href="https://t.me/hysteria2_panel" target="_blank" class="text-decoration-none mr-2 mb-1 d-inline-block">
|
|
<img src="https://img.shields.io/badge/Telegram-Channel-0088cc?logo=telegram" alt="Telegram">
|
|
</a>
|
|
<a href="https://github.com/ReturnFI/Blitz/releases" target="_blank" class="text-decoration-none mr-2 mb-1 d-inline-block">
|
|
<img id="panel-version" src="https://img.shields.io/github/v/release/ReturnFI/Blitz?label=Release&logo=github" alt="Release Version">
|
|
</a>
|
|
</div>
|
|
<div class="mb-1">
|
|
<strong>
|
|
<img src="https://img.shields.io/badge/Made%20with-%E2%9D%A4-red" alt="Made with Love">
|
|
</strong>
|
|
</div>
|
|
</div>
|
|
</footer>
|
|
</div>
|
|
|
|
<!-- REQUIRED SCRIPTS -->
|
|
<!-- jQuery -->
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
|
|
<!-- Bootstrap 4 -->
|
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/js/bootstrap.bundle.min.js"></script>
|
|
<!-- AdminLTE App -->
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/admin-lte/3.2.0/js/adminlte.min.js"></script>
|
|
<!-- SweetAlert2 -->
|
|
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11/dist/sweetalert2.min.js"></script>
|
|
|
|
<script>
|
|
$(function () {
|
|
const darkModeToggle = $("#darkModeToggle");
|
|
const darkModeIcon = $("#darkModeIcon");
|
|
const isDarkMode = localStorage.getItem("darkMode") === "enabled";
|
|
|
|
setDarkMode(isDarkMode);
|
|
updateIcon(isDarkMode);
|
|
|
|
darkModeToggle.on("click", function (e) {
|
|
e.preventDefault();
|
|
const enabled = $("body").hasClass("dark-mode");
|
|
localStorage.setItem("darkMode", enabled ? "disabled" : "enabled");
|
|
setDarkMode(!enabled);
|
|
updateIcon(!enabled);
|
|
});
|
|
|
|
function setDarkMode(enabled) {
|
|
$("body").toggleClass("dark-mode", enabled);
|
|
|
|
if (enabled) {
|
|
$(".main-header").addClass("navbar-dark").removeClass("navbar-light navbar-white");
|
|
$(".card").addClass("bg-dark");
|
|
} else {
|
|
$(".main-header").addClass("navbar-white navbar-light").removeClass("navbar-dark");
|
|
$(".card").removeClass("bg-dark");
|
|
}
|
|
}
|
|
|
|
function updateIcon(enabled) {
|
|
darkModeIcon.removeClass("fa-moon fa-sun")
|
|
.addClass(enabled ? "fa-sun" : "fa-moon");
|
|
}
|
|
|
|
const versionUrl = "{{ url_for('get_version_info') }}";
|
|
$.ajax({
|
|
url: versionUrl,
|
|
type: 'GET',
|
|
success: function (response) {
|
|
$('#panel-version').text(`Version: ${response.current_version || 'N/A'}`);
|
|
},
|
|
error: function (error) {
|
|
console.error("Error fetching version:", error);
|
|
$('#panel-version').text('Version: Error');
|
|
}
|
|
});
|
|
|
|
const checkVersionUrl = "{{ url_for('check_version_info') }}";
|
|
$.ajax({
|
|
url: checkVersionUrl,
|
|
type: 'GET',
|
|
success: function (response) {
|
|
if (!response.is_latest) {
|
|
Swal.fire({
|
|
title: 'Update Available!',
|
|
html: `A new version of the panel is available: <b>${response.latest_version}</b><br><br>${response.changelog.replace(/\n/g, '<br>')}`,
|
|
icon: 'info',
|
|
showCancelButton: false,
|
|
confirmButtonText: 'OK'
|
|
});
|
|
}
|
|
},
|
|
error: function (xhr, status, error) {
|
|
console.error("Error checking for updates:", error);
|
|
if (xhr.responseJSON && xhr.responseJSON.detail) {
|
|
console.error("Server detail:", xhr.responseJSON.detail);
|
|
}
|
|
}
|
|
});
|
|
|
|
});
|
|
</script>
|
|
{% block javascripts %}{% endblock %}
|
|
</body>
|
|
|
|
</html>
|