completed

This commit is contained in:
Ske087
2025-01-25 20:03:47 +02:00
parent 014a47594e
commit fda07c701d
9 changed files with 163 additions and 42 deletions

View File

@@ -19,11 +19,33 @@
max-width: 100px;
max-height: 100px;
}
.popup-message {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background-color: rgba(0, 0, 0, 0.8);
color: white;
padding: 20px;
border-radius: 10px;
display: none;
z-index: 1000;
}
.logo {
max-height: 100px;
margin-right: 20px;
}
</style>
</head>
<body class="{{ 'dark-mode' if theme == 'dark' else '' }}">
<div class="container py-5">
<h1 class="text-center mb-4">Admin Panel</h1>
<div class="d-flex justify-content-start align-items-center mb-4">
{% if logo_exists %}
<img src="{{ url_for('static', filename='uploads/logo.png') }}" alt="Logo" class="logo">
{% endif %}
<h1 class="mb-0">Admin Panel</h1>
</div>
<div class="card mb-4 {{ 'dark-mode' if theme == 'dark' else '' }}">
<div class="card-header">
<h2>Manage Users</h2>
@@ -125,13 +147,13 @@
</div>
</div>
<!-- Change Theme Section -->
<!-- Change Theme Card -->
<div class="card mb-4 {{ 'dark-mode' if theme == 'dark' else '' }}">
<div class="card-header">
<h2>Change Theme</h2>
</div>
<div class="card-body">
<form action="{{ url_for('change_theme') }}" method="post">
<form action="{{ url_for('change_theme') }}" method="post" onsubmit="showPopupMessage('Theme changed successfully!')">
<div class="mb-3">
<label for="theme" class="form-label">Select Theme</label>
<select class="form-select" id="theme" name="theme" required>
@@ -144,11 +166,35 @@
</div>
</div>
<!-- Clean Script Card -->
<div class="card mb-4 {{ 'dark-mode' if theme == 'dark' else '' }}">
<div class="card-header">
<h2>Clean Unused Files</h2>
</div>
<div class="card-body">
<form action="{{ url_for('clean_unused_files') }}" method="post" onsubmit="showPopupMessage('Clean script executed successfully!')">
<button type="submit" class="btn btn-danger">Run Clean Script</button>
</form>
</div>
</div>
<div class="mt-4">
<a href="{{ url_for('dashboard') }}" class="btn btn-secondary">Back to Dashboard</a>
</div>
</div>
<div id="popup-message" class="popup-message"></div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/js/bootstrap.bundle.min.js"></script>
<script>
function showPopupMessage(message) {
const popup = document.getElementById('popup-message');
popup.textContent = message;
popup.style.display = 'block';
setTimeout(() => {
popup.style.display = 'none';
}, 5000); // Increased time to 5 seconds
}
</script>
</body>
</html>