Sindbad~EG File Manager

Current Path : /home/copmadinaarea/thecopmadinaarea.org/portal/
Upload File :
Current File : /home/copmadinaarea/thecopmadinaarea.org/portal/test_chat_animation.html

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Test Chat Animation</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            max-width: 600px;
            margin: 50px auto;
            padding: 20px;
            background: #f5f5f5;
        }
        .card {
            background: white;
            padding: 30px;
            border-radius: 16px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
            margin-bottom: 20px;
        }
        h1 {
            color: #1E40AF;
            margin-bottom: 10px;
        }
        button {
            background: linear-gradient(135deg, #1E40AF 0%, #9333EA 100%);
            color: white;
            border: none;
            padding: 12px 24px;
            border-radius: 8px;
            font-weight: bold;
            cursor: pointer;
            margin: 5px;
        }
        button:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.2);
        }
        .info {
            background: #e0e7ff;
            padding: 15px;
            border-radius: 8px;
            margin: 15px 0;
            border-left: 4px solid #1E40AF;
        }
        .success {
            background: #d1fae5;
            border-left-color: #10B981;
        }
        .code {
            background: #1f2937;
            color: #10B981;
            padding: 15px;
            border-radius: 8px;
            font-family: 'Courier New', monospace;
            font-size: 13px;
            overflow-x: auto;
        }
    </style>
</head>
<body>
    <div class="card">
        <h1>๐ŸŽฌ Chat Animation Tester</h1>
        <p>Use this page to test the chat widget animation</p>
    </div>

    <div class="card">
        <h2>๐Ÿ“‹ Animation Timeline</h2>
        <div class="info">
            <strong>What happens when you load a page:</strong><br><br>
            <strong>3 seconds:</strong> Button bounces + notification badge appears + pulse starts<br>
            <strong>5 seconds:</strong> Welcome bubble slides in from right<br>
            <strong>20 seconds:</strong> Everything auto-hides if not clicked
        </div>
    </div>

    <div class="card">
        <h2>๐Ÿงช Test Actions</h2>
        
        <button onclick="resetAndTest()">
            ๐Ÿ”„ Reset & Test Animation
        </button>
        
        <button onclick="clearStorage()">
            ๐Ÿ—‘๏ธ Clear Storage Only
        </button>
        
        <button onclick="checkStatus()">
            โ„น๏ธ Check Status
        </button>
        
        <div id="status" style="margin-top: 20px;"></div>
    </div>

    <div class="card">
        <h2>๐ŸŽฏ How to Test</h2>
        <ol>
            <li>Click "<strong>Reset & Test Animation</strong>" button above</li>
            <li>Watch the animation sequence</li>
            <li>The welcome bubble will appear after 5 seconds</li>
            <li>Click "Start Chatting" or close button to interact</li>
            <li>Refresh the page - animation won't show again (remembered)</li>
            <li>Click "Reset" again to see it again</li>
        </ol>
    </div>

    <div class="card">
        <h2>๐Ÿ’พ LocalStorage Keys</h2>
        <p>The chat widget uses these localStorage keys:</p>
        <div class="code">
            chat_welcome_dismissed  // User closed welcome bubble<br>
            chat_used              // User has opened a chat
        </div>
    </div>

    <div class="card">
        <h2>๐ŸŽจ Animation Features</h2>
        <ul>
            <li>โœจ <strong>Bounce Animation</strong> - Button bounces to grab attention</li>
            <li>๐Ÿ”ด <strong>Notification Badge</strong> - Red badge shows "new" indicator</li>
            <li>๐Ÿ’ซ <strong>Pulse Effect</strong> - Button pulses continuously</li>
            <li>๐Ÿ’ฌ <strong>Welcome Bubble</strong> - Slides in with welcome message</li>
            <li>๐Ÿ“ฑ <strong>Mobile Responsive</strong> - Works on all screen sizes</li>
            <li>๐Ÿง  <strong>Smart Memory</strong> - Doesn't annoy returning users</li>
        </ul>
    </div>

    <script>
        function resetAndTest() {
            // Clear localStorage
            localStorage.removeItem('chat_welcome_dismissed');
            localStorage.removeItem('chat_used');
            
            // Show success message
            const status = document.getElementById('status');
            status.innerHTML = '<div class="info success">โœ… <strong>Storage cleared!</strong><br>Redirecting to home page to see animation...</div>';
            
            // Redirect to home after 1.5 seconds
            setTimeout(() => {
                window.location.href = 'index.php';
            }, 1500);
        }
        
        function clearStorage() {
            localStorage.removeItem('chat_welcome_dismissed');
            localStorage.removeItem('chat_used');
            
            const status = document.getElementById('status');
            status.innerHTML = '<div class="info success">โœ… Storage cleared! Refresh any page to see the animation.</div>';
        }
        
        function checkStatus() {
            const dismissed = localStorage.getItem('chat_welcome_dismissed');
            const used = localStorage.getItem('chat_used');
            
            const status = document.getElementById('status');
            status.innerHTML = `
                <div class="info">
                    <strong>Current Status:</strong><br><br>
                    Welcome Dismissed: <strong>${dismissed ? 'Yes โŒ' : 'No โœ…'}</strong><br>
                    Chat Used: <strong>${used ? 'Yes โŒ' : 'No โœ…'}</strong><br><br>
                    ${!dismissed && !used ? 'โœ… Animation will show on next page load!' : 'โš ๏ธ Animation will be skipped (user has interacted before)'}
                </div>
            `;
        }
    </script>
</body>
</html>

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists