fix: bug
This commit is contained in:
parent
d6cc74ab00
commit
e478b126cd
|
|
@ -68,39 +68,6 @@ export default function GenerationRecordScreen() {
|
|||
}
|
||||
}
|
||||
|
||||
if (loading && generations.length === 0) {
|
||||
return (
|
||||
<SafeAreaView style={styles.container} edges={['top']}>
|
||||
<StatusBar style="light" />
|
||||
<RNStatusBar barStyle="light-content" />
|
||||
<View style={styles.header}>
|
||||
<Pressable style={styles.backButton} onPress={() => router.back()}>
|
||||
<LeftArrowIcon />
|
||||
</Pressable>
|
||||
<Text style={styles.headerTitle}>{t('generationRecord.title')}</Text>
|
||||
<View style={styles.headerSpacer} />
|
||||
</View>
|
||||
<LoadingState testID="loading-state" />
|
||||
</SafeAreaView>
|
||||
)
|
||||
}
|
||||
|
||||
if (error && generations.length === 0) {
|
||||
return (
|
||||
<SafeAreaView style={styles.container} edges={['top']}>
|
||||
<StatusBar style="light" />
|
||||
<RNStatusBar barStyle="light-content" />
|
||||
<View style={styles.header}>
|
||||
<Pressable style={styles.backButton} onPress={() => router.back()}>
|
||||
<LeftArrowIcon />
|
||||
</Pressable>
|
||||
<Text style={styles.headerTitle}>{t('generationRecord.title')}</Text>
|
||||
<View style={styles.headerSpacer} />
|
||||
</View>
|
||||
<ErrorState testID="error-state" message={error.message} onRetry={handleRefresh} />
|
||||
</SafeAreaView>
|
||||
)
|
||||
}
|
||||
|
||||
const renderItem = ({ item }: { item: TemplateGeneration }) => (
|
||||
<View style={styles.itemContainer}>
|
||||
|
|
@ -155,6 +122,41 @@ export default function GenerationRecordScreen() {
|
|||
</View>
|
||||
)
|
||||
|
||||
if (loading && generations.length === 0) {
|
||||
return (
|
||||
<SafeAreaView style={styles.container} edges={['top']}>
|
||||
<StatusBar style="light" />
|
||||
<RNStatusBar barStyle="light-content" />
|
||||
<View style={styles.header}>
|
||||
<Pressable style={styles.backButton} onPress={() => router.back()}>
|
||||
<LeftArrowIcon />
|
||||
</Pressable>
|
||||
<Text style={styles.headerTitle}>{t('generationRecord.title')}</Text>
|
||||
<View style={styles.headerSpacer} />
|
||||
</View>
|
||||
<LoadingState testID="loading-state" />
|
||||
</SafeAreaView>
|
||||
)
|
||||
}
|
||||
|
||||
if (error && generations.length === 0) {
|
||||
return (
|
||||
<SafeAreaView style={styles.container} edges={['top']}>
|
||||
<StatusBar style="light" />
|
||||
<RNStatusBar barStyle="light-content" />
|
||||
<View style={styles.header}>
|
||||
<Pressable style={styles.backButton} onPress={() => router.back()}>
|
||||
<LeftArrowIcon />
|
||||
</Pressable>
|
||||
<Text style={styles.headerTitle}>{t('generationRecord.title')}</Text>
|
||||
<View style={styles.headerSpacer} />
|
||||
</View>
|
||||
<ErrorState testID="error-state" message={error.message} onRetry={handleRefresh} />
|
||||
</SafeAreaView>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
return (
|
||||
<SafeAreaView style={styles.container} edges={['top']}>
|
||||
<StatusBar style="light" />
|
||||
|
|
|
|||
|
|
@ -131,7 +131,10 @@
|
|||
"descriptionPlaceholder": "Describe the video effect you want",
|
||||
"generate": "Generate Video",
|
||||
"startGenerating": "Start Generating Video",
|
||||
"generatingMessage": "Video is being generated, please wait..."
|
||||
"generatingMessage": "Video is being generated, please wait...",
|
||||
"loading": "Loading...",
|
||||
"noFormFields": "No form fields to fill",
|
||||
"generating": "Generating..."
|
||||
},
|
||||
"generationRecord": {
|
||||
"title": "Generation Record",
|
||||
|
|
@ -163,7 +166,9 @@
|
|||
"fillForm": "Fill Form",
|
||||
"startCreating": "Start Creating",
|
||||
"generations": "My Generations",
|
||||
"generationStarted": "Generation has started"
|
||||
"generationStarted": "Generation has started",
|
||||
"uploadSuccess": "Upload successful",
|
||||
"uploadFailed": "Upload failed, please try again"
|
||||
},
|
||||
"dynamicForm": {
|
||||
"uploadFailed": "Upload failed, please try again",
|
||||
|
|
|
|||
|
|
@ -131,7 +131,10 @@
|
|||
"descriptionPlaceholder": "描述你想要的视频效果",
|
||||
"generate": "生成视频",
|
||||
"startGenerating": "开始生成视频",
|
||||
"generatingMessage": "视频正在生成中,请稍候..."
|
||||
"generatingMessage": "视频正在生成中,请稍候...",
|
||||
"loading": "加载中...",
|
||||
"noFormFields": "暂无可填写的表单项",
|
||||
"generating": "生成中..."
|
||||
},
|
||||
"generationRecord": {
|
||||
"title": "生成记录",
|
||||
|
|
@ -163,7 +166,9 @@
|
|||
"fillForm": "填写表单",
|
||||
"startCreating": "开始创作",
|
||||
"generations": "作品列表",
|
||||
"generationStarted": "生成已开始"
|
||||
"generationStarted": "生成已开始",
|
||||
"uploadSuccess": "上传成功",
|
||||
"uploadFailed": "上传失败,请重试"
|
||||
},
|
||||
"dynamicForm": {
|
||||
"uploadFailed": "上传失败,请重试",
|
||||
|
|
|
|||
Loading…
Reference in New Issue