Convert gitgram/ and aitimemachine/ from embedded git repos (which showed as opaque submodule gitlinks on GitHub) into fully-tracked first-party content. AITM now merges its 7 vendored repos as first-party engines: - memory: beads (Go task DAG) + context7 (docs SDK), unified into saved_contexts - git: vendored C git (bundled binary) + gitnexus (in-process code intelligence) - agentic: a2a (@a2a-js/sdk) + pal (AITM-managed Python subprocess) Includes the full session's product build: Gitgram web/mobile/backend features, AITM website/CLI/MCP, the unified memory layer, engine build tooling (scripts/build-engines.sh, Dockerfile, CI), docs (README, ENGINES.md, ARCHITECTURE.md), and extensive test suites. Build artifacts, node_modules, external/, and gemini-cli are gitignored. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
89 lines
2.2 KiB
TypeScript
89 lines
2.2 KiB
TypeScript
import React from 'react';
|
|
import { View, Text, StyleSheet, TouchableOpacity, Platform } from 'react-native';
|
|
import { useRouter, usePathname } from 'expo-router';
|
|
import Icon from 'react-native-vector-icons/MaterialIcons';
|
|
import { Colors } from '../../constants/Colors';
|
|
import { useAuthStore } from '../../store/authStore';
|
|
|
|
interface NavbarProps {
|
|
showBack?: boolean;
|
|
title?: string;
|
|
rightAction?: React.ReactNode;
|
|
}
|
|
|
|
export default function Navbar({ showBack = false, title, rightAction }: NavbarProps) {
|
|
const router = useRouter();
|
|
const pathname = usePathname();
|
|
const { user } = useAuthStore();
|
|
|
|
const handleBack = () => {
|
|
if (router.canGoBack()) {
|
|
router.back();
|
|
} else {
|
|
router.replace('/(tabs)/home');
|
|
}
|
|
};
|
|
|
|
return (
|
|
<View style={styles.container}>
|
|
<View style={styles.content}>
|
|
{showBack && (
|
|
<TouchableOpacity onPress={handleBack} style={styles.backButton}>
|
|
<Icon name="arrow-back" size={24} color={Colors.text} />
|
|
</TouchableOpacity>
|
|
)}
|
|
|
|
{title && (
|
|
<Text style={styles.title} numberOfLines={1}>
|
|
{title}
|
|
</Text>
|
|
)}
|
|
|
|
{rightAction || (
|
|
<TouchableOpacity
|
|
onPress={() => router.push('/(tabs)/profile')}
|
|
style={styles.profileButton}
|
|
>
|
|
{user?.avatar ? (
|
|
<Icon name="account-circle" size={28} color={Colors.accent} />
|
|
) : (
|
|
<Icon name="account-circle" size={28} color={Colors.textSecondary} />
|
|
)}
|
|
</TouchableOpacity>
|
|
)}
|
|
</View>
|
|
</View>
|
|
);
|
|
}
|
|
|
|
const styles = StyleSheet.create({
|
|
container: {
|
|
backgroundColor: Colors.background,
|
|
borderBottomWidth: 1,
|
|
borderBottomColor: Colors.border,
|
|
paddingTop: Platform.OS === 'ios' ? 50 : 10,
|
|
paddingBottom: 10,
|
|
paddingHorizontal: 16,
|
|
},
|
|
content: {
|
|
flexDirection: 'row',
|
|
alignItems: 'center',
|
|
justifyContent: 'space-between',
|
|
},
|
|
backButton: {
|
|
padding: 8,
|
|
marginRight: 8,
|
|
},
|
|
title: {
|
|
flex: 1,
|
|
fontSize: 18,
|
|
fontWeight: '600',
|
|
color: Colors.text,
|
|
marginLeft: 8,
|
|
},
|
|
profileButton: {
|
|
padding: 4,
|
|
},
|
|
});
|
|
|