Ashhar commited on
Commit
7822987
1 Parent(s): ffd533c

improved login screen

Browse files
Files changed (3) hide show
  1. auth.py +5 -1
  2. constants.py +1 -0
  3. icons/authenticity.png +0 -0
auth.py CHANGED
@@ -3,6 +3,10 @@ from typing import Callable, Any
3
  import streamlit as st
4
  from descope.descope_client import DescopeClient
5
  from descope.exceptions import AuthException
 
 
 
 
6
 
7
  DESCOPE_PROJECT_ID = os.environ.get("DESCOPE_PROJECT_ID")
8
  descopeClient = DescopeClient(project_id=DESCOPE_PROJECT_ID)
@@ -25,7 +29,7 @@ def authenticateFunc(func: Callable[[], Any]):
25
  except AuthException:
26
  st.error("Login failed!")
27
 
28
- st.warning("You're not logged in. Please login to continue")
29
  with st.container(border=False):
30
  if st.button(
31
  "Sign in with Google",
 
3
  import streamlit as st
4
  from descope.descope_client import DescopeClient
5
  from descope.exceptions import AuthException
6
+ import constants as C
7
+
8
+ from dotenv import load_dotenv
9
+ load_dotenv()
10
 
11
  DESCOPE_PROJECT_ID = os.environ.get("DESCOPE_PROJECT_ID")
12
  descopeClient = DescopeClient(project_id=DESCOPE_PROJECT_ID)
 
29
  except AuthException:
30
  st.error("Login failed!")
31
 
32
+ st.warning("Create magic. Login to begin!", icon=":material/login:")
33
  with st.container(border=False):
34
  if st.button(
35
  "Sign in with Google",
constants.py CHANGED
@@ -155,6 +155,7 @@ Note that the final story should include twist, turns and events that make it re
155
 
156
  USER_ICON = "icons/man.png"
157
  AI_ICON = "icons/Kommuneity.png"
 
158
  IMAGE_LOADER = "icons/Wedges.svg"
159
  TEXT_LOADER = "icons/balls.svg"
160
  DB_LOADER = "icons/db_loader.svg"
 
155
 
156
  USER_ICON = "icons/man.png"
157
  AI_ICON = "icons/Kommuneity.png"
158
+ LOGIN_ICON = "icons/authenticity.png"
159
  IMAGE_LOADER = "icons/Wedges.svg"
160
  TEXT_LOADER = "icons/balls.svg"
161
  DB_LOADER = "icons/db_loader.svg"
icons/authenticity.png ADDED