thinh-vu commited on
Commit
4e02550
·
verified ·
1 Parent(s): fe55674

Update init.py

Browse files
Files changed (1) hide show
  1. init.py +8 -6
init.py CHANGED
@@ -38,6 +38,13 @@ try:
38
 
39
  center_col = st.columns([1, 3, 1])[1]
40
 
 
 
 
 
 
 
 
41
  if st.session_state["authentication_status"]:
42
  chart_tab, account_tab = st.tabs(['Home', 'Account'])
43
 
@@ -49,12 +56,7 @@ try:
49
  st.write(f'Xin chào *{st.session_state["name"]}*!')
50
  st.markdown('### Đăng xuất')
51
  auth.logout('Đăng xuất')
52
- else: # need login first
53
- with center_col:
54
- st.image('https://vnstock.site/wp-content/uploads/2023/07/vnstock-logo-120x60.jpg', width=120)
55
- st.markdown('Sử dụng tài khoản và mật khẩu của bạn để đăng nhập! Liên hệ với admin nếu bạn chưa có tài khoản!')
56
- auth, conf = authorize.load_config()
57
- auth.login()
58
 
59
  except:
60
  st.warning('Something went wrong! Please try again!')
 
38
 
39
  center_col = st.columns([1, 3, 1])[1]
40
 
41
+ with center_col:
42
+ st.image('https://vnstock.site/wp-content/uploads/2023/07/vnstock-logo-120x60.jpg', width=120)
43
+ if not st.session_state["authentication_status"]:
44
+ st.markdown('Sử dụng tài khoản và mật khẩu của bạn để đăng nhập! Liên hệ với admin nếu bạn chưa có tài khoản!')
45
+ auth, conf = authorize.load_config()
46
+ auth.login()
47
+
48
  if st.session_state["authentication_status"]:
49
  chart_tab, account_tab = st.tabs(['Home', 'Account'])
50
 
 
56
  st.write(f'Xin chào *{st.session_state["name"]}*!')
57
  st.markdown('### Đăng xuất')
58
  auth.logout('Đăng xuất')
59
+
 
 
 
 
 
60
 
61
  except:
62
  st.warning('Something went wrong! Please try again!')