Update modules/ui/views/user_dashboard.py
Browse files
modules/ui/views/user_dashboard.py
CHANGED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# modules/ui/views/user_dashboard.py
|
2 |
+
import gradio as gr
|
3 |
+
|
4 |
+
class DashboardView:
|
5 |
+
def __init__(self):
|
6 |
+
with gr.Blocks() as self.view:
|
7 |
+
with gr.Column():
|
8 |
+
gr.Markdown("# Panel de Control")
|
9 |
+
with gr.Row():
|
10 |
+
self.username_display = gr.Textbox(
|
11 |
+
label="Usuario",
|
12 |
+
interactive=False
|
13 |
+
)
|
14 |
+
self.role_display = gr.Textbox(
|
15 |
+
label="Rol",
|
16 |
+
interactive=False
|
17 |
+
)
|
18 |
+
|
19 |
+
self.logout_button = gr.Button("Cerrar Sesi贸n")
|
20 |
+
|
21 |
+
@property
|
22 |
+
def submit(self):
|
23 |
+
return self.logout_button.click
|
24 |
+
|
25 |
+
def create_dashboard_view():
|
26 |
+
return DashboardView().view
|