g1a / modules /ui /views /user_dashboard.py
AIdeaText's picture
Update modules/ui/views/user_dashboard.py
614f4c2 verified
raw
history blame
787 Bytes
# modules/ui/views/user_dashboard.py
import gradio as gr
class DashboardView:
def __init__(self):
with gr.Blocks() as self.view:
with gr.Column():
gr.Markdown("# Panel de Control")
with gr.Row():
self.username_display = gr.Textbox(
label="Usuario",
interactive=False
)
self.role_display = gr.Textbox(
label="Rol",
interactive=False
)
self.logout_button = gr.Button("Cerrar Sesión")
@property
def submit(self):
return self.logout_button.click
def create_dashboard_view():
return DashboardView().view