diff --git a/baseTemplate/templates/baseTemplate/index.html b/baseTemplate/templates/baseTemplate/index.html index 0fe34127a..72909a0e2 100644 --- a/baseTemplate/templates/baseTemplate/index.html +++ b/baseTemplate/templates/baseTemplate/index.html @@ -296,38 +296,51 @@ align-items: center; justify-content: center; } + /* Notification dropdown: always light panel with dark text so readable in both light and dark mode */ .notification-center-dropdown { position: absolute; top: calc(100% + 10px); right: 0; - background: white; - border: 1px solid var(--border-color); + background: #ffffff; + border: 1px solid #e5e7eb; border-radius: 16px; box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15); width: 520px; max-width: calc(100vw - 40px); max-height: 600px; - overflow-y: auto; - z-index: 10000; display: none; + flex-direction: column; + z-index: 10000; + overflow: hidden; + min-height: 0; } - .notification-center-dropdown.show { display: block; } - .notification-center-header { + .notification-center-dropdown.show { display: flex; } + .notification-center-dropdown .notification-center-header { padding: 1.25rem 1.5rem; - border-bottom: 1px solid var(--border-color); + border-bottom: 1px solid #e5e7eb; display: flex; justify-content: space-between; align-items: center; + flex-shrink: 0; } - .notification-center-header h3 { margin: 0; font-size: 1.25rem; font-weight: 700; } - .notification-center-list { padding: 1rem; } - .notification-center-empty { color: var(--text-secondary); padding: 1rem; } + .notification-center-dropdown .notification-center-header h3 { margin: 0; font-size: 1.25rem; font-weight: 700; color: #111827; } + .notification-center-list { + padding: 1rem; + flex: 1 1 0; + min-height: 0; + max-height: 480px; + overflow-y: auto; + overflow-x: hidden; + -webkit-overflow-scrolling: touch; + } + #notification-center-dropdown .notification-center-empty { color: #4b5563; padding: 1rem; } .notification-center-item { padding: 1.5rem; - border: 1px solid var(--border-color); + border: 1px solid #e5e7eb; border-radius: 12px; margin-bottom: 1rem; - background: white; + background: #ffffff; + overflow: visible; } .notification-center-item.dismissed { opacity: 0.7; background: #f9fafb; } .notification-center-item-title { @@ -336,36 +349,69 @@ display: flex; align-items: center; gap: 0.75rem; + color: #111827; } .notification-center-item-title .dismissed-badge { font-size: 0.75rem; - color: #6b7280; + color: #374151; margin-left: auto; padding: 0.25rem 0.5rem; - background: #f3f4f6; + background: #e5e7eb; border-radius: 6px; } - .notification-center-item-text { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 1rem; line-height: 1.6; } - .notification-center-item-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; } - .notification-center-item-link { - display: inline-flex; - align-items: center; - gap: 0.5rem; - color: white; - background: linear-gradient(135deg, var(--accent-color) 0%, #6d6bd4 100%); - text-decoration: none; - font-size: 0.9rem; - font-weight: 600; - padding: 0.75rem 1.5rem; - border-radius: 10px; + #notification-center-dropdown .notification-center-item-text { color: #4b5563; font-size: 0.95rem; margin-bottom: 1rem; line-height: 1.6; } + #notification-center-dropdown .notification-center-item-actions { + display: flex; + flex-direction: column; + gap: 1.25rem; + align-items: flex-start; + margin-top: 0.75rem; + width: 100%; } - .notification-center-item-link-secondary { + #notification-center-dropdown .notification-center-item-actions .notification-center-item-link { display: inline-flex; align-items: center; - gap: 0.5rem; - color: var(--accent-color); + justify-content: center; + gap: 0.4rem; + color: #ffffff !important; + background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%) !important; text-decoration: none; - font-size: 0.9rem; + font-size: 0.875rem; + font-weight: 600; + padding: 0.5rem 1.25rem; + border-radius: 8px; + white-space: nowrap; + flex-shrink: 0; + min-width: 160px; + width: auto; + min-height: 2.25rem; + line-height: 1.3; + box-sizing: border-box; + } + #notification-center-dropdown .notification-center-item-actions .notification-center-item-link:hover { + filter: brightness(1.1); + color: #ffffff !important; + } + #notification-center-dropdown .notification-center-item-actions .notification-center-item-link-secondary { + display: inline-flex; + align-items: center; + gap: 0.4rem; + color: #4338ca !important; + text-decoration: none; + font-size: 0.875rem; + font-weight: 500; + padding: 0.4rem 0.75rem; + white-space: nowrap; + flex-shrink: 0; + min-width: 120px; + width: auto; + min-height: 1.75rem; + line-height: 1.3; + box-sizing: border-box; + } + #notification-center-dropdown .notification-center-item-actions .notification-center-item-link-secondary:hover { + text-decoration: underline; + color: #3730a3 !important; } /* Sidebar */ @@ -2510,6 +2556,10 @@ document.addEventListener('DOMContentLoaded', function() { loadNotificationCenter(); checkBackupStatus(); + // Optional: open notification dropdown for testing (e.g. ?showNotifications=1) + if (window.location.search.indexOf('showNotifications=1') !== -1) { + setTimeout(function() { document.getElementById('notification-center-dropdown').classList.add('show'); }, 400); + } // Show AI Scanner notification with a slight delay for better UX setTimeout(checkAIScannerStatus, 1000); // Show .htaccess notification with additional delay for staggered effect diff --git a/cyberpanel.sh b/cyberpanel.sh index 8632e0935..338293d2e 100644 --- a/cyberpanel.sh +++ b/cyberpanel.sh @@ -841,29 +841,27 @@ except: fi fi - # Download the working CyberPanel installation files - # Use master3395 fork which has our fixes - # Try to download the actual installer script (install/install.py) from the repository - echo "Downloading from: https://raw.githubusercontent.com/master3395/cyberpanel/v2.5.5-dev/cyberpanel.sh" + # Download the working CyberPanel installation files from upstream (usmannasir/cyberpanel) + echo "Downloading from: https://raw.githubusercontent.com/usmannasir/cyberpanel/v2.5.5-dev/cyberpanel.sh" # First, try to download the repository archive to get the correct installer # GitHub: branch archives use refs/heads/BRANCH; GitHub returns 302 redirect to codeload, so we must use -L local archive_url="" - local installer_url="https://raw.githubusercontent.com/master3395/cyberpanel/v2.5.5-dev/cyberpanel.sh" - if curl -s -L --head "https://github.com/master3395/cyberpanel/archive/refs/heads/v2.5.5-dev.tar.gz" | grep -q "200 OK"; then - archive_url="https://github.com/master3395/cyberpanel/archive/refs/heads/v2.5.5-dev.tar.gz" - echo " Using development branch (v2.5.5-dev) from master3395/cyberpanel" - elif curl -s -L --head "https://github.com/master3395/cyberpanel/archive/v2.5.5-dev.tar.gz" | grep -q "200 OK"; then - archive_url="https://github.com/master3395/cyberpanel/archive/v2.5.5-dev.tar.gz" - echo " Using development branch (v2.5.5-dev) from master3395/cyberpanel" + local installer_url="https://raw.githubusercontent.com/usmannasir/cyberpanel/v2.5.5-dev/cyberpanel.sh" + if curl -s -L --head "https://github.com/usmannasir/cyberpanel/archive/refs/heads/v2.5.5-dev.tar.gz" | grep -q "200 OK"; then + archive_url="https://github.com/usmannasir/cyberpanel/archive/refs/heads/v2.5.5-dev.tar.gz" + echo " Using development branch (v2.5.5-dev) from usmannasir/cyberpanel" + elif curl -s -L --head "https://github.com/usmannasir/cyberpanel/archive/v2.5.5-dev.tar.gz" | grep -q "200 OK"; then + archive_url="https://github.com/usmannasir/cyberpanel/archive/v2.5.5-dev.tar.gz" + echo " Using development branch (v2.5.5-dev) from usmannasir/cyberpanel" else echo " Development branch archive not available, trying installer script directly..." if ! curl -s -L --head "$installer_url" | grep -q "200 OK"; then echo " Development branch not available, falling back to stable" - installer_url="https://raw.githubusercontent.com/master3395/cyberpanel/stable/cyberpanel.sh" - archive_url="https://github.com/master3395/cyberpanel/archive/stable.tar.gz" + installer_url="https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/cyberpanel.sh" + archive_url="https://github.com/usmannasir/cyberpanel/archive/stable.tar.gz" else - archive_url="https://github.com/master3395/cyberpanel/archive/refs/heads/v2.5.5-dev.tar.gz" + archive_url="https://github.com/usmannasir/cyberpanel/archive/refs/heads/v2.5.5-dev.tar.gz" fi fi @@ -884,8 +882,8 @@ except: # Download the install directory (use archive_url set above; may be branch or stable) echo "Downloading installation files..." - if [ -z "$archive_url" ] || [ "$installer_url" = "https://raw.githubusercontent.com/master3395/cyberpanel/stable/cyberpanel.sh" ]; then - archive_url="https://github.com/master3395/cyberpanel/archive/stable.tar.gz" + if [ -z "$archive_url" ] || [ "$installer_url" = "https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/cyberpanel.sh" ]; then + archive_url="https://github.com/usmannasir/cyberpanel/archive/stable.tar.gz" fi # Append cache-bust so CDNs/proxies don't serve old installer (GitHub ignores query params) archive_url="${archive_url}?nocache=$(date +%s 2>/dev/null || echo 0)" @@ -904,7 +902,7 @@ except: fi # Copy install directory to current location - if [ "$installer_url" = "https://raw.githubusercontent.com/master3395/cyberpanel/stable/cyberpanel.sh" ]; then + if [ "$installer_url" = "https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/cyberpanel.sh" ]; then if [ -d "cyberpanel-stable" ]; then cp -r cyberpanel-stable/install . 2>/dev/null || true cp -r cyberpanel-stable/install.sh . 2>/dev/null || true diff --git a/cyberpanel_upgrade.sh b/cyberpanel_upgrade.sh index 4463a0db2..663eb6710 100644 --- a/cyberpanel_upgrade.sh +++ b/cyberpanel_upgrade.sh @@ -15,7 +15,7 @@ if [[ $(id -u) -ne 0 ]] 2>/dev/null; then echo "" echo "This script must be run as root." - echo "Run: sudo bash <(curl -sL https://raw.githubusercontent.com/master3395/cyberpanel/stable/cyberpanel_upgrade.sh) -b v2.5.5-dev" + echo "Run: sudo bash <(curl -sL https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/cyberpanel_upgrade.sh) -b v2.5.5-dev" echo "Or: sudo su - then run the same command without sudo" echo "" exit 1 diff --git a/databases/templates/databases/AutoLogin.html b/databases/templates/databases/AutoLogin.html index f8a897fb4..27ce557bd 100644 --- a/databases/templates/databases/AutoLogin.html +++ b/databases/templates/databases/AutoLogin.html @@ -10,6 +10,8 @@