mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-05-07 19:06:56 +02:00
This commit is contained in:
@@ -556,6 +556,205 @@
|
||||
}
|
||||
}
|
||||
|
||||
/* AI Scanner Security Banner */
|
||||
.ai-scanner-banner {
|
||||
position: fixed;
|
||||
top: 80px;
|
||||
left: 260px;
|
||||
right: 0;
|
||||
background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
|
||||
border-bottom: 2px solid #4f46e5;
|
||||
padding: 16px 30px;
|
||||
z-index: 998;
|
||||
box-shadow: 0 4px 20px rgba(99, 102, 241, 0.25);
|
||||
animation: slideDown 0.4s ease-out;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.ai-scanner-banner.show {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.ai-scanner-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 1.5rem;
|
||||
max-width: 1400px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.ai-scanner-icon {
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
border-radius: 12px;
|
||||
padding: 12px;
|
||||
backdrop-filter: blur(10px);
|
||||
border: 1px solid rgba(255, 255, 255, 0.3);
|
||||
}
|
||||
|
||||
.ai-scanner-icon i {
|
||||
color: white;
|
||||
font-size: 1.5rem;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.ai-scanner-text {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.ai-scanner-main-text {
|
||||
color: white;
|
||||
font-size: 1rem;
|
||||
font-weight: 600;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.ai-scanner-sub-text {
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
font-size: 0.875rem;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.ai-scanner-actions {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.ai-scanner-btn {
|
||||
background: white;
|
||||
color: #4f46e5;
|
||||
padding: 12px 24px;
|
||||
border-radius: 8px;
|
||||
text-decoration: none;
|
||||
font-weight: 600;
|
||||
font-size: 0.875rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
transition: all 0.3s ease;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.ai-scanner-btn:hover {
|
||||
background: #f8fafc;
|
||||
color: #4338ca;
|
||||
transform: translateY(-1px);
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.ai-scanner-btn::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: linear-gradient(45deg, rgba(255,255,255,0.1), rgba(255,255,255,0.3), rgba(255,255,255,0.1));
|
||||
transform: translateX(-100%);
|
||||
transition: transform 0.6s ease;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.ai-scanner-btn:hover::before {
|
||||
transform: translateX(100%);
|
||||
}
|
||||
|
||||
.ai-scanner-btn i {
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
.ai-scanner-close {
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
border: 1px solid rgba(255, 255, 255, 0.2);
|
||||
color: white;
|
||||
font-size: 1rem;
|
||||
cursor: pointer;
|
||||
padding: 8px;
|
||||
border-radius: 6px;
|
||||
transition: all 0.2s ease;
|
||||
backdrop-filter: blur(10px);
|
||||
}
|
||||
|
||||
.ai-scanner-close:hover {
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
transform: scale(1.05);
|
||||
}
|
||||
|
||||
/* Adjust main content when AI scanner banner is shown */
|
||||
.ai-scanner-shown #main-content {
|
||||
padding-top: 180px;
|
||||
}
|
||||
|
||||
/* Both banners shown */
|
||||
.notification-shown.ai-scanner-shown #main-content {
|
||||
padding-top: 220px;
|
||||
}
|
||||
|
||||
.notification-shown .ai-scanner-banner {
|
||||
top: 130px;
|
||||
}
|
||||
|
||||
/* Mobile responsive styles for AI Scanner banner */
|
||||
@media (max-width: 768px) {
|
||||
.ai-scanner-banner {
|
||||
left: 0;
|
||||
padding: 12px 20px;
|
||||
}
|
||||
|
||||
.ai-scanner-content {
|
||||
gap: 1rem;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.ai-scanner-text {
|
||||
min-width: 200px;
|
||||
}
|
||||
|
||||
.ai-scanner-main-text {
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.ai-scanner-sub-text {
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
|
||||
.ai-scanner-btn {
|
||||
padding: 10px 20px;
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
|
||||
.ai-scanner-icon {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.ai-scanner-icon i {
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.ai-scanner-content {
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.ai-scanner-actions {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.ai-scanner-close {
|
||||
position: absolute;
|
||||
top: 8px;
|
||||
right: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
/* Scrollbar */
|
||||
::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
@@ -1429,6 +1628,28 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- AI Scanner Security Notice -->
|
||||
<div id="ai-scanner-notification" class="ai-scanner-banner">
|
||||
<div class="ai-scanner-content">
|
||||
<div class="ai-scanner-icon">
|
||||
<i class="fas fa-brain"></i>
|
||||
</div>
|
||||
<div class="ai-scanner-text">
|
||||
<span class="ai-scanner-main-text">🛡️ Secure your websites with AI-powered malware detection</span>
|
||||
<span class="ai-scanner-sub-text">Advanced threat detection • Real-time scanning • Zero false positives</span>
|
||||
</div>
|
||||
<div class="ai-scanner-actions">
|
||||
<a href="/aiscanner/" class="ai-scanner-btn">
|
||||
<i class="fas fa-rocket"></i>
|
||||
Start AI Security Scan
|
||||
</a>
|
||||
</div>
|
||||
<button class="ai-scanner-close" onclick="dismissAIScannerNotification()">
|
||||
<i class="fas fa-times"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Main Content -->
|
||||
<div id="main-content">
|
||||
{% block content %}{% endblock %}
|
||||
@@ -1542,9 +1763,40 @@
|
||||
sessionStorage.setItem('backupNotificationDismissed', 'true');
|
||||
}
|
||||
|
||||
// Check backup status when page loads
|
||||
// AI Scanner Notification Functions
|
||||
function checkAIScannerStatus() {
|
||||
// Check if user has dismissed the notification in this session
|
||||
if (sessionStorage.getItem('aiScannerNotificationDismissed') === 'true') {
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if we're not already on the AI Scanner page
|
||||
if (!window.location.href.includes('aiscanner')) {
|
||||
showAIScannerNotification();
|
||||
}
|
||||
}
|
||||
|
||||
function showAIScannerNotification() {
|
||||
const banner = document.getElementById('ai-scanner-notification');
|
||||
const body = document.body;
|
||||
banner.classList.add('show');
|
||||
body.classList.add('ai-scanner-shown');
|
||||
}
|
||||
|
||||
function dismissAIScannerNotification() {
|
||||
const banner = document.getElementById('ai-scanner-notification');
|
||||
const body = document.body;
|
||||
banner.classList.remove('show');
|
||||
body.classList.remove('ai-scanner-shown');
|
||||
// Remember dismissal for this session
|
||||
sessionStorage.setItem('aiScannerNotificationDismissed', 'true');
|
||||
}
|
||||
|
||||
// Check both notification statuses when page loads
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
checkBackupStatus();
|
||||
// Show AI Scanner notification with a slight delay for better UX
|
||||
setTimeout(checkAIScannerStatus, 1000);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user