Add tests and fix issues

This commit is contained in:
2026-04-25 10:38:21 +02:00
parent a0bdf9e37e
commit d84a0eed3f
18 changed files with 911 additions and 567 deletions

View File

@@ -1,18 +1,19 @@
import streamlit as st
import logging
from logger import init_logger
from styles import init_styles
init_logger()
init_styles()
if st.user and not st.user.is_logged_in:
with st.container(width="stretch", height="stretch", horizontal_alignment="center"):
st.title("Daily Counter", width="stretch", text_alignment="center")
st.text("Please log in to use this app", width="stretch", text_alignment="center")
st.space()
if st.button("Log in"):
st.login()
if hasattr(st, 'user') and hasattr(st.user, 'is_logged_in'):
if not st.user.is_logged_in:
with st.container(width="stretch", height="stretch", horizontal_alignment="center"):
st.title("Daily Counter", width="stretch", text_alignment="center")
st.text("Please log in to use this app", width="stretch", text_alignment="center")
st.space()
if st.button("Log in"):
st.login()
else:
counters = st.Page("pages/counters.py", title="Counters", icon=":material/update:")
stats = st.Page("pages/stats.py", title="Statistics", icon=":material/chart_data:")