Spaces:
Build error
Build error
File size: 863 Bytes
fb0e132 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | import streamlit as st
st.title("Bienvenue sur Collabteam ๐")
if "is_logged_in" not in st.session_state:
st.session_state.is_logged_in = False
if not st.session_state.is_logged_in:
st.subheader("Connexion")
email = st.text_input("Email")
password = st.text_input("Mot de passe", type="password")
if st.button("Se connecter"):
if email == "admin@entreprise.fr" and password == "motdepasse123":
st.session_state.is_logged_in = True
st.session_state.role = "admin"
elif email == "user@entreprise.fr" and password == "motdepasse123":
st.session_state.is_logged_in = True
st.session_state.role = "user"
else:
st.error("Identifiants incorrects")
else:
st.success(f"Bienvenue, {st.session_state.role} ! ๐")
st.write("Le reste de l'app viendra ici.") |