43 lines
2.1 KiB
TypeScript
43 lines
2.1 KiB
TypeScript
import React from 'react';
|
|
import { inboxApi } from '../api.js';
|
|
|
|
/**
|
|
* v0.2.9 Cut B Task 11 — 첫 launch onboarding 위저드.
|
|
*
|
|
* 3 옵션 (AI 사용 / 원문만 / 나중에) 중 하나를 선택. AI 옵션 (true/false) 은
|
|
* setAiEnabled 로 settings 에 저장, 모든 옵션은 setOnboardingCompleted(true) 로
|
|
* 두 번째 launch 부터 미노출. "나중에" 는 ai_enabled 기본값 (true) 유지 — 사용자
|
|
* 가 SettingsPage 에서 추후 선택 가능.
|
|
*/
|
|
export function OnboardingWizard({ onClose }: { onClose: () => void }): React.ReactElement {
|
|
async function choose(aiEnabled: boolean | null): Promise<void> {
|
|
if (aiEnabled !== null) await inboxApi.setAiEnabled(aiEnabled);
|
|
await inboxApi.setOnboardingCompleted(true);
|
|
onClose();
|
|
}
|
|
|
|
return (
|
|
<div role="dialog" aria-label="시작 안내" style={{
|
|
position: 'fixed', top: 0, left: 0, right: 0, bottom: 0,
|
|
background: 'rgba(0,0,0,0.5)', display: 'flex', alignItems: 'center', justifyContent: 'center', zIndex: 1000
|
|
}}>
|
|
<div style={{ background: '#fff', padding: 24, borderRadius: 8, maxWidth: 520 }}>
|
|
<h2 style={{ margin: '0 0 12px' }}>Inkling 사용 시작</h2>
|
|
<p style={{ fontSize: 14, lineHeight: 1.6, marginBottom: 12 }}>
|
|
Inkling 은 로컬 LLM (Ollama) 으로 메모를 자동 정리합니다.
|
|
Ollama 가 설치되어 있고 한국어 지원 모델 (gemma3, gemma2 등) 이 pull 되어 있어야 최적의 경험이 가능합니다.
|
|
</p>
|
|
<p style={{ fontSize: 13, marginBottom: 16 }}>
|
|
설치 가이드:
|
|
<a href="https://ollama.com/download" target="_blank" rel="noopener noreferrer">ollama.com/download</a>
|
|
</p>
|
|
<div style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>
|
|
<button onClick={() => choose(true)}>AI 자동 처리 사용 (Ollama 필요)</button>
|
|
<button onClick={() => choose(false)}>원문만 저장 (AI 처리 안 함)</button>
|
|
<button onClick={() => choose(null)} style={{ marginTop: 4 }}>나중에 설정</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|