JARVISXIRONMAN commited on
Commit
9239f4f
Β·
verified Β·
1 Parent(s): e90cdaf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -8
app.py CHANGED
@@ -95,21 +95,21 @@ else:
95
  )
96
  st.button("❌ Cancel", key=f"cancel_{task_index}", on_click=lambda i=task_index: st.session_state.edit_mode.__setitem__(i, False))
97
 
98
- # --------- View Mode ---------
99
  else:
100
  status = "βœ…" if task["completed"] else "πŸ”²"
101
  task_text = f"~~{task['task']}~~" if task["completed"] else task["task"]
102
  st.markdown(f"**{status} {task_text}**")
103
 
104
- # βœ”οΈ Completed at the top
105
  if task["completed"]:
106
  st.markdown("<span style='color:green;'>βœ”οΈ Completed</span>", unsafe_allow_html=True)
107
 
108
- # Minimal spacing, each on its own line
109
- st.markdown(f"πŸ“… **Due:** {task['due']}")
110
- st.markdown(f"| 🎯 **Priority:** `{task['priority']}`")
111
- st.markdown(f"| πŸ—‚οΈ **Category:** `{task['category'] or 'None'}`")
112
- st.markdown(f"| πŸ•’ **Created:** {task['created']}")
 
113
 
114
  btn_cols = st.columns([0.2, 0.2])
115
  btn_cols[0].button("✏️ Edit", key=f"edit_{task_index}", on_click=lambda i=task_index: st.session_state.edit_mode.__setitem__(i, True))
@@ -118,6 +118,5 @@ else:
118
  st.session_state.edit_mode.pop(i)
119
  ))
120
 
121
- # --------- Footer ---------
122
  st.markdown("---")
123
  st.markdown("<p style='text-align:center; font-size: 13px;'>Built with ❀️ using Streamlit. Data resets on refresh.</p>", unsafe_allow_html=True)
 
95
  )
96
  st.button("❌ Cancel", key=f"cancel_{task_index}", on_click=lambda i=task_index: st.session_state.edit_mode.__setitem__(i, False))
97
 
 
98
  else:
99
  status = "βœ…" if task["completed"] else "πŸ”²"
100
  task_text = f"~~{task['task']}~~" if task["completed"] else task["task"]
101
  st.markdown(f"**{status} {task_text}**")
102
 
103
+ # βœ”οΈ Completed (Top) + Info on new lines (minimal spacing)
104
  if task["completed"]:
105
  st.markdown("<span style='color:green;'>βœ”οΈ Completed</span>", unsafe_allow_html=True)
106
 
107
+ st.markdown(f"""
108
+ πŸ“… **Due:** {task['due']}
109
+ | 🎯 **Priority:** `{task['priority']}`
110
+ | πŸ—‚οΈ **Category:** `{task['category'] or 'None'}`
111
+ | πŸ•’ **Created:** {task['created']}
112
+ """, unsafe_allow_html=True)
113
 
114
  btn_cols = st.columns([0.2, 0.2])
115
  btn_cols[0].button("✏️ Edit", key=f"edit_{task_index}", on_click=lambda i=task_index: st.session_state.edit_mode.__setitem__(i, True))
 
118
  st.session_state.edit_mode.pop(i)
119
  ))
120
 
 
121
  st.markdown("---")
122
  st.markdown("<p style='text-align:center; font-size: 13px;'>Built with ❀️ using Streamlit. Data resets on refresh.</p>", unsafe_allow_html=True)