From 49adf0206df861bef47f7c9537c85b34e2aa6b0b Mon Sep 17 00:00:00 2001 From: Andy Aylward Date: Sat, 27 Sep 2025 22:42:35 -0400 Subject: [PATCH 1/2] Revert "tweak action css (#134)" This reverts commit 0c2a700d4441a05d371d248a2c10cf4f30cfeabb. --- src/apps/tracy/pages/TracyPage.module.css | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/apps/tracy/pages/TracyPage.module.css b/src/apps/tracy/pages/TracyPage.module.css index b50e0b5..e6bee59 100644 --- a/src/apps/tracy/pages/TracyPage.module.css +++ b/src/apps/tracy/pages/TracyPage.module.css @@ -45,25 +45,24 @@ .canvasWrapper { position: relative; width: 100%; + aspect-ratio: 800/640; background: #0a0a0f; border-radius: 8px; - overflow: visible; + overflow: hidden; display: flex; - flex-direction: column; align-items: center; justify-content: center; min-height: 300px; } .canvas { - max-width: 100%; - max-height: 70vh; + width: 100%; + height: 100%; object-fit: contain; user-select: none; -webkit-user-select: none; -webkit-touch-callout: default; touch-action: manipulation; - border-radius: 4px; } .loadingOverlay { @@ -141,16 +140,13 @@ .result { width: 100%; text-align: center; - display: flex; - flex-direction: column; - align-items: center; - gap: 1rem; } .resultActions { display: flex; gap: 0.5rem; justify-content: center; + margin-top: 1rem; flex-wrap: wrap; } From f5ecf0475488f73677208bd4080b7dbc4ebe72c3 Mon Sep 17 00:00:00 2001 From: Andy Aylward Date: Sat, 27 Sep 2025 22:46:07 -0400 Subject: [PATCH 2/2] [tracy] another approach for action buttons --- src/apps/tracy/pages/TracyPage.tsx | 80 +++++++++++++++--------------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/src/apps/tracy/pages/TracyPage.tsx b/src/apps/tracy/pages/TracyPage.tsx index b3827bd..d213f37 100644 --- a/src/apps/tracy/pages/TracyPage.tsx +++ b/src/apps/tracy/pages/TracyPage.tsx @@ -206,48 +206,25 @@ const TracyPage = () => { )} {imageData && !isLoading && ( -
- { - if (canvas && imageData) { - const ctx = canvas.getContext('2d') - if (ctx) { - const img = new Image() - img.onload = () => { - ctx.clearRect(0, 0, canvas.width, canvas.height) - ctx.drawImage(img, 0, 0) - } - img.src = `data:image/png;base64,${imageData.base64_png}` + { + if (canvas && imageData) { + const ctx = canvas.getContext('2d') + if (ctx) { + const img = new Image() + img.onload = () => { + ctx.clearRect(0, 0, canvas.width, canvas.height) + ctx.drawImage(img, 0, 0) } + img.src = `data:image/png;base64,${imageData.base64_png}` } - }} - /> - -
- - - -
-
+ } + }} + /> )} {!imageData && !isLoading && !error && ( @@ -257,6 +234,29 @@ const TracyPage = () => { )} + + {imageData && !isLoading && ( +
+ + + +
+ )}