Spaces:
Running
Running
Jon Solow
commited on
Commit
·
52e3bda
1
Parent(s):
24d4e04
Add admin page for testing
Browse files
src/pages/99_Admin_Simulation.py
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
|
3 |
+
from config import DEFAULT_ICON
|
4 |
+
from shared_page import common_page_config
|
5 |
+
|
6 |
+
from login_component import is_token_in_session
|
7 |
+
|
8 |
+
|
9 |
+
def get_page():
|
10 |
+
page_title = "Yahoo FF League Simulation - ADMIN"
|
11 |
+
st.set_page_config(page_title=page_title, page_icon=DEFAULT_ICON, layout="wide")
|
12 |
+
common_page_config()
|
13 |
+
st.title(page_title)
|
14 |
+
|
15 |
+
if not is_token_in_session():
|
16 |
+
st.write("You must be a site admin in order to use this feature." " Please click Login button above.")
|
17 |
+
elif not st.session_state.user_admin:
|
18 |
+
st.write("You must be a site admin in order to use this feature.")
|
19 |
+
|
20 |
+
else:
|
21 |
+
st.write("Logged in. Feature to go here")
|
22 |
+
|
23 |
+
|
24 |
+
if __name__ == "__main__":
|
25 |
+
get_page()
|