diff --git a/backend/app/api/settings.py b/backend/app/api/settings.py index 6ad49b8..15c52e9 100644 --- a/backend/app/api/settings.py +++ b/backend/app/api/settings.py @@ -6,7 +6,7 @@ from quart import Blueprint, jsonify, request from sqlalchemy import func, select from ..extensions import get_session -from ..models import AppSetting, ImageRecord, ImportBatch, ImportSettings, ImportTask, Tag +from ..models import AppSetting, Artist, ImageRecord, ImportBatch, ImportSettings, ImportTask, Tag settings_bp = Blueprint("settings", __name__, url_prefix="/api") @@ -118,6 +118,9 @@ async def system_stats(): storage_bytes = ( (await session.execute(select(func.coalesce(func.sum(ImageRecord.size_bytes), 0)))).scalar_one() ) + subscription_count = (await session.execute( + select(func.count(Artist.id)).where(Artist.is_subscription.is_(True)) + )).scalar_one() # Task counts grouped by status status_rows = ( @@ -163,6 +166,7 @@ async def system_stats(): "total_images": total_images, "total_tags": total_tags, "storage_bytes": storage_bytes, + "subscription_count": int(subscription_count), "tasks": { "pending": status_counts.get("pending", 0), "queued": status_counts.get("queued", 0), diff --git a/frontend/src/components/gallery/GalleryGrid.vue b/frontend/src/components/gallery/GalleryGrid.vue index 111cf61..8552c01 100644 --- a/frontend/src/components/gallery/GalleryGrid.vue +++ b/frontend/src/components/gallery/GalleryGrid.vue @@ -86,7 +86,7 @@ function imagesForGroup(group) { } .fc-gallery-grid__items { display: grid; - grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); + grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; } .fc-gallery-grid__sentinel { @@ -101,7 +101,7 @@ function imagesForGroup(group) { } .fc-gallery-grid__skeleton { display: grid; - grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); + grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; } .fc-gallery-grid__skeleton-item { @@ -124,7 +124,7 @@ function imagesForGroup(group) { @media (max-width: 600px) { .fc-gallery-grid__items, .fc-gallery-grid__skeleton { - grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); + grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 4px; } } diff --git a/frontend/src/components/settings/SystemStatsCards.vue b/frontend/src/components/settings/SystemStatsCards.vue index 92d9ba7..fda022f 100644 --- a/frontend/src/components/settings/SystemStatsCards.vue +++ b/frontend/src/components/settings/SystemStatsCards.vue @@ -1,6 +1,6 @@