Add views directory and UI improvements
- Add all view templates (servers, auth, dashboard, admin, layouts, errors, terminal) - Fix SSH double decryption bug in SSHService - Fix router parameter type casting for strict_types - Add missing error views (401, 403, 404) - Add nginx manager with file editing - Add SSL certificates management - Add database manager with phpMyAdmin-like interface - Add sidebar server accordion
This commit is contained in:
18
views/errors/401.php
Normal file
18
views/errors/401.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
$code = $code ?? 401;
|
||||
$message = $message ?? 'Unauthorized';
|
||||
?>
|
||||
|
||||
<div class="error-page">
|
||||
<div class="error-card">
|
||||
<div class="error-code"><?= $code ?></div>
|
||||
<div class="error-message"><?= htmlspecialchars($message) ?></div>
|
||||
<p class="error-description">
|
||||
Please log in to access this page.
|
||||
</p>
|
||||
<div class="error-actions">
|
||||
<a href="/login" class="btn btn-primary">Log In</a>
|
||||
<button class="btn btn-secondary" onclick="history.back()">Go Back</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
18
views/errors/403.php
Normal file
18
views/errors/403.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
$code = $code ?? 403;
|
||||
$message = $message ?? 'Forbidden';
|
||||
?>
|
||||
|
||||
<div class="error-page">
|
||||
<div class="error-card">
|
||||
<div class="error-code"><?= $code ?></div>
|
||||
<div class="error-message"><?= htmlspecialchars($message) ?></div>
|
||||
<p class="error-description">
|
||||
You do not have permission to access this resource.
|
||||
</p>
|
||||
<div class="error-actions">
|
||||
<a href="/dashboard" class="btn btn-primary">Go to Dashboard</a>
|
||||
<button class="btn btn-secondary" onclick="history.back()">Go Back</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
18
views/errors/404.php
Normal file
18
views/errors/404.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
$code = $code ?? 404;
|
||||
$message = $message ?? 'Not Found';
|
||||
?>
|
||||
|
||||
<div class="error-page">
|
||||
<div class="error-card">
|
||||
<div class="error-code"><?= $code ?></div>
|
||||
<div class="error-message"><?= htmlspecialchars($message) ?></div>
|
||||
<p class="error-description">
|
||||
The page you are looking for could not be found.
|
||||
</p>
|
||||
<div class="error-actions">
|
||||
<a href="/dashboard" class="btn btn-primary">Go to Dashboard</a>
|
||||
<button class="btn btn-secondary" onclick="history.back()">Go Back</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
26
views/errors/500.php
Executable file
26
views/errors/500.php
Executable file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
$code = $code ?? 500;
|
||||
$message = $message ?? 'Internal Server Error';
|
||||
?>
|
||||
|
||||
<div class="error-page">
|
||||
<div class="error-card">
|
||||
<div class="error-code"><?= $code ?></div>
|
||||
<div class="error-message"><?= htmlspecialchars($message) ?></div>
|
||||
<p class="error-description">
|
||||
<?php if ($code === 404): ?>
|
||||
The page you are looking for could not be found.
|
||||
<?php elseif ($code === 403): ?>
|
||||
You do not have permission to access this resource.
|
||||
<?php elseif ($code === 401): ?>
|
||||
Please log in to access this page.
|
||||
<?php else: ?>
|
||||
An unexpected error occurred. The administrators have been notified.
|
||||
<?php endif; ?>
|
||||
</p>
|
||||
<div class="error-actions">
|
||||
<a href="/dashboard" class="btn btn-primary">Go to Dashboard</a>
|
||||
<button class="btn btn-secondary" onclick="history.back()">Go Back</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user