fix: moodboard no-repeat + higher res uploads (1200px instead of 400px)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Etienne Delvarre
2026-05-29 14:53:47 +02:00
parent 405a249ed0
commit 7466616675
+2 -2
View File
@@ -291,7 +291,7 @@ window.dispatchEvent(new Event('tiptap-loaded'));
.mood-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.mood-card { position: relative; border-radius: 10px; overflow: hidden; background: var(--bg-alt); border: 1px solid var(--border); }
.mood-card-img { width: 100%; aspect-ratio: 1; background-size: cover; background-position: center; cursor: pointer; background-color: var(--bg-alt); display: flex; align-items: center; justify-content: center; user-select: none; }
.mood-card-img { width: 100%; aspect-ratio: 1; background-size: cover; background-position: center; background-repeat: no-repeat; cursor: pointer; background-color: var(--bg-alt); display: flex; align-items: center; justify-content: center; user-select: none; }
.mood-card-img.has-image { cursor: grab; }
.mood-card-img.has-image.dragging { cursor: grabbing; }
.mood-card-img.empty { border: 1px dashed var(--border); border-radius: 10px 10px 0 0; }
@@ -1314,7 +1314,7 @@ document.addEventListener('DOMContentLoaded', () => {
reader.onload = (e) => {
const img = new Image();
img.onload = async () => {
const maxW = 400;
const maxW = 1200;
let w = img.width, h = img.height;
if (w > maxW) { h = Math.round(h * maxW / w); w = maxW; }
const canvas = document.createElement('canvas');