managarten/apps-archived/memoro/apps/mobile/components/statistics/OverviewCard.tsx
Till-JS 61d181fbc2 chore: archive inactive projects to apps-archived/
Move inactive projects out of active workspace:
- bauntown (community website)
- maerchenzauber (AI story generation)
- memoro (voice memo app)
- news (news aggregation)
- nutriphi (nutrition tracking)
- reader (reading app)
- uload (URL shortener)
- wisekeep (AI wisdom extraction)

Update CLAUDE.md documentation:
- Add presi to active projects
- Document archived projects section
- Update workspace configuration

Archived apps can be re-activated by moving back to apps/

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 07:03:59 +01:00

99 lines
2.3 KiB
TypeScript

import React from 'react';
import { View, Text, StyleSheet } from 'react-native';
import { useTheme } from '~/features/theme/ThemeProvider';
import { useTranslation } from 'react-i18next';
import GlassCard from './GlassCard';
import StatRow from './StatRow';
interface OverviewCardProps {
memoCount: number;
memoryCount: number;
totalDuration: number;
totalWords: number;
currentStreak: number;
averageWordCount: number;
}
const OverviewCard: React.FC<OverviewCardProps> = ({
memoCount,
memoryCount,
totalDuration,
totalWords,
currentStreak,
averageWordCount,
}) => {
const { isDark } = useTheme();
const { t } = useTranslation();
const textColor = isDark ? '#FFFFFF' : '#000000';
const highlightColor = isDark ? '#FFD700' : '#FFA500';
const formatDuration = (seconds: number): string => {
const hours = Math.floor(seconds / 3600);
const minutes = Math.floor((seconds % 3600) / 60);
if (hours > 0) {
return `${hours}h ${minutes}m`;
} else if (minutes > 0) {
return `${minutes}m`;
} else {
return `${seconds}s`;
}
};
return (
<GlassCard>
<Text style={[styles.title, { color: textColor }]}>{t('statistics.filter_overview')}</Text>
<View style={styles.statsContainer}>
<StatRow
title={t('statistics.memos')}
value={memoCount.toString()}
icon="document-text-outline"
/>
<StatRow
title={t('statistics.memories')}
value={memoryCount.toString()}
icon="sparkles-outline"
/>
<StatRow
title={t('statistics.recording_duration')}
value={formatDuration(totalDuration)}
icon="volume-high-outline"
/>
<StatRow
title={t('statistics.words')}
value={totalWords.toLocaleString()}
icon="text-outline"
/>
<View style={styles.divider} />
<StatRow
title={t('statistics.current_streak')}
value={`${currentStreak} ${t('statistics.days')}`}
icon="flame-outline"
/>
<StatRow
title={t('statistics.average_word_count') || 'Ø Wörter/Memo'}
value={averageWordCount.toString()}
icon="analytics-outline"
/>
</View>
</GlassCard>
);
};
const styles = StyleSheet.create({
title: {
fontSize: 26,
fontWeight: '700',
marginBottom: 20,
},
statsContainer: {
gap: 6,
},
divider: {
height: 0,
marginVertical: 12,
},
});
export default OverviewCard;