From cd5f1c526daf63eb67202111c861e74ef4ed9ba8 Mon Sep 17 00:00:00 2001 From: Hyungi Ahn Date: Mon, 6 Apr 2026 14:01:39 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20=EC=83=81=EC=84=B8=20=ED=8E=98=EC=9D=B4?= =?UTF-8?q?=EC=A7=80=EC=97=90=EB=8F=84=20=EB=89=B4=EC=8A=A4=20=EC=A0=84?= =?UTF-8?q?=EC=9A=A9=20=EB=B7=B0=EC=96=B4=20=EC=A0=81=EC=9A=A9=20(source?= =?UTF-8?q?=5Fchannel=3Dnews=20=E2=86=92=20article)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 (1M context) --- .../src/routes/documents/[id]/+page.svelte | 25 ++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/frontend/src/routes/documents/[id]/+page.svelte b/frontend/src/routes/documents/[id]/+page.svelte index 93936c5..13704d3 100644 --- a/frontend/src/routes/documents/[id]/+page.svelte +++ b/frontend/src/routes/documents/[id]/+page.svelte @@ -33,7 +33,7 @@ } }); - let viewerType = $derived(doc ? getViewerType(doc.file_format) : 'none'); + let viewerType = $derived(doc ? (doc.source_channel === 'news' ? 'article' : getViewerType(doc.file_format)) : 'none'); function getViewerType(format) { if (['md', 'txt', 'csv', 'html'].includes(format)) return 'markdown'; @@ -94,6 +94,29 @@ 새 창에서 열기 + {:else if viewerType === 'article'} + +
+

{doc.title}

+
+ 출처: {doc.source_channel} + · + {new Date(doc.created_at).toLocaleDateString('ko-KR', { year: 'numeric', month: 'short', day: 'numeric' })} +
+ {#if doc.extracted_text} +
+ {@html renderMd(doc.extracted_text)} +
+ {/if} + {#if doc.edit_url} + 원문 보기 → + {/if} +
{:else}

이 문서 형식은 인앱 미리보기를 지원하지 않습니다