Delete modules/admin_ui.py
Browse files- modules/admin_ui.py +0 -21
modules/admin_ui.py
DELETED
|
@@ -1,21 +0,0 @@
|
|
| 1 |
-
import streamlit as st
|
| 2 |
-
from .database import create_student_user
|
| 3 |
-
|
| 4 |
-
def admin_page():
|
| 5 |
-
st.title("Panel de Administraci贸n AIdeaText")
|
| 6 |
-
st.write(f"Bienvenido, {st.session_state.username}")
|
| 7 |
-
|
| 8 |
-
st.header("Crear Nuevo Usuario Estudiante")
|
| 9 |
-
new_username = st.text_input("Correo electr贸nico del nuevo usuario", key="admin_new_username")
|
| 10 |
-
new_password = st.text_input("Contrase帽a", type="password", key="admin_new_password")
|
| 11 |
-
if st.button("Crear Usuario", key="admin_create_user"):
|
| 12 |
-
if create_student_user(new_username, new_password):
|
| 13 |
-
st.success(f"Usuario estudiante {new_username} creado exitosamente")
|
| 14 |
-
else:
|
| 15 |
-
st.error("Error al crear el usuario estudiante")
|
| 16 |
-
|
| 17 |
-
# Aqu铆 puedes a帽adir m谩s funcionalidades para el panel de administraci贸n
|
| 18 |
-
|
| 19 |
-
if st.button("Cerrar Sesi贸n", key="admin_logout"):
|
| 20 |
-
st.session_state.clear()
|
| 21 |
-
st.experimental_rerun()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|