# -*- coding: utf-8 -*- import os import streamlit as st from app_core.config.settings import AppSettings from app_core.services.auth_service import AuthService from app_core.ui.auth_ui import render_auth_card from app_core.ui.layout import apply_global_style, render_topbar, render_header, render_sidebar_logo settings = AppSettings() # loads env # App config st.set_page_config( page_title="Workolik", page_icon="assets/workolik.png", layout="wide", initial_sidebar_state="expanded", ) apply_global_style(background_url=os.getenv("BACKGROUND_IMAGE_URL")) auth_service = AuthService() # Initialize session state if "auth_user" not in st.session_state: st.session_state.auth_user = None # ✅ FIXED MENU (no emojis here) menu = ["Analytics", "Data", "Mailer", "Mappings"] # ✅ ICON MAP icons = { "Analytics": "📊", "Data": "📦", "Mailer": "✉️", "Mappings": "📋" } if st.session_state.auth_user is None: render_topbar() st.markdown('', unsafe_allow_html=True) render_auth_card(auth_service) st.stop() # Topbar render_topbar() # Dim background st.markdown(""" """, unsafe_allow_html=True) with st.sidebar: render_sidebar_logo() st.markdown('', unsafe_allow_html=True) # ✅ ROUTING FIXED (no emojis in condition) if choice == "Analytics": from pages.see_logs import render_page render_page() elif choice == "Data": from pages.see_payload import render_page render_page() elif choice == "Mailer": from pages.mailer import render_page render_page() elif choice == "Mappings": from pages.mappings import render_page render_page()