shaheerawan3 commited on
Commit
78ce100
·
verified ·
1 Parent(s): 6ef4ead

Update views.py

Browse files
Files changed (1) hide show
  1. views.py +23 -0
views.py CHANGED
@@ -1,7 +1,9 @@
1
  import pyotp
 
2
  import streamlit as st
3
  from datetime import datetime
4
  from uuid import uuid4
 
5
  from typing import List, Dict, Optional
6
  import bcrypt
7
  import re
@@ -12,7 +14,28 @@ from utils.security import (
12
  verify_jwt_token,
13
  log_security_event
14
  )
 
15
  from utils.audit import audit_logger
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
 
17
  def logout_user():
18
  st.session_state.clear()
 
1
  import pyotp
2
+ import time
3
  import streamlit as st
4
  from datetime import datetime
5
  from uuid import uuid4
6
+ import logging
7
  from typing import List, Dict, Optional
8
  import bcrypt
9
  import re
 
14
  verify_jwt_token,
15
  log_security_event
16
  )
17
+
18
  from utils.audit import audit_logger
19
+ from dashboard_components import dashboard_header, account_linking_form
20
+
21
+ # Configure logging
22
+ logger = logging.getLogger(__name__)
23
+
24
+ def show_dashboard():
25
+ """Display the main dashboard."""
26
+ # Apply custom styling
27
+ apply_custom_css()
28
+
29
+ # Show dashboard header
30
+ dashboard_header(lambda: logout_user())
31
+
32
+ # Get and display accounts
33
+ accounts = get_user_accounts(st.session_state.user['id'])
34
+
35
+ if not accounts:
36
+ st.info("No digital accounts added yet. Click 'Add Account' to get started.")
37
+ return
38
+
39
 
40
  def logout_user():
41
  st.session_state.clear()