mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-15 07:21:10 +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>
60 lines
1.6 KiB
TypeScript
60 lines
1.6 KiB
TypeScript
import { forwardRef } from 'react';
|
|
import { Pressable, View, StyleSheet } from 'react-native';
|
|
import * as Haptics from 'expo-haptics';
|
|
import { useTheme } from '~/features/theme/ThemeProvider';
|
|
import Icon from '~/components/atoms/Icon';
|
|
import NotificationBadge from '~/components/atoms/NotificationBadge';
|
|
import { useUnuploadedCount } from '~/features/storage/hooks/useUnuploadedCount';
|
|
import { useInitializeUploadStatus } from '~/features/storage/store/uploadStatusStore';
|
|
|
|
export const HeaderButton = forwardRef<typeof Pressable, { onPress?: () => void }>(
|
|
({ onPress }, ref) => {
|
|
const { tw } = useTheme();
|
|
|
|
// Initialize upload status store
|
|
useInitializeUploadStatus();
|
|
|
|
// Get count of unuploaded audio files
|
|
const unuploadedCount = useUnuploadedCount();
|
|
|
|
const handlePress = async () => {
|
|
try {
|
|
await Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Light);
|
|
} catch (error) {
|
|
console.debug('Haptic feedback error:', error);
|
|
}
|
|
onPress?.();
|
|
};
|
|
|
|
return (
|
|
<View style={styles.container}>
|
|
<Pressable ref={ref} onPress={handlePress}>
|
|
{({ pressed }) => (
|
|
<Icon
|
|
name="settings-outline"
|
|
size={24}
|
|
useThemeColor
|
|
className={tw(`${pressed ? 'opacity-50' : 'opacity-100'}`)}
|
|
/>
|
|
)}
|
|
</Pressable>
|
|
{unuploadedCount > 0 && (
|
|
<NotificationBadge count={unuploadedCount} size="small" style={styles.badge} />
|
|
)}
|
|
</View>
|
|
);
|
|
}
|
|
);
|
|
|
|
const styles = StyleSheet.create({
|
|
container: {
|
|
position: 'relative',
|
|
marginRight: 16,
|
|
},
|
|
badge: {
|
|
position: 'absolute',
|
|
top: -2,
|
|
right: -2,
|
|
zIndex: 10,
|
|
},
|
|
});
|