diff --git a/app/api/memos.py b/app/api/memos.py index 94907b0..c70e165 100644 --- a/app/api/memos.py +++ b/app/api/memos.py @@ -173,6 +173,7 @@ async def list_memos( page_size: int = Query(20, ge=1, le=100), tag: str | None = Query(None, description="user_tags 또는 ai_tags 필터"), archived: bool = Query(False, description="true면 아카이브 목록"), + pinned: bool | None = Query(None, description="true면 핀 고정된 메모만"), ): """메모 목록 — 활성: 핀 우선 + 최신순 / 아카이브: 최신순 (핀 무시)""" base = select(Document).where( @@ -182,6 +183,9 @@ async def list_memos( Document.archived == archived, ) + if pinned is not None: + base = base.where(Document.pinned == pinned) + if tag: base = base.where( Document.user_tags.op("@>")(f'["{tag}"]') diff --git a/frontend/src/routes/+page.svelte b/frontend/src/routes/+page.svelte index 7e4ce36..e368ec4 100644 --- a/frontend/src/routes/+page.svelte +++ b/frontend/src/routes/+page.svelte @@ -1,51 +1,43 @@
{(summary.documents_count ?? 0).toLocaleString()}
-- {summary.today_added > 0 ? `+${summary.today_added} 오늘` : '-'} -
-{(summary.memos_count ?? 0).toLocaleString()}
--
-{(summary.news_count ?? 0).toLocaleString()}
--
-{summary.inbox_count}
-- {summary.inbox_count > 0 ? '분류하기 →' : '-'} -
-{summary.law_alerts}
-- {summary.law_alerts > 0 ? '오늘 변경' : '-'} -
-{systemView.label}
-{systemView.sub}
- {/if} -{(summary.documents_count ?? 0).toLocaleString()}
+일반 문서
+{(summary.memos_count ?? 0).toLocaleString()}
+직접 작성
+{(summary.news_count ?? 0).toLocaleString()}
+수집 기사
++ {summary.inbox_count} +
+ {#if summary.inbox_count > 0} +검토하기 →
{:else} -미분류 문서
{/if}최근 24시간 처리 작업 없음
+ {/if} +