diff --git a/services/premiere-plugin-uxp/manifest.json b/services/premiere-plugin-uxp/manifest.json index a749736..2f143e4 100644 --- a/services/premiere-plugin-uxp/manifest.json +++ b/services/premiere-plugin-uxp/manifest.json @@ -2,7 +2,7 @@ "manifestVersion": 5, "id": "net.wilddragon.dragonflight.uxp", "name": "Dragonflight MAM", - "version": "2.0.0", + "version": "2.0.1", "main": "index.html", "host": { "app": "premierepro", diff --git a/services/premiere-plugin-uxp/src/library.js b/services/premiere-plugin-uxp/src/library.js index e1d618b..f12ab77 100644 --- a/services/premiere-plugin-uxp/src/library.js +++ b/services/premiere-plugin-uxp/src/library.js @@ -92,12 +92,16 @@ const data = await API.listAssets(query); Library.state.assets = (data && (data.assets || data.rows)) || []; Library.render(); + // Surface count via toast so we can tell empty-grid (zero) from + // CSS-broken-grid (cards exist but invisible) at a glance. + if (UI.toast) UI.toast('Loaded ' + Library.state.assets.length + ' assets (total ' + (data.total || '?') + ')', 'ok'); } catch (e) { grid.innerHTML = ''; const err = document.createElement('div'); err.className = 'empty muted'; err.textContent = 'Error loading assets: ' + e.message; grid.appendChild(err); + if (UI.toast) UI.toast('Asset load failed: ' + e.message, 'error'); } }; diff --git a/services/premiere-plugin-uxp/src/main.js b/services/premiere-plugin-uxp/src/main.js index 4b0cd7d..45b0717 100644 --- a/services/premiere-plugin-uxp/src/main.js +++ b/services/premiere-plugin-uxp/src/main.js @@ -16,10 +16,9 @@ UI.setStatus('#connect-status', 'Connecting…', 'muted'); try { const me = await API.connect(serverUrl, apiToken); - UI.$('#connected-host').textContent = - (me.user && (me.user.display_name || me.user.username)) ? - (me.user.display_name || me.user.username) + ' @ ' + serverUrl - : serverUrl; + // /auth/me returns the user fields directly (no `user:` wrapper). + const who = (me && (me.display_name || me.username)) || serverUrl; + UI.$('#connected-host').textContent = who + (who === serverUrl ? '' : ' @ ' + serverUrl); UI.setStatus('#connect-status', '', 'muted'); UI.showPane('library'); await Library.refresh(''); diff --git a/services/premiere-plugin-uxp/styles.css b/services/premiere-plugin-uxp/styles.css index 248d429..4488e34 100644 --- a/services/premiere-plugin-uxp/styles.css +++ b/services/premiere-plugin-uxp/styles.css @@ -121,17 +121,22 @@ input:focus { border-color: var(--accent); } .library-controls input { flex: 1; } /* ── asset grid ──────────────────────────────────────────────────── */ +/* UXP's CSS engine doesn't support `grid-template-columns: repeat(auto-fill,…)` + or `aspect-ratio` reliably. Use flex-wrap with fixed-width cards + explicit + thumb height so cards always have visible size. */ .asset-grid { - flex: 1; + flex: 1 1 auto; + min-height: 0; /* allow shrinking inside flex column */ overflow-y: auto; - display: grid; - grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); + display: flex; + flex-wrap: wrap; gap: 6px; padding: 2px; - align-content: start; + align-content: flex-start; } .asset-card { + flex: 0 0 140px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 4px; @@ -145,14 +150,14 @@ input:focus { border-color: var(--accent); } .asset-thumb { width: 100%; - aspect-ratio: 16 / 9; + height: 80px; object-fit: cover; background: var(--bg-3); display: block; } .asset-thumb-placeholder { width: 100%; - aspect-ratio: 16 / 9; + height: 80px; background: var(--bg-3); display: flex; align-items: center;