mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-17 21:09:40 +02:00
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>
211 lines
4.4 KiB
TypeScript
211 lines
4.4 KiB
TypeScript
import React, { useEffect, useRef } from 'react';
|
|
import { View, Animated } from 'react-native';
|
|
import { useTheme } from '~/features/theme/ThemeProvider';
|
|
|
|
interface MemoPreviewSkeletonProps {
|
|
showMargins?: boolean;
|
|
}
|
|
|
|
/**
|
|
* Skeleton loader for MemoPreview component
|
|
* Matches exact MemoPreview structure and dimensions with pulsing animation
|
|
*/
|
|
const MemoPreviewSkeleton = ({ showMargins = true }: MemoPreviewSkeletonProps) => {
|
|
const { colors } = useTheme();
|
|
const pulseAnim = useRef(new Animated.Value(0.4)).current;
|
|
|
|
// Theme-aware colors
|
|
const skeletonColor = colors.skeleton;
|
|
const backgroundColor = colors.contentBackground;
|
|
const borderColor = colors.border;
|
|
|
|
// Pulsing animation effect
|
|
useEffect(() => {
|
|
const pulse = Animated.loop(
|
|
Animated.sequence([
|
|
Animated.timing(pulseAnim, {
|
|
toValue: 1,
|
|
duration: 1000,
|
|
useNativeDriver: true,
|
|
}),
|
|
Animated.timing(pulseAnim, {
|
|
toValue: 0.4,
|
|
duration: 1000,
|
|
useNativeDriver: true,
|
|
}),
|
|
])
|
|
);
|
|
|
|
pulse.start();
|
|
|
|
return () => pulse.stop();
|
|
}, [pulseAnim]);
|
|
|
|
return (
|
|
<View
|
|
style={{
|
|
backgroundColor,
|
|
borderRadius: 16,
|
|
borderWidth: 1,
|
|
borderColor,
|
|
minHeight: 140,
|
|
...(showMargins && {
|
|
marginLeft: 16,
|
|
marginRight: 16,
|
|
}),
|
|
flexShrink: 0,
|
|
marginBottom: 12,
|
|
}}
|
|
>
|
|
<View style={{ flex: 1, paddingTop: 16, paddingHorizontal: 16 }}>
|
|
<View
|
|
style={{
|
|
flexDirection: 'row',
|
|
justifyContent: 'space-between',
|
|
alignItems: 'center',
|
|
}}
|
|
>
|
|
<View style={{ flex: 1 }}>
|
|
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
|
|
<Animated.View
|
|
style={{
|
|
height: 14,
|
|
width: 60,
|
|
backgroundColor: skeletonColor,
|
|
borderRadius: 3,
|
|
marginRight: 4,
|
|
opacity: pulseAnim,
|
|
}}
|
|
/>
|
|
<Animated.View
|
|
style={{
|
|
width: 4,
|
|
height: 4,
|
|
backgroundColor: skeletonColor,
|
|
borderRadius: 2,
|
|
marginHorizontal: 4,
|
|
opacity: pulseAnim,
|
|
}}
|
|
/>
|
|
<Animated.View
|
|
style={{
|
|
height: 14,
|
|
width: 40,
|
|
backgroundColor: skeletonColor,
|
|
borderRadius: 3,
|
|
marginRight: 4,
|
|
opacity: pulseAnim,
|
|
}}
|
|
/>
|
|
<Animated.View
|
|
style={{
|
|
width: 4,
|
|
height: 4,
|
|
backgroundColor: skeletonColor,
|
|
borderRadius: 2,
|
|
marginHorizontal: 4,
|
|
opacity: pulseAnim,
|
|
}}
|
|
/>
|
|
<Animated.View
|
|
style={{
|
|
height: 14,
|
|
width: 35,
|
|
backgroundColor: skeletonColor,
|
|
borderRadius: 3,
|
|
opacity: pulseAnim,
|
|
}}
|
|
/>
|
|
</View>
|
|
</View>
|
|
|
|
<View style={{ maxWidth: 120, flexShrink: 0 }}>
|
|
<Animated.View
|
|
style={{
|
|
height: 20,
|
|
width: 80,
|
|
backgroundColor: skeletonColor,
|
|
borderRadius: 10,
|
|
opacity: pulseAnim,
|
|
}}
|
|
/>
|
|
</View>
|
|
</View>
|
|
|
|
<View style={{ marginTop: 8, marginBottom: 4 }}>
|
|
<Animated.View
|
|
style={{
|
|
height: 18,
|
|
width: 280,
|
|
backgroundColor: skeletonColor,
|
|
borderRadius: 4,
|
|
marginBottom: 2,
|
|
opacity: pulseAnim,
|
|
}}
|
|
/>
|
|
<Animated.View
|
|
style={{
|
|
height: 18,
|
|
width: 200,
|
|
backgroundColor: skeletonColor,
|
|
borderRadius: 4,
|
|
opacity: pulseAnim,
|
|
}}
|
|
/>
|
|
</View>
|
|
</View>
|
|
|
|
<View
|
|
style={{
|
|
marginTop: 4,
|
|
minHeight: 32,
|
|
paddingBottom: 10,
|
|
paddingHorizontal: 16,
|
|
}}
|
|
>
|
|
<View
|
|
style={{
|
|
flexDirection: 'row',
|
|
alignItems: 'center',
|
|
flexWrap: 'wrap',
|
|
}}
|
|
>
|
|
<Animated.View
|
|
style={{
|
|
height: 24,
|
|
width: 65,
|
|
backgroundColor: skeletonColor,
|
|
borderRadius: 12,
|
|
marginRight: 8,
|
|
marginBottom: 4,
|
|
opacity: pulseAnim,
|
|
}}
|
|
/>
|
|
<Animated.View
|
|
style={{
|
|
height: 24,
|
|
width: 85,
|
|
backgroundColor: skeletonColor,
|
|
borderRadius: 12,
|
|
marginRight: 8,
|
|
marginBottom: 4,
|
|
opacity: pulseAnim,
|
|
}}
|
|
/>
|
|
<Animated.View
|
|
style={{
|
|
height: 24,
|
|
width: 50,
|
|
backgroundColor: skeletonColor,
|
|
borderRadius: 12,
|
|
marginBottom: 4,
|
|
opacity: pulseAnim,
|
|
}}
|
|
/>
|
|
</View>
|
|
</View>
|
|
</View>
|
|
);
|
|
};
|
|
|
|
export default MemoPreviewSkeleton;
|