From 78077aa494ce199b4cacc3cf8dfff967c9793033 Mon Sep 17 00:00:00 2001
From: josedario87 <71241187+josedario87@users.noreply.github.com>
Date: Wed, 11 Jun 2025 04:41:16 -0600
Subject: [PATCH] Replace chat page with floating widget
---
ui/src/App.vue | 2 +
ui/src/components/chat/FloatingChat.vue | 69 +++++++++++++++++++++++++
ui/src/components/ui/NavBar.vue | 3 +-
ui/src/router/index.js | 4 +-
ui/src/views/ChatView.vue | 39 --------------
5 files changed, 74 insertions(+), 43 deletions(-)
create mode 100644 ui/src/components/chat/FloatingChat.vue
delete mode 100644 ui/src/views/ChatView.vue
diff --git a/ui/src/App.vue b/ui/src/App.vue
index dd4e2d8..dd214d8 100644
--- a/ui/src/App.vue
+++ b/ui/src/App.vue
@@ -2,6 +2,7 @@
import { watchEffect, computed } from 'vue' // Added computed
import TopBar from '@/components/ui/TopBar.vue'
import NavBar from '@/components/ui/NavBar.vue'
+import FloatingChat from '@/components/chat/FloatingChat.vue'
import { useUi } from '@/stores/useUi'
const ui = useUi()
@@ -71,6 +72,7 @@ const transitionDurationStyle = computed(() => {
]" :style="transitionDurationStyle">
+
diff --git a/ui/src/components/chat/FloatingChat.vue b/ui/src/components/chat/FloatingChat.vue
new file mode 100644
index 0000000..63b52f6
--- /dev/null
+++ b/ui/src/components/chat/FloatingChat.vue
@@ -0,0 +1,69 @@
+
+
+
+
+
+
+
diff --git a/ui/src/components/ui/NavBar.vue b/ui/src/components/ui/NavBar.vue
index 464b314..22e34b8 100644
--- a/ui/src/components/ui/NavBar.vue
+++ b/ui/src/components/ui/NavBar.vue
@@ -9,7 +9,6 @@ const realtime = useRealtimeStore()
// enlaces de la app
const links = [
- { to: '/', label: 'Chat', icon: 'π¬' },
{ to: '/empleados', label: 'Empleados', icon: 'π₯' },
{ to: '/tareas', label: 'Tareas', icon: 'π' },
{ to: '/planillas', label: 'Planillas', icon: 'π' },
@@ -38,7 +37,7 @@ const accentColorForPath = (path) => {
if (path.startsWith('/asistencias')) return ui.accentColorAsistencias
if (path.startsWith('/feed')) return ui.primaryColor
if (path.startsWith('/config')) return ui.accentColorConfiguracion
- return ui.accentColorChat
+ return ui.primaryColor
}
const tableForPath = (path) => {
diff --git a/ui/src/router/index.js b/ui/src/router/index.js
index d4a9628..dd1968f 100644
--- a/ui/src/router/index.js
+++ b/ui/src/router/index.js
@@ -1,8 +1,8 @@
import { createRouter, createMemoryHistory , createWebHashHistory} from 'vue-router'
const routes = [
- // Chat principal y config
- { path: '/', name: 'chat', component: () => import('@/views/ChatView.vue') },
+ // ConfiguraciΓ³n
+ { path: '/', redirect: '/empleados' },
{ path: '/config', name: 'settings', component: () => import('@/views/SettingsView.vue') },
// ββββββ Empleados ββββββ
diff --git a/ui/src/views/ChatView.vue b/ui/src/views/ChatView.vue
deleted file mode 100644
index ee86807..0000000
--- a/ui/src/views/ChatView.vue
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
-
-
-
-
-
-
-
-