Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -38,29 +38,20 @@ if "active_project" not in st.session_state:
|
|
| 38 |
|
| 39 |
|
| 40 |
# =======================
|
| 41 |
-
# Sidebar Project Manager
|
| 42 |
# =======================
|
| 43 |
st.sidebar.title("📂 Chats / Projects")
|
| 44 |
|
| 45 |
-
#
|
| 46 |
st.markdown(
|
| 47 |
"""
|
| 48 |
<style>
|
| 49 |
[data-testid="stSidebar"] {
|
| 50 |
-
|
| 51 |
-
top: 0;
|
| 52 |
-
left: 0;
|
| 53 |
-
bottom: 0;
|
| 54 |
height: 100vh !important;
|
| 55 |
-
overflow-y: auto !important; /* scroll if too many chats */
|
| 56 |
-
padding-bottom: 2rem;
|
| 57 |
-
width: 300px !important; /* fixed sidebar width */
|
| 58 |
}
|
| 59 |
-
[data-testid="
|
| 60 |
-
|
| 61 |
-
/* shift main content so it’s not hidden under sidebar */
|
| 62 |
-
.main {
|
| 63 |
-
margin-left: 300px !important;
|
| 64 |
}
|
| 65 |
</style>
|
| 66 |
""",
|
|
@@ -94,7 +85,6 @@ with st.sidebar:
|
|
| 94 |
st.session_state.active_project = new_name
|
| 95 |
st.rerun()
|
| 96 |
|
| 97 |
-
|
| 98 |
# =======================
|
| 99 |
# Sidebar API Settings
|
| 100 |
# =======================
|
|
|
|
| 38 |
|
| 39 |
|
| 40 |
# =======================
|
| 41 |
+
# Sidebar Project Manager
|
| 42 |
# =======================
|
| 43 |
st.sidebar.title("📂 Chats / Projects")
|
| 44 |
|
| 45 |
+
# Sidebar only scrolls when hovered
|
| 46 |
st.markdown(
|
| 47 |
"""
|
| 48 |
<style>
|
| 49 |
[data-testid="stSidebar"] {
|
| 50 |
+
overflow-y: hidden !important; /* No scroll by default */
|
|
|
|
|
|
|
|
|
|
| 51 |
height: 100vh !important;
|
|
|
|
|
|
|
|
|
|
| 52 |
}
|
| 53 |
+
[data-testid="stSidebar"]:hover {
|
| 54 |
+
overflow-y: auto !important; /* Scroll only when hovered */
|
|
|
|
|
|
|
|
|
|
| 55 |
}
|
| 56 |
</style>
|
| 57 |
""",
|
|
|
|
| 85 |
st.session_state.active_project = new_name
|
| 86 |
st.rerun()
|
| 87 |
|
|
|
|
| 88 |
# =======================
|
| 89 |
# Sidebar API Settings
|
| 90 |
# =======================
|