Sindbad~EG File Manager
</div>
</main>
</div>
</div>
<!-- Vue.js App -->
<script>
const { createApp } = Vue;
createApp({
data() {
return {
showNotifications: false,
showUserMenu: false
}
},
mounted() {
// Close dropdowns when clicking outside
document.addEventListener('click', (e) => {
if (!e.target.closest('.relative')) {
this.showNotifications = false;
this.showUserMenu = false;
}
});
}
}).mount('#app');
</script>
<!-- Additional JavaScript -->
<script>
// Auto-hide success/error messages
setTimeout(function() {
const alerts = document.querySelectorAll('.alert-auto-hide');
alerts.forEach(alert => {
alert.style.transition = 'opacity 0.5s';
alert.style.opacity = '0';
setTimeout(() => alert.remove(), 500);
});
}, 5000);
// Confirm delete actions
function confirmDelete(message = 'Are you sure you want to delete this item?') {
return confirm(message);
}
// Show loading spinner for forms
function showLoading(button) {
const originalText = button.innerHTML;
button.innerHTML = '<i class="fas fa-spinner fa-spin mr-2"></i>Processing...';
button.disabled = true;
setTimeout(() => {
button.innerHTML = originalText;
button.disabled = false;
}, 3000);
}
// Format numbers with commas
function formatNumber(num) {
return num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
}
// Copy to clipboard
function copyToClipboard(text) {
navigator.clipboard.writeText(text).then(() => {
showToast('Copied to clipboard!', 'success');
});
}
// Show toast notifications
function showToast(message, type = 'info') {
const toast = document.createElement('div');
toast.className = `fixed top-4 right-4 z-50 p-4 rounded-lg shadow-lg text-white ${
type === 'success' ? 'bg-green-500' :
type === 'error' ? 'bg-red-500' :
type === 'warning' ? 'bg-yellow-500' : 'bg-blue-500'
}`;
toast.innerHTML = `
<div class="flex items-center">
<i class="fas fa-${type === 'success' ? 'check' : type === 'error' ? 'times' : type === 'warning' ? 'exclamation' : 'info'}-circle mr-2"></i>
<span>${message}</span>
</div>
`;
document.body.appendChild(toast);
setTimeout(() => {
toast.style.transition = 'opacity 0.5s';
toast.style.opacity = '0';
setTimeout(() => toast.remove(), 500);
}, 3000);
}
</script>
</body>
</html>
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists