From da4a7de0ad8e70b02c5b29479fdb4fd6c70235b4 Mon Sep 17 00:00:00 2001 From: Ada Date: Wed, 28 Jan 2026 17:24:15 -0800 Subject: [PATCH] improve tab structure --- src/navigation/TabNavigator.tsx | 4 +- src/screens/MeScreen.tsx | 693 +++++++++++++++++++++++++++++--- src/screens/SentinelScreen.tsx | 101 +++++ 3 files changed, 737 insertions(+), 61 deletions(-) diff --git a/src/navigation/TabNavigator.tsx b/src/navigation/TabNavigator.tsx index 2119db0..afa7848 100644 --- a/src/navigation/TabNavigator.tsx +++ b/src/navigation/TabNavigator.tsx @@ -7,7 +7,7 @@ import { colors, borderRadius, typography } from '../theme/colors'; // Screens import FlowScreen from '../screens/FlowScreen'; import SentinelScreen from '../screens/SentinelScreen'; -import HeritageScreen from '../screens/HeritageScreen'; +// import HeritageScreen from '../screens/HeritageScreen'; // Heritage functionality moved to Me and Sentinel import MeScreen from '../screens/MeScreen'; const Tab = createBottomTabNavigator(); @@ -104,6 +104,7 @@ export default function TabNavigator() { tabBarStyle: styles.tabBarDark, }} /> + {/* Heritage tab commented out - functionality moved to Me (Fleet Legacy) and Sentinel (Shadow Vault) + */} = { + 1: { + label: 'Journal Summaries', + description: 'Captain\'s log excerpts and emotional records', + icon: 'book-open', + }, + 2: { + label: 'Treasure Map', + description: 'Asset inventory and metadata', + icon: 'map', + }, + 3: { + label: 'Full Inheritance', + description: 'Complete encrypted treasure chest', + icon: 'key', + }, +}; // Sentinel Protocol Status const protocolStatus = { @@ -161,6 +217,19 @@ export default function MeScreen() { const [showSanctumModal, setShowSanctumModal] = useState(false); const [showCaptainFull, setShowCaptainFull] = useState(false); const [showTriggerModal, setShowTriggerModal] = useState(false); + const [showHeritageModal, setShowHeritageModal] = useState(false); + const [showThemeModal, setShowThemeModal] = useState(false); + const [isDarkMode, setIsDarkMode] = useState(false); + + // Heritage / Fleet Legacy states + const [heirs, setHeirs] = useState(initialHeirs); + const [showAddHeirModal, setShowAddHeirModal] = useState(false); + const [showHeirDetailModal, setShowHeirDetailModal] = useState(false); + const [selectedHeir, setSelectedHeir] = useState(null); + const [newHeirName, setNewHeirName] = useState(''); + const [newHeirEmail, setNewHeirEmail] = useState(''); + const [newHeirLevel, setNewHeirLevel] = useState(1); + const [newHeirPayment, setNewHeirPayment] = useState('pay_on_access'); const [tideLevel, setTideLevel] = useState<'low' | 'high' | 'red'>('low'); const [tideChannels, setTideChannels] = useState({ push: true, @@ -186,6 +255,44 @@ export default function MeScreen() { Linking.openURL(url).catch(() => { }); }; + // Heritage / Fleet Legacy functions + const handleAddHeir = () => { + if (!newHeirName.trim() || !newHeirEmail.trim()) return; + + const newHeir: Heir = { + id: Date.now().toString(), + name: newHeirName, + email: newHeirEmail, + status: 'invited', + releaseLevel: newHeirLevel, + releaseOrder: heirs.length + 1, + paymentStrategy: newHeirPayment, + }; + + setHeirs([...heirs, newHeir]); + resetAddHeirForm(); + setShowAddHeirModal(false); + }; + + const resetAddHeirForm = () => { + setNewHeirName(''); + setNewHeirEmail(''); + setNewHeirLevel(1); + setNewHeirPayment('pay_on_access'); + }; + + const handleHeirPress = (heir: Heir) => { + setSelectedHeir(heir); + setShowHeirDetailModal(true); + }; + + const getHeirStatusBadge = (status: HeirStatus) => { + if (status === 'confirmed') { + return { text: 'Aboard', color: '#6BBF8A', icon: 'checkmark-circle' }; + } + return { text: 'Invited', color: colors.nautical.gold, icon: 'time-outline' }; + }; + const handleAbandonIsland = () => { Alert.alert( 'Sign Out', @@ -213,14 +320,6 @@ export default function MeScreen() { showsVerticalScrollIndicator={false} contentContainerStyle={styles.scrollContent} > - {/* Header with Settings */} - - - - - - - {/* Profile Card */} - {/* Abandon Island Button (Logout for now) */} - - - SIGN OUT - + {/* Fleet Legacy - Single Entry Point */} + FLEET LEGACY + + setShowHeritageModal(true)} + > + + + + + Manage Heirs + {heirs.length} trustees configured + + + + {/* Settings Menu */} SETTINGS @@ -335,6 +442,9 @@ export default function MeScreen() { if (item.id === 'trigger') { setShowTriggerModal(true); } + if (item.id === 'visual') { + setShowThemeModal(true); + } }} > @@ -349,44 +459,83 @@ export default function MeScreen() { ))} - {/* About Section */} + {/* About Section - Vertical List */} ABOUT - - {protocolExplainers.slice(0, 2).map((item) => ( + + {protocolExplainers.map((item, index) => ( setSelectedExplainer(item)} > - - {item.title} - + + + + + {item.title} + + ))} + handleOpenLink('https://github.com/sentinel')} + > + + + + + GitHub + View source code + + + + handleOpenLink('https://sentinel.app/privacy')} + > + + + + + Privacy Policy + + + + handleOpenLink('https://sentinel.app/terms')} + > + + + + + Terms of Service + + + + {/* Sign Out Button */} + + + SIGN OUT + + {/* Footer */} - A E T E R N A N A U T I C A V 2 . 0 + {/* A E T E R N A N A U T I C A V 2 . 0 */} The sea claims what is forgotten, but the Sanctuary keeps what is loved. - - {/* Footer Links */} - - handleOpenLink('https://github.com/sentinel')}> - GitHub - - · - handleOpenLink('https://sentinel.app/privacy')}> - Privacy - - · - handleOpenLink('https://sentinel.app/terms')}> - Terms - - @@ -427,6 +576,114 @@ export default function MeScreen() { + {/* Heritage Modal - Full HeritageScreen */} + setShowHeritageModal(false)} + > + + + setShowHeritageModal(false)} + activeOpacity={0.85} + > + + + + + + {/* Theme Settings Modal */} + setShowThemeModal(false)} + > + + + + + + + Visual Preferences + + + + APPEARANCE + setIsDarkMode(!isDarkMode)} + activeOpacity={0.85} + > + + + Dark Mode + + + {isDarkMode ? 'ON' : 'OFF'} + + + + + + CARD STYLE + + {['Minimal', 'Standard', 'Rich'].map((style) => ( + + + {style} + + + ))} + + + + + FONT SIZE + + {['Small', 'Medium', 'Large'].map((size) => ( + + + {size} + + + ))} + + + + + setShowThemeModal(false)} + > + + Save + + setShowThemeModal(false)} + > + + Close + + + + + {/* Spirit Keys Modal */} + {/* Add Heir Modal */} + setShowAddHeirModal(false)} + > + + + + + + + + Add to Fleet + + + NAME * + + + EMAIL * + + + INHERITANCE TIER + + {[1, 2, 3].map((level) => ( + setNewHeirLevel(level)} + > + + Tier {level} + + + ))} + + + PAYMENT STRATEGY + + setNewHeirPayment('prepaid')} + > + + Prepaid + + + setNewHeirPayment('pay_on_access')} + > + + Pay on Access + + + + + + { + setShowAddHeirModal(false); + resetAddHeirForm(); + }} + > + Cancel + + + + Send Invitation + + + + + + + {/* Heir Detail Modal */} + setShowHeirDetailModal(false)} + > + + + {selectedHeir && ( + <> + + + + + {selectedHeir.name} + + + + {getHeirStatusBadge(selectedHeir.status).text} + + + + + + + + Email + {selectedHeir.email} + + + + Order + #{selectedHeir.releaseOrder} + + + + Tier + + {selectedHeir.releaseLevel} · {releaseLevelConfig[selectedHeir.releaseLevel].label} + + + + + Payment + + {selectedHeir.paymentStrategy === 'prepaid' ? 'Prepaid' : 'Pay on Access'} + + + + + setShowHeirDetailModal(false)} + > + Close + + + )} + + + + {/* Trigger Logic Modal */} { // Pulse animation @@ -270,6 +273,26 @@ export default function SentinelScreen() { + {/* Shadow Vault Access */} + + + + + + Shadow Vault + + Access sealed assets from the Lighthouse. + + + setShowVault(true)} + activeOpacity={0.8} + > + Open + + + {/* Heartbeat Button */} + + {/* Vault Modal */} + setShowVault(false)} + > + + + setShowVault(false)} + activeOpacity={0.85} + > + + + + ); } @@ -513,4 +554,64 @@ const styles = StyleSheet.create({ color: colors.sentinel.textSecondary, fontFamily: typography.fontFamily.mono, }, + // Shadow Vault Access Card + vaultAccessCard: { + flexDirection: 'row', + alignItems: 'center', + backgroundColor: colors.sentinel.cardBackground, + borderRadius: borderRadius.xl, + padding: spacing.base, + marginBottom: spacing.lg, + borderWidth: 1, + borderColor: colors.sentinel.cardBorder, + }, + vaultAccessIcon: { + width: 44, + height: 44, + borderRadius: 22, + backgroundColor: `${colors.nautical.teal}20`, + alignItems: 'center', + justifyContent: 'center', + marginRight: spacing.md, + }, + vaultAccessContent: { + flex: 1, + }, + vaultAccessTitle: { + fontSize: typography.fontSize.base, + fontWeight: '600', + color: colors.sentinel.text, + marginBottom: 2, + }, + vaultAccessText: { + fontSize: typography.fontSize.sm, + color: colors.sentinel.textSecondary, + }, + vaultAccessButton: { + backgroundColor: colors.nautical.teal, + paddingHorizontal: spacing.md, + paddingVertical: spacing.sm, + borderRadius: borderRadius.full, + }, + vaultAccessButtonText: { + color: colors.nautical.cream, + fontWeight: '700', + fontSize: typography.fontSize.sm, + }, + // Vault Modal + vaultModalContainer: { + flex: 1, + backgroundColor: colors.vault.background, + }, + vaultCloseButton: { + position: 'absolute', + top: spacing.xl + spacing.lg, + right: spacing.lg, + width: 36, + height: 36, + borderRadius: 18, + backgroundColor: 'rgba(26, 58, 74, 0.65)', + alignItems: 'center', + justifyContent: 'center', + }, });