Refactor routing in App.vue and Login.vue to redirect to the home page instead of the dashboard. Remove unused Users.vue component to streamline the codebase. Update Dockerfile to adjust Nginx configuration for landing page deployment.

This commit is contained in:
Omar Sánchez Pizarro
2026-01-21 00:16:26 +01:00
parent c1716b2193
commit ed2107086c
4 changed files with 7 additions and 710 deletions

View File

@@ -9,7 +9,7 @@
>
<!-- Logo -->
<div class="flex items-center justify-between h-16 px-4 border-b border-gray-200 dark:border-gray-700">
<router-link v-if="!sidebarCollapsed" to="/dashboard" class="flex items-center space-x-3 flex-1 min-w-0 group">
<router-link v-if="!sidebarCollapsed" to="/" class="flex items-center space-x-3 flex-1 min-w-0 group">
<div class="flex-shrink-0 w-10 h-10 rounded-lg overflow-hidden ring-2 ring-gray-200 dark:ring-gray-700 group-hover:ring-primary-500 transition-all">
<img
src="/logo.jpg"
@@ -22,7 +22,7 @@
<p class="text-xs text-gray-500 dark:text-gray-400">Admin Panel</p>
</div>
</router-link>
<router-link v-else to="/dashboard" class="flex items-center justify-center w-full group">
<router-link v-else to="/" class="flex items-center justify-center w-full group">
<div class="w-10 h-10 rounded-lg overflow-hidden ring-2 ring-gray-200 dark:ring-gray-700 group-hover:ring-primary-500 transition-all">
<img
src="/logo.jpg"

View File

@@ -259,7 +259,7 @@ async function handleLogin() {
// Si llegamos aquí, el login fue exitoso
// Redirigir al dashboard
router.push('/dashboard');
router.push('/');
// Disparar evento para que App.vue se actualice
window.dispatchEvent(new CustomEvent('auth-login'));
@@ -275,7 +275,7 @@ async function handleLogin() {
onMounted(() => {
// Si ya está autenticado, redirigir al dashboard
if (authService.hasCredentials()) {
router.push('/dashboard');
router.push('/');
return;
}