// app-screens.jsx — Recreated SURVIVAL app screens. All in-phone UI.
// Loaded after React + Babel. Components are exported to window at the bottom.
// ── Palette (matches the user's app screenshots) ───────────────────────────
const APP = {
bg: '#0c1a10',
bgDeep: '#06120a',
card: 'rgba(255, 255, 255, 0.025)',
cardBorder: 'rgba(63, 219, 90, 0.10)',
primary: '#3FDB5A',
primaryDim: 'rgba(63, 219, 90, 0.65)',
primarySoft: 'rgba(63, 219, 90, 0.18)',
muted: '#4a8a5a',
mutedDim: '#3a6a48',
white: '#e8f5ea',
warning: '#E5A33A',
warningBg: 'rgba(229, 163, 58, 0.10)',
warningBorder: 'rgba(229, 163, 58, 0.45)',
danger: '#E84C4C',
dangerBg: 'rgba(232, 76, 76, 0.08)',
dangerBorder: 'rgba(232, 76, 76, 0.6)',
amber: '#E5A33A',
blueIce: '#5AB0E5',
purple: '#B47AE0',
teal: '#3FC8C8',
};
// ── Inline category icons ──────────────────────────────────────────────────
const Icons = {
sprout: (c = APP.primary) => (
),
animal: (c = APP.amber) => (
),
house: (c = APP.primary) => (
),
food: (c = APP.warning) => (
),
drop: (c = APP.blueIce) => (
),
flame: (c = '#E96A3A') => (
),
compass: (c = APP.purple) => (
),
disaster: (c = APP.teal) => (
),
plus: (c = APP.danger) => (
),
lightbulb: (c = '#D9D33A') => (
),
search: (c) => (
),
alertTri: (c = APP.warning) => (
),
gear: (c = APP.primaryDim) => (
),
check: (c) => (
),
close: (c) => (
),
scalpel: (c) => (
),
map: (c) => (
),
};
// ── Status bar (matches the screenshots' 24h "14:37") ──────────────────────
function StatusBar({ time = '14:37', noSignal = false }) {
return (
{time}
{/* Dynamic island */}
{/* signal */}
{noSignal ? (
) : (
)}
{/* wifi */}
{/* battery */}
);
}
// ── Bottom tab bar ─────────────────────────────────────────────────────────
function TabBar({ active = 'home' }) {
const tabs = [
{ id: 'home', label: 'Home', icon: (
)},
{ id: 'nature', label: 'Nature', icon: Icons.sprout('currentColor') },
{ id: 'survival', label: 'Survival', icon: Icons.scalpel('currentColor') },
{ id: 'map', label: 'Map', icon: Icons.map('currentColor') },
];
return (
{tabs.map(t => {
const isActive = t.id === active;
const color = isActive ? APP.primary : APP.mutedDim;
return (
);
})}
);
}
// ── Search field (faux) ────────────────────────────────────────────────────
function SearchField({ placeholder = 'Search…' }) {
return (
{Icons.search(APP.primaryDim)}
{placeholder}
);
}
// ── Home screen — categories grid + daily tip ──────────────────────────────
function HomeScreen() {
const categories = [
{ id: 'plants', label: 'Plants', icon: Icons.sprout, tint: 'rgba(63,219,90,0.10)', stroke: APP.primary },
{ id: 'animals', label: 'Animals', icon: Icons.animal, tint: 'rgba(229,163,58,0.15)', stroke: APP.amber },
{ id: 'shelter', label: 'Shelter', icon: Icons.house, tint: 'rgba(63,219,90,0.10)', stroke: APP.primary },
{ id: 'food', label: 'Food', icon: Icons.lightbulb, tint: 'rgba(217,211,58,0.12)', stroke: '#D9D33A' },
{ id: 'water', label: 'Water', icon: Icons.drop, tint: 'rgba(90,176,229,0.12)', stroke: APP.blueIce },
{ id: 'fire', label: 'Fire', icon: Icons.flame, tint: 'rgba(233,106,58,0.15)', stroke: '#E96A3A' },
{ id: 'nav', label: 'Navigation', icon: Icons.compass, tint: 'rgba(180,122,224,0.12)', stroke: APP.purple },
{ id: 'dis', label: 'Disasters', icon: Icons.disaster, tint: 'rgba(63,200,200,0.12)', stroke: APP.teal },
{ id: 'aid', label: 'First Aid', icon: Icons.plus, tint: 'rgba(232,76,76,0.10)', stroke: APP.danger },
];
return (
{/* Header */}
SURVIVAL
Offline Survival Guide
{Icons.gear(APP.primaryDim)}
{/* Search */}
{/* Daily tip */}
{Icons.alertTri(APP.warning)}
DAILY TIP
Always set multiple traps at the same time — the chance of success is much greater.
{/* Categories */}
CATEGORIES
{categories.map(c => (
{c.icon(c.stroke)}
{c.label}
))}
);
}
Object.assign(window, { APP, Icons, StatusBar, TabBar, SearchField, HomeScreen });