diff --git a/frontend/src/lib/components/DocumentCard.svelte b/frontend/src/lib/components/DocumentCard.svelte index a88e43e..952a0fd 100644 --- a/frontend/src/lib/components/DocumentCard.svelte +++ b/frontend/src/lib/components/DocumentCard.svelte @@ -96,6 +96,9 @@
+ {#if doc.source_channel === 'news' && doc.edit_url} + ๐Ÿ“ฐ + {/if} {#if doc.score !== undefined} {(doc.score * 100).toFixed(0)}% {/if} diff --git a/frontend/src/lib/components/DocumentViewer.svelte b/frontend/src/lib/components/DocumentViewer.svelte index b704109..457cac9 100644 --- a/frontend/src/lib/components/DocumentViewer.svelte +++ b/frontend/src/lib/components/DocumentViewer.svelte @@ -62,7 +62,7 @@ loading = true; try { fullDoc = await api(`/documents/${id}`); - viewerType = getViewerType(fullDoc.file_format); + viewerType = fullDoc.source_channel === 'news' ? 'article' : getViewerType(fullDoc.file_format); // Markdown: extracted_text ์—†์œผ๋ฉด ์›๋ณธ ํŒŒ์ผ ์ง์ ‘ ๊ฐ€์ ธ์˜ค๊ธฐ if (viewerType === 'markdown' && !fullDoc.extracted_text) { @@ -232,6 +232,34 @@ class="px-3 py-1.5 text-sm bg-[var(--accent)] text-white rounded hover:bg-[var(--accent-hover)]" >AutoCAD Web์—์„œ ์—ด๊ธฐ
+ {:else if viewerType === 'article'} + +
+

{fullDoc.title}

+
+ {#if fullDoc.ai_tags?.length} + {#each fullDoc.ai_tags.filter(t => t.startsWith('News/')) as tag} + {tag.replace('News/', '')} + {/each} + {/if} + {new Date(fullDoc.created_at).toLocaleDateString('ko-KR', { year: 'numeric', month: 'short', day: 'numeric', hour: '2-digit', minute: '2-digit' })} +
+
+ {@html renderMd(fullDoc.extracted_text || '')} +
+
+ {#if fullDoc.edit_url} + + ์›๋ฌธ ๋ณด๊ธฐ + + {/if} +
+
{:else}

๋ฏธ๋ฆฌ๋ณด๊ธฐ๋ฅผ ์ง€์›ํ•˜์ง€ ์•Š๋Š” ํ˜•์‹์ž…๋‹ˆ๋‹ค ({fullDoc.file_format})

diff --git a/frontend/src/routes/settings/+page.svelte b/frontend/src/routes/settings/+page.svelte index 19ec2b3..000ba48 100644 --- a/frontend/src/routes/settings/+page.svelte +++ b/frontend/src/routes/settings/+page.svelte @@ -1,4 +1,5 @@
-
+
-
+

๊ณ„์ • ์ •๋ณด

@@ -63,21 +120,94 @@

๋น„๋ฐ€๋ฒˆํ˜ธ ๋ณ€๊ฒฝ

{ e.preventDefault(); changePassword(); }} class="space-y-3">
- - + +
- - + +
- - + +
+ + +
+
+

๋‰ด์Šค ์†Œ์Šค

+
+ + +
+
+ + + {#if showAddForm} +
{ e.preventDefault(); addSource(); }} class="mb-4 p-3 bg-[var(--bg)] rounded-lg space-y-2"> +
+ + + + +
+ +
+ {/if} + + + {#if loadingSources} +
๋กœ๋”ฉ ์ค‘...
+ {:else if sources.length === 0} +
๋“ฑ๋ก๋œ ์†Œ์Šค๊ฐ€ ์—†์Šต๋‹ˆ๋‹ค
+ {:else} +
+ {#each sources as source} +
+
+ + {source.name} + {source.category} +
+
+ {#if source.last_fetched_at} + + {new Date(source.last_fetched_at).toLocaleDateString('ko-KR', { month: 'short', day: 'numeric', hour: '2-digit', minute: '2-digit' })} + + {/if} + +
+
+ {/each} +
+ {/if} +