Matthias Nott
2026-03-02 a0f39302919fbacf7a0d407f01b1a50413ea6f70
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
import React, { useState } from "react";
import { Pressable, Text, View, useWindowDimensions } from "react-native";
import * as Haptics from "expo-haptics";
interface CommandBarProps {
  onSessions: () => void;
  onScreenshot: () => void;
  onHelp: () => void;
}
export function CommandBar({ onSessions, onScreenshot, onHelp }: CommandBarProps) {
  return (
    <View
      style={{
        flexDirection: "row",
        paddingHorizontal: 12,
        paddingVertical: 6,
        gap: 8,
      }}
    >
      <CmdBtn icon="📋" label="Sessions" bg="#1A2744" border="#2E4A7A" onPress={onSessions} />
      <CmdBtn icon="📸" label="Screen" bg="#1A3A2A" border="#2E6A4A" onPress={onScreenshot} />
      <CmdBtn icon="❓" label="Help" bg="#3A1A2A" border="#6A2E4A" onPress={onHelp} />
    </View>
  );
}
interface TextModeCommandBarProps {
  onSessions: () => void;
  onScreenshot: () => void;
  onNavigate: () => void;
  onClear: () => void;
}
export function TextModeCommandBar({
  onSessions,
  onScreenshot,
  onNavigate,
  onClear,
}: TextModeCommandBarProps) {
  return (
    <View
      style={{
        flexDirection: "row",
        paddingHorizontal: 12,
        paddingVertical: 6,
        gap: 8,
      }}
    >
      <CmdBtn icon="📋" label="Sessions" bg="#1A2744" border="#2E4A7A" onPress={onSessions} />
      <CmdBtn icon="📸" label="Screen" bg="#1A3A2A" border="#2E6A4A" onPress={onScreenshot} />
      <CmdBtn icon="🧭" label="Navigate" bg="#2A2A1A" border="#5A5A2E" onPress={onNavigate} />
      <CmdBtn icon="🗑" label="Clear" bg="#3A1A1A" border="#6A2E2E" onPress={onClear} />
    </View>
  );
}
function CmdBtn({
  icon,
  label,
  bg,
  border,
  onPress,
}: {
  icon: string;
  label: string;
  bg: string;
  border: string;
  onPress: () => void;
}) {
  const [pressed, setPressed] = useState(false);
  const { width } = useWindowDimensions();
  return (
    <View style={{ flex: 1 }}>
      <Pressable
        onPressIn={() => setPressed(true)}
        onPressOut={() => setPressed(false)}
        onPress={() => {
          Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Light);
          onPress();
        }}
      >
        <View
          style={{
            height: 68,
            borderRadius: 16,
            alignItems: "center",
            justifyContent: "center",
            backgroundColor: pressed ? "#4A9EFF" : bg,
            borderWidth: 1.5,
            borderColor: pressed ? "#4A9EFF" : border,
          }}
        >
          <Text style={{ fontSize: 26, marginBottom: 2 }}>{icon}</Text>
          <Text style={{ color: "#C8C8E0", fontSize: 13, fontWeight: "700" }}>
            {label}
          </Text>
        </View>
      </Pressable>
    </View>
  );
}