@danhachuel/thunderbolt 0.4.68 → 0.4.70

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/app/main.py +17 -1
  2. package/package.json +1 -1
package/app/main.py CHANGED
@@ -2565,7 +2565,7 @@ def render_channels():
2565
2565
  st.success(f"Canal {channel['name']} guardado manualmente.")
2566
2566
  st.rerun()
2567
2567
 
2568
- channels = read_json("channels.json", [])
2568
+ channels = [channel for channel in read_json("channels.json", []) if is_youtube_channel_record(channel)]
2569
2569
  if not channels:
2570
2570
  return
2571
2571
  for channel in channels:
@@ -2601,6 +2601,22 @@ def render_channels():
2601
2601
  if st.button("Apagar", key=f"delete_{channel_id}", use_container_width=True):
2602
2602
  st.session_state[delete_key] = True
2603
2603
  st.rerun()
2604
+ if st.session_state.get(delete_key):
2605
+ st.warning("Apagar este canal YouTube e os dados locais associados?")
2606
+ confirm_cols = st.columns(2)
2607
+ with confirm_cols[0]:
2608
+ if st.button("Confirmar apagar", type="primary", key=f"confirm_delete_{channel_id}"):
2609
+ removed = delete_channel(channel_id)
2610
+ st.session_state.pop(delete_key, None)
2611
+ if removed is None:
2612
+ st.error("O canal já não existe ou não pôde ser removido.")
2613
+ else:
2614
+ st.success(f"Canal {removed.get('name') or channel_id} apagado.")
2615
+ st.rerun()
2616
+ with confirm_cols[1]:
2617
+ if st.button("Cancelar", key=f"cancel_delete_{channel_id}"):
2618
+ st.session_state.pop(delete_key, None)
2619
+ st.rerun()
2604
2620
  if st.session_state.get(edit_key):
2605
2621
  render_channel_edit_form(channel, youtube_account_ids, youtube_account_labels, youtube_accounts_by_id)
2606
2622
  else:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danhachuel/thunderbolt",
3
- "version": "0.4.68",
3
+ "version": "0.4.70",
4
4
  "description": "Thunderbolt — interface local para operação de canais faceless e motor MoneyPrinterTurbo",
5
5
  "license": "MIT",
6
6
  "main": "scripts/cli.mjs",