feat(block2): messaging UI — private 1:1 chat (NIP-17)
- MessagesCubit: 1:1 conversation over MessageTransport. Filters the shared inbox to the peer; tags our own sends with our pubkey (NIP-17 wraps don't come back to the sender) so the UI can align bubbles; degrades gracefully offline. - ChatScreen (mockup 10): message bubbles (mine right / peer left) + a composer; opens a session lazily, shows 'set up sharing' when there's no relay. - Entry point: a 'Message' button on each offer card (hidden on your own listings) → /chat/:pubkey. - Routing + i18n en/es/pt. Tests: 5 cubit (send/receive/order/filter/offline) + chat offline + market, green.
This commit is contained in:
parent
cf99b7ff87
commit
4326e79419
13 changed files with 627 additions and 9 deletions
|
|
@ -17,6 +17,7 @@ import 'state/inventory_cubit.dart';
|
|||
import 'state/variety_detail_cubit.dart';
|
||||
import 'ui/about_screen.dart';
|
||||
import 'ui/auto_backup_gate.dart';
|
||||
import 'ui/chat_screen.dart';
|
||||
import 'ui/home_screen.dart';
|
||||
import 'ui/intro_screen.dart';
|
||||
import 'ui/inventory_list_screen.dart';
|
||||
|
|
@ -98,6 +99,15 @@ class TaneApp extends StatelessWidget {
|
|||
outbox: outbox,
|
||||
),
|
||||
),
|
||||
if (social != null && socialSettings != null)
|
||||
GoRoute(
|
||||
path: '/chat/:pubkey',
|
||||
builder: (context, state) => ChatScreen(
|
||||
social: social,
|
||||
settings: socialSettings,
|
||||
peerPubkey: state.pathParameters['pubkey']!,
|
||||
),
|
||||
),
|
||||
GoRoute(
|
||||
path: '/intro',
|
||||
builder: (context, state) => IntroScreen(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue