feat: 회의 파일 가져오기와 입력 엔진 배포 보완
This commit is contained in:
parent
5a8c5cd792
commit
b3519e5da7
54 changed files with 1129 additions and 116 deletions
|
|
@ -39,6 +39,7 @@ interface MeetingsScreenProps {
|
|||
|
||||
type EditorMode =
|
||||
| { kind: 'create' }
|
||||
| { kind: 'import' }
|
||||
| { kind: 'edit'; meeting: Meeting }
|
||||
| null
|
||||
|
||||
|
|
@ -205,8 +206,8 @@ export default function MeetingsScreen({
|
|||
}
|
||||
}
|
||||
|
||||
const openCreate = (): void => {
|
||||
setEditor({ kind: 'create' })
|
||||
const openCreate = (kind: 'create' | 'import' = 'create'): void => {
|
||||
setEditor({ kind })
|
||||
setEditorTitle('')
|
||||
setEditorAttendees('')
|
||||
setEditorLanguage('ko')
|
||||
|
|
@ -222,7 +223,7 @@ export default function MeetingsScreen({
|
|||
void loadCreationTemplates()
|
||||
}
|
||||
|
||||
openCreateRef.current = openCreate
|
||||
openCreateRef.current = () => openCreate('create')
|
||||
|
||||
useEffect(() => {
|
||||
const request = route?.params?.createRequest
|
||||
|
|
@ -252,11 +253,12 @@ export default function MeetingsScreen({
|
|||
|
||||
const saveEditor = async (): Promise<void> => {
|
||||
if (user === null || editor === null || editorBusyRef.current) return
|
||||
const mode = editor
|
||||
editorBusyRef.current = true
|
||||
setEditorBusy(true)
|
||||
setEditorError(null)
|
||||
try {
|
||||
if (editor.kind === 'create') {
|
||||
if (mode.kind === 'create' || mode.kind === 'import') {
|
||||
if (editorCreationKey === null) {
|
||||
throw new MeetingServiceError('validation', 'Meeting creation key is unavailable')
|
||||
}
|
||||
|
|
@ -274,9 +276,22 @@ export default function MeetingsScreen({
|
|||
setMeetings((current) => mergeMeetings([created], current))
|
||||
setTotal((current) => current + 1)
|
||||
setEditor(null)
|
||||
openDetail(created)
|
||||
if (mode.kind === 'import') {
|
||||
const target = navigation.getParent() ?? navigation
|
||||
target.navigate('Main', {
|
||||
screen: 'Record',
|
||||
params: {
|
||||
meetingId: created.id,
|
||||
meetingTitle: created.title ?? undefined,
|
||||
meetingLanguage: created.language ?? undefined,
|
||||
importRequest: Date.now(),
|
||||
},
|
||||
})
|
||||
} else {
|
||||
openDetail(created)
|
||||
}
|
||||
} else {
|
||||
const updated = await updateMeetingTitleRevisionSafe(editor.meeting, editorTitle)
|
||||
const updated = await updateMeetingTitleRevisionSafe(mode.meeting, editorTitle)
|
||||
setMeetings((current) => current.map((meeting) => (
|
||||
meeting.id === updated.id ? updated : meeting
|
||||
)))
|
||||
|
|
@ -330,11 +345,19 @@ export default function MeetingsScreen({
|
|||
subtitle={t('mobile.meetings.count', { count: total })}
|
||||
showBack={false}
|
||||
rightContent={(
|
||||
<ThemeButton
|
||||
label={t('mobile.meetings.create')}
|
||||
onPress={openCreate}
|
||||
testID="meetings-create"
|
||||
/>
|
||||
<View style={styles.headerActions}>
|
||||
<ThemeButton
|
||||
label={t('mobile.meetings.import')}
|
||||
variant="secondary"
|
||||
onPress={() => openCreate('import')}
|
||||
testID="meetings-import"
|
||||
/>
|
||||
<ThemeButton
|
||||
label={t('mobile.meetings.create')}
|
||||
onPress={() => openCreate('create')}
|
||||
testID="meetings-create"
|
||||
/>
|
||||
</View>
|
||||
)}
|
||||
testID="meetings-header"
|
||||
/>
|
||||
|
|
@ -481,7 +504,9 @@ export default function MeetingsScreen({
|
|||
<ThemeText variant="title" accessibilityRole="header">
|
||||
{editor?.kind === 'create'
|
||||
? t('mobile.meetings.createTitle')
|
||||
: t('mobile.meetings.editTitle')}
|
||||
: editor?.kind === 'import'
|
||||
? t('mobile.meetings.importTitle')
|
||||
: t('mobile.meetings.editTitle')}
|
||||
</ThemeText>
|
||||
<TextInput
|
||||
accessibilityLabel={t('mobile.meetings.titleLabel')}
|
||||
|
|
@ -496,7 +521,7 @@ export default function MeetingsScreen({
|
|||
style={styles.editorInput}
|
||||
testID="meeting-title-input"
|
||||
/>
|
||||
{editor?.kind === 'create' && (
|
||||
{(editor?.kind === 'create' || editor?.kind === 'import') && (
|
||||
<View style={styles.creationFields}>
|
||||
<View style={styles.fieldGroup}>
|
||||
<ThemeText variant="label" color="muted">
|
||||
|
|
@ -619,7 +644,9 @@ export default function MeetingsScreen({
|
|||
)}
|
||||
</View>
|
||||
<ThemeText variant="small" color="muted">
|
||||
{t('mobile.meetings.createNotice')}
|
||||
{editor.kind === 'import'
|
||||
? t('mobile.meetings.importNotice')
|
||||
: t('mobile.meetings.createNotice')}
|
||||
</ThemeText>
|
||||
</View>
|
||||
)}
|
||||
|
|
@ -649,7 +676,7 @@ export default function MeetingsScreen({
|
|||
disabled={
|
||||
editorBusy
|
||||
|| editorTitle.trim().length === 0
|
||||
|| (editor?.kind === 'create' && (
|
||||
|| ((editor?.kind === 'create' || editor?.kind === 'import') && (
|
||||
editorTemplatesLoading
|
||||
|| editorCreationKey === null
|
||||
))
|
||||
|
|
@ -740,6 +767,7 @@ function createStyles(palette: Palette): ReturnType<typeof StyleSheet.create> {
|
|||
gap: 14,
|
||||
},
|
||||
headerCopy: { flex: 1, gap: 4 },
|
||||
headerActions: { flexDirection: 'row', gap: 8, flexShrink: 0 },
|
||||
searchWrap: { paddingHorizontal: 20, paddingBottom: 12 },
|
||||
searchInput: {
|
||||
minHeight: 48,
|
||||
|
|
|
|||
|
|
@ -146,6 +146,7 @@ export default function OnboardingScreen({
|
|||
async function finish(outcome: 'completed' | 'skipped'): Promise<void> {
|
||||
if (saving) return
|
||||
const selectedAudience = audience ?? 'existing'
|
||||
onFreshFinish?.(selectedAudience)
|
||||
setSaving(true)
|
||||
setLocalSaveFailed(false)
|
||||
const result = await completeOnboarding(outcome)
|
||||
|
|
@ -154,7 +155,6 @@ export default function OnboardingScreen({
|
|||
setSaving(false)
|
||||
return
|
||||
}
|
||||
onFreshFinish?.(selectedAudience)
|
||||
const exit = resolveOnboardingExit(true, user !== null, isReplay, navigation.canGoBack())
|
||||
// Authenticated fresh completion changes the root navigator branch. The
|
||||
// parent observes needsOnboarding true -> false and resets to Main after
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue