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
|
|
@ -10,20 +10,19 @@ import {
|
|||
View,
|
||||
} from 'react-native'
|
||||
import type { NavigationProp, ParamListBase } from '@react-navigation/native'
|
||||
import { useSafeAreaInsets } from 'react-native-safe-area-context'
|
||||
import {
|
||||
MetalCard,
|
||||
PhosphorText,
|
||||
Led,
|
||||
Header,
|
||||
FilterChip,
|
||||
AppStatusBar,
|
||||
NativeThemeProvider,
|
||||
} from '@d3ro/ui-native'
|
||||
import { useI18n } from '@d3ro/i18n'
|
||||
import { useHistorySync } from '../features/history/use-history-sync'
|
||||
import type { HistoryFilter, HistoryListEntry } from '../features/history/history-service'
|
||||
import { useMobilePreferences } from '../lib/preferences-context'
|
||||
import { ScreenHeader } from '../components/ScreenHeader'
|
||||
import { useTabScreenBottomPadding } from '../navigation/tab-layout'
|
||||
|
||||
interface HistoryScreenProps {
|
||||
navigation: NavigationProp<ParamListBase>
|
||||
|
|
@ -34,7 +33,7 @@ type GroupedItem =
|
|||
| { id: string; type: 'entry'; entry: HistoryListEntry }
|
||||
|
||||
export default function HistoryScreen({ navigation }: HistoryScreenProps): React.ReactElement {
|
||||
const insets = useSafeAreaInsets()
|
||||
const bottomPadding = useTabScreenBottomPadding()
|
||||
const { t, formatTime, formatRelativeDate } = useI18n()
|
||||
const { palette } = useMobilePreferences()
|
||||
const styles = useMemo(() => createStyles(palette), [palette])
|
||||
|
|
@ -95,14 +94,15 @@ export default function HistoryScreen({ navigation }: HistoryScreenProps): React
|
|||
return (
|
||||
<NativeThemeProvider palette={palette}>
|
||||
<View style={styles.container}>
|
||||
<Header
|
||||
<ScreenHeader
|
||||
title={t('mobile.hist.title')}
|
||||
showBack={false}
|
||||
rightContent={
|
||||
<PhosphorText variant="meta" color="muted">
|
||||
{t('mobile.hist.entries', { count: history.entries.length })}
|
||||
</PhosphorText>
|
||||
}
|
||||
paddingTop={insets.top}
|
||||
testID="history-header"
|
||||
/>
|
||||
|
||||
<View style={styles.searchRow}>
|
||||
|
|
@ -177,8 +177,8 @@ export default function HistoryScreen({ navigation }: HistoryScreenProps): React
|
|||
data={grouped}
|
||||
keyExtractor={(item) => item.id}
|
||||
contentContainerStyle={history.entries.length === 0
|
||||
? styles.emptyList
|
||||
: [styles.listContent, { paddingBottom: Math.max(insets.bottom, 24) + 40 }]}
|
||||
? [styles.emptyList, { paddingBottom: bottomPadding }]
|
||||
: [styles.listContent, { paddingBottom: bottomPadding }]}
|
||||
keyboardShouldPersistTaps="handled"
|
||||
refreshControl={
|
||||
<RefreshControl
|
||||
|
|
@ -288,20 +288,12 @@ export default function HistoryScreen({ navigation }: HistoryScreenProps): React
|
|||
</MetalCard>
|
||||
)
|
||||
}}
|
||||
ListFooterComponent={
|
||||
<>
|
||||
{history.loadingMore && (
|
||||
<View style={styles.loadingMore} testID="history-loading-more">
|
||||
<ActivityIndicator size="small" color={palette.accent.main} />
|
||||
<PhosphorText variant="meta" color="muted">{t('mobile.hist.loadMore')}</PhosphorText>
|
||||
</View>
|
||||
)}
|
||||
<AppStatusBar
|
||||
model={t('mobile.status.cloudModel')}
|
||||
label={t('mobile.status.secureDataLink')}
|
||||
/>
|
||||
</>
|
||||
}
|
||||
ListFooterComponent={history.loadingMore ? (
|
||||
<View style={styles.loadingMore} testID="history-loading-more">
|
||||
<ActivityIndicator size="small" color={palette.accent.main} />
|
||||
<PhosphorText variant="meta" color="muted">{t('mobile.hist.loadMore')}</PhosphorText>
|
||||
</View>
|
||||
) : null}
|
||||
/>
|
||||
</View>
|
||||
</NativeThemeProvider>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue