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:
@@ -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"
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user