Add AppImageHub.com OCS API as primary catalog source

Integrate the Pling/OCS REST API (appimagehub.com) as the primary catalog
source with richer metadata than the existing appimage.github.io feed.

Backend:
- Add OCS API fetch with pagination, lenient JSON deserializers for loosely
  typed numeric fields, and non-AppImage file filtering (.dmg, .exe, etc.)
- Database migration v17 adds OCS-specific columns (ocs_id, downloads, score,
  typename, personid, description, summary, version, tags, etc.)
- Deduplicate secondary source apps against OCS entries
- Shrink OCS CDN icon URLs from 770x540 to 100x100 for faster loading
- Clear stale screenshot and icon caches on sync
- Extract GitHub repo links from OCS HTML descriptions
- Add fetch_ocs_download_files() to get all version files for an app
- Resolve fresh JWT download URLs per slot at install time

Detail page:
- Fetch OCS download files on page open and populate install SplitButton
  with version dropdown (newest first, filtered for AppImage only)
- Show OCS metadata: downloads, score, author, typename, tags, comments,
  created/updated dates, architecture, filename, file size, MD5
- Prefer ocs_description (full HTML with features/changelog) over short
  summary for the About section
- Add html_to_description() to preserve formatting (lists, paragraphs)
- Remove redundant Download link from Links section
- Escape ampersands in Pango markup subtitles (categories, typename, tags)

Catalog view:
- OCS source syncs first as primary, appimage.github.io as secondary
- Featured apps consider OCS download counts alongside GitHub stars

UI:
- Add pulldown-cmark for GitHub README markdown rendering in detail pages
- Add build_markdown_view() widget for rendered markdown content
This commit is contained in:
lashman
2026-02-28 20:33:40 +02:00
parent f89aafca6a
commit 4b939f044a
16 changed files with 2394 additions and 417 deletions

View File

@@ -175,6 +175,58 @@ button.flat:not(.pill):not(.suggested-action):not(.destructive-action) {
min-height: 24px;
}
/* ===== Category Filter Tiles ===== */
.category-tile {
padding: 14px 18px;
min-height: 48px;
border-radius: 12px;
border: none;
font-weight: 600;
font-size: 0.9em;
color: white;
}
.category-tile image {
color: white;
opacity: 0.9;
}
/* Colored backgrounds per category */
.cat-accent { background: alpha(@accent_bg_color, 0.7); }
.cat-purple { background: alpha(@purple_3, 0.65); }
.cat-red { background: alpha(@red_3, 0.6); }
.cat-green { background: alpha(@success_bg_color, 0.55); }
.cat-orange { background: alpha(@orange_3, 0.65); }
.cat-blue { background: alpha(@blue_3, 0.6); }
.cat-amber { background: alpha(@warning_bg_color, 0.6); }
.cat-neutral { background: alpha(@window_fg_color, 0.2); }
/* Hover: intensify the background */
.cat-accent:hover { background: alpha(@accent_bg_color, 0.85); }
.cat-purple:hover { background: alpha(@purple_3, 0.8); }
.cat-red:hover { background: alpha(@red_3, 0.75); }
.cat-green:hover { background: alpha(@success_bg_color, 0.7); }
.cat-orange:hover { background: alpha(@orange_3, 0.8); }
.cat-blue:hover { background: alpha(@blue_3, 0.75); }
.cat-amber:hover { background: alpha(@warning_bg_color, 0.75); }
.cat-neutral:hover { background: alpha(@window_fg_color, 0.3); }
/* Checked: full-strength background + light border for emphasis */
.cat-accent:checked { background: @accent_bg_color; }
.cat-purple:checked { background: @purple_3; }
.cat-red:checked { background: @red_3; }
.cat-green:checked { background: @success_bg_color; }
.cat-orange:checked { background: @orange_3; }
.cat-blue:checked { background: @blue_3; }
.cat-amber:checked { background: @warning_bg_color; }
.cat-neutral:checked { background: alpha(@window_fg_color, 0.45); }
/* Focus indicator on the tile itself */
flowboxchild:focus-visible .category-tile {
outline: 2px solid @accent_bg_color;
outline-offset: 2px;
}
/* ===== Catalog Tile Cards ===== */
.catalog-tile {
border: 1px solid alpha(@window_fg_color, 0.12);