Live video on the AT Protocol

add stream notification button to chat panel

authored by

Natalie B. and committed by
Eli Mallon
5e6e4bc0 0a5b814d

+29
+19
js/app/components/mobile/chat.tsx
··· 4 4 Loader, 5 5 Resizable, 6 6 StreamNotificationProvider, 7 + StreamNotifications, 7 8 Text, 8 9 useHandle, 9 10 useLivestreamInfo, ··· 172 173 <Chat /> 173 174 </View> 174 175 <View style={[layout.flex.column, gap.all[2]]}> 176 + <Pressable 177 + onPress={() => 178 + StreamNotifications.activate("Stream notification activated!") 179 + } 180 + style={[ 181 + layout.flex.row, 182 + layout.flex.center, 183 + { 184 + padding: 12, 185 + borderRadius: borderRadius.xl, 186 + backgroundColor: "rgba(255, 255, 255, 0.05)", 187 + }, 188 + ]} 189 + > 190 + <Text style={{ color: "rgba(255, 255, 255, 0.7)", fontSize: 12 }}> 191 + Activate Stream Notification 192 + </Text> 193 + </Pressable> 175 194 {agent?.did ? ( 176 195 <ChatBox 177 196 emojiData={emojiData}
+1
js/components/src/index.tsx
··· 38 38 export * from "./lib/system-messages"; 39 39 40 40 export * from "./components/stream-notification"; 41 + export * from "./lib/stream-notifications"; 41 42 42 43 export * from "./utils/format-handle"; 43 44
+9
js/components/src/lib/stream-notifications.ts
··· 39 39 variant: "info", 40 40 }); 41 41 }, 42 + 43 + activate: (message: string) => { 44 + streamNotification.show({ 45 + id: "stream-activate", 46 + message: message, 47 + duration: 3, 48 + variant: "info", 49 + }); 50 + }, 42 51 };