From c294e91253ece21895b3d164b7a5db41e515000a Mon Sep 17 00:00:00 2001 From: Iqbal Date: Fri, 23 Oct 2026 12:38:52 +0700 Subject: [PATCH] Open a result by clicking anywhere on its card Drop the Open button: the title's hit area now covers the whole card, with Retry kept on top so it doesn't open the preview. Co-Authored-By: Claude Opus 5.5 --- src/i18n.ts | 2 -- src/pages/Results.tsx | 5 +---- src/styles/app.css | 5 +++++ 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/i18n.ts b/src/i18n.ts index b94439b..5e36c7d 100644 --- a/src/i18n.ts +++ b/src/i18n.ts @@ -228,7 +228,6 @@ const en = { 'res.sourceCount': '{n} sources', 'res.sourceOne': '1 source', 'res.working': 'Being created…', - 'res.open': 'Open', 'res.close': 'Close', 'res.reviewNotice': 'AI-generated draft. Check it, then approve it or reject it.', 'res.noContent': 'No content to show', @@ -602,7 +601,6 @@ const id: Record = { 'res.sourceCount': '{n} sumber', 'res.sourceOne': '1 sumber', 'res.working': 'Sedang dibuat…', - 'res.open': 'Buka', 'res.close': 'Tutup', 'res.reviewNotice': 'Draft buatan AI. Periksa dulu, lalu setujui atau tolak.', 'res.noContent': 'Tidak ada konten untuk ditampilkan', diff --git a/src/pages/Results.tsx b/src/pages/Results.tsx index 6710ea0..e8eb8c3 100644 --- a/src/pages/Results.tsx +++ b/src/pages/Results.tsx @@ -132,10 +132,7 @@ function ContentCard({ material: m, onOpen }: { material: Material; onOpen: () = {describeRule(m.rule)} {working ? {m.video ? t('res.videoProgress', { n: m.video.progress }) : t('res.working')} - :
- {m.retry && } - -
} + : m.retry &&
} diff --git a/src/styles/app.css b/src/styles/app.css index 99151f5..5c02d21 100644 --- a/src/styles/app.css +++ b/src/styles/app.css @@ -62,6 +62,11 @@ textarea{resize:vertical;line-height:1.6} .content-title:disabled{cursor:default;color:#8b97a9} .content-card-foot>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap} .content-card-actions{display:flex;gap:12px;flex-shrink:0} +/* The whole card opens the result: the title button's hit area stretches over it, Retry stays on top */ +.content-card{position:relative} +.content-title:not(:disabled)::after{content:"";position:absolute;inset:0;border-radius:inherit} +.content-card:has(.content-title:not(:disabled)):hover .content-title{color:var(--blue)} +.content-card-actions{position:relative;z-index:1} .research-row .status{margin-left:0} .research-row h3 a{color:var(--ink)} .research-row h3 a:hover{color:var(--blue)}