feat: add mobile shell and unified search
Some checks failed
ci / 정본·보안·린트·타입·테스트 (push) Failing after 50s
ci / 워크스페이스 빌드 검증 (push) Has been skipped
ci / Supabase Edge Functions + Cloudflare Worker (push) Successful in 20s
ci / .NET API 서버 테스트 (push) Successful in 12s
deploy-site / deploy (push) Successful in 39s
ci / 모바일 린트·타입·Jest (push) Failing after 3h10m31s
Some checks failed
ci / 정본·보안·린트·타입·테스트 (push) Failing after 50s
ci / 워크스페이스 빌드 검증 (push) Has been skipped
ci / Supabase Edge Functions + Cloudflare Worker (push) Successful in 20s
ci / .NET API 서버 테스트 (push) Successful in 12s
deploy-site / deploy (push) Successful in 39s
ci / 모바일 린트·타입·Jest (push) Failing after 3h10m31s
This commit is contained in:
parent
f505a03d34
commit
5ca3709b32
98 changed files with 5168 additions and 2093 deletions
|
|
@ -17,7 +17,7 @@ import {
|
|||
PhosphorText,
|
||||
PhysicalButton,
|
||||
} from '@d3ro/ui-native'
|
||||
import { useI18n } from '@d3ro/i18n'
|
||||
import { useI18n, type TranslationKey } from '@d3ro/i18n'
|
||||
import type { AudioFile, HistoryEntry } from '@d3ro/api-client'
|
||||
import { useAuth } from '../lib/auth-context'
|
||||
import {
|
||||
|
|
@ -31,6 +31,44 @@ import {
|
|||
import { loadHistoryCache } from '../features/history/history-cache'
|
||||
import { useMobilePreferences } from '../lib/preferences-context'
|
||||
|
||||
const HISTORY_MODE_KEYS: Record<HistoryEntry['mode'], TranslationKey> = {
|
||||
dictation: 'mobile.hist.mode.dictation',
|
||||
translate: 'mobile.hist.mode.translate',
|
||||
command: 'mobile.hist.mode.command',
|
||||
caption: 'mobile.hist.mode.caption',
|
||||
'file-transcription': 'mobile.hist.mode.fileTranscription',
|
||||
}
|
||||
|
||||
const HISTORY_STATUS_KEYS: Record<HistoryEntry['status'], TranslationKey> = {
|
||||
completed: 'mobile.hist.status.completed',
|
||||
cancelled: 'mobile.hist.status.cancelled',
|
||||
error: 'mobile.hist.status.error',
|
||||
}
|
||||
|
||||
const AUDIO_STATUS_KEYS: Record<AudioFile['upload_status'], TranslationKey> = {
|
||||
pending: 'mobile.hist.audioStatus.pending',
|
||||
uploading: 'mobile.hist.audioStatus.uploading',
|
||||
uploaded: 'mobile.hist.audioStatus.uploaded',
|
||||
failed: 'mobile.hist.audioStatus.failed',
|
||||
deleted: 'mobile.hist.audioStatus.deleted',
|
||||
}
|
||||
|
||||
const JOB_KIND_KEYS: Record<HistoryDetail['jobs'][number]['kind'], TranslationKey> = {
|
||||
transcription: 'mobile.hist.jobKind.transcription',
|
||||
summary: 'mobile.hist.jobKind.summary',
|
||||
minutes: 'mobile.hist.jobKind.minutes',
|
||||
diarization: 'mobile.hist.jobKind.diarization',
|
||||
export: 'mobile.hist.jobKind.export',
|
||||
}
|
||||
|
||||
const JOB_STATUS_KEYS: Record<HistoryDetail['jobs'][number]['status'], TranslationKey> = {
|
||||
queued: 'mobile.hist.jobStatus.queued',
|
||||
running: 'mobile.hist.jobStatus.running',
|
||||
succeeded: 'mobile.hist.jobStatus.succeeded',
|
||||
failed: 'mobile.hist.jobStatus.failed',
|
||||
cancelled: 'mobile.hist.jobStatus.cancelled',
|
||||
}
|
||||
|
||||
interface HistoryDetailScreenProps {
|
||||
route: { params: { historyId: string } }
|
||||
navigation: { goBack: () => void }
|
||||
|
|
@ -471,8 +509,8 @@ export default function HistoryDetailScreen({
|
|||
)}
|
||||
|
||||
<Section title={t('mobile.hist.metadata')}>
|
||||
<MetaRow label={t('mobile.hist.mode')} value={detail.entry.mode} />
|
||||
<MetaRow label={t('mobile.hist.status')} value={detail.entry.status} />
|
||||
<MetaRow label={t('mobile.hist.mode')} value={t(HISTORY_MODE_KEYS[detail.entry.mode])} />
|
||||
<MetaRow label={t('mobile.hist.status')} value={t(HISTORY_STATUS_KEYS[detail.entry.status])} />
|
||||
<MetaRow label={t('mobile.hist.language')} value={detail.entry.detected_language ?? '—'} />
|
||||
<MetaRow label={t('mobile.hist.duration')} value={formatDuration(detail.entry.duration * 1000)} />
|
||||
<MetaRow label={t('mobile.hist.model')} value={detail.entry.stt_model ?? '—'} />
|
||||
|
|
@ -501,7 +539,7 @@ export default function HistoryDetailScreen({
|
|||
</PhosphorText>
|
||||
{audioFile.upload_status !== 'uploaded' && (
|
||||
<PhosphorText variant="meta" color="amber">
|
||||
{t('mobile.hist.audioPending', { status: audioFile.upload_status })}
|
||||
{t('mobile.hist.audioPending', { status: t(AUDIO_STATUS_KEYS[audioFile.upload_status]) })}
|
||||
</PhosphorText>
|
||||
)}
|
||||
</View>
|
||||
|
|
@ -550,8 +588,8 @@ export default function HistoryDetailScreen({
|
|||
) : detail.jobs.map((job) => (
|
||||
<MetaRow
|
||||
key={job.id}
|
||||
label={job.kind}
|
||||
value={`${job.status} · ${job.progress}%`}
|
||||
label={t(JOB_KIND_KEYS[job.kind])}
|
||||
value={`${t(JOB_STATUS_KEYS[job.status])} · ${job.progress}%`}
|
||||
/>
|
||||
))}
|
||||
</Section>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue