AIdeaText commited on
Commit
d9bc61b
verified
1 Parent(s): fd7ed81

Update modules/ui/router.py

Browse files
Files changed (1) hide show
  1. modules/ui/router.py +4 -5
modules/ui/router.py CHANGED
@@ -1,7 +1,8 @@
1
- # modules/ui/router.py
2
  import gradio as gr
3
- from .views import create_landing_view, create_login_view, create_dashboard_view
4
- from ..auth.session import SessionManager
 
 
5
 
6
  class Router:
7
  def __init__(self):
@@ -9,7 +10,6 @@ class Router:
9
  self.current_view = "landing"
10
 
11
  def switch_view(self, to_view, **kwargs):
12
- """Cambia entre vistas y actualiza el estado de la sesi贸n"""
13
  self.current_view = to_view
14
  views = {
15
  "landing": [True, False, False],
@@ -21,7 +21,6 @@ class Router:
21
  return [gr.update(visible=v) for v in views[to_view]]
22
 
23
  def create_router():
24
- """Crea y configura el router principal de la aplicaci贸n"""
25
  router = Router()
26
 
27
  with gr.Blocks(css="footer {display: none}") as app:
 
 
1
  import gradio as gr
2
+ from modules.ui.views.landing import create_landing_view
3
+ from modules.ui.views.login import create_login_view
4
+ from modules.ui.views.user_dashboard import create_dashboard_view
5
+ from modules.auth.session import SessionManager
6
 
7
  class Router:
8
  def __init__(self):
 
10
  self.current_view = "landing"
11
 
12
  def switch_view(self, to_view, **kwargs):
 
13
  self.current_view = to_view
14
  views = {
15
  "landing": [True, False, False],
 
21
  return [gr.update(visible=v) for v in views[to_view]]
22
 
23
  def create_router():
 
24
  router = Router()
25
 
26
  with gr.Blocks(css="footer {display: none}") as app: