@danhachuel/thunderbolt 0.7.27 → 0.7.28

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 +21 -1
  2. package/package.json +1 -1
package/app/main.py CHANGED
@@ -5651,7 +5651,27 @@ def render_thumbnails():
5651
5651
  return
5652
5652
 
5653
5653
  settings = read_json("settings.json", {})
5654
- for record in records:
5654
+ page_size = 24
5655
+ page_count = max(1, (len(records) + page_size - 1) // page_size)
5656
+ current_page = st.session_state.get("thumbnail_gallery_page", 1)
5657
+ try:
5658
+ current_page = min(max(int(current_page), 1), page_count)
5659
+ except (TypeError, ValueError):
5660
+ current_page = 1
5661
+ if page_count > 1:
5662
+ current_page = st.selectbox(
5663
+ "Página de thumbnails",
5664
+ options=list(range(1, page_count + 1)),
5665
+ index=current_page - 1,
5666
+ format_func=lambda value: f"Página {value} de {page_count}",
5667
+ key="thumbnail_gallery_page",
5668
+ )
5669
+ start = (current_page - 1) * page_size
5670
+ visible_records = records[start : start + page_size]
5671
+ st.caption(f"A mostrar {start + 1}–{min(start + page_size, len(records))} de {len(records)} thumbnails.")
5672
+ else:
5673
+ visible_records = records
5674
+ for record in visible_records:
5655
5675
  task_id = record["task_id"]
5656
5676
  with st.container(border=True):
5657
5677
  image_col, details_col, action_col = st.columns([1.25, 2.35, 1.7])
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@danhachuel/thunderbolt",
3
- "version": "0.7.27",
3
+ "version": "0.7.28",
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",