working login

This commit is contained in:
Henry Hiles 2026-01-25 14:32:20 +00:00
commit 3fff32f170
No known key found for this signature in database
7 changed files with 162 additions and 32 deletions

View file

@ -1,6 +1,6 @@
import "package:flutter/material.dart";
import "package:nexus/widgets/chat_page/room_chat.dart";
import "package:nexus/widgets/chat_page/sidebar.dart";
// import "package:nexus/widgets/chat_page/room_chat.dart";
// import "package:nexus/widgets/chat_page/sidebar.dart";
class ChatPage extends StatelessWidget {
const ChatPage({super.key});
@ -10,23 +10,23 @@ class ChatPage extends StatelessWidget {
builder: (context, constraints) {
final isDesktop = constraints.maxWidth > 650;
final showMembersByDefault = constraints.maxWidth > 1000;
return Scaffold(
body: Builder(
builder: (context) => Row(
children: [
if (isDesktop) Sidebar(),
Expanded(
child: RoomChat(
isDesktop: isDesktop,
showMembersByDefault: showMembersByDefault,
),
),
],
),
),
drawer: isDesktop ? null : Sidebar(),
);
return Placeholder();
// return Scaffold(
// body: Builder(
// builder: (context) => Row(
// children: [
// if (isDesktop) Sidebar(),
// Expanded(
// child: RoomChat(
// isDesktop: isDesktop,
// showMembersByDefault: showMembersByDefault,
// ),
// ),
// ],
// ),
// ),
// drawer: isDesktop ? null : Sidebar(),
// );
},
);
}

View file

@ -0,0 +1,46 @@
import "package:flutter/material.dart";
import "package:flutter_hooks/flutter_hooks.dart";
import "package:hooks_riverpod/hooks_riverpod.dart";
import "package:nexus/controllers/client_controller.dart";
import "package:nexus/widgets/form_text_input.dart";
class VerifyPage extends HookConsumerWidget {
const VerifyPage({super.key});
@override
Widget build(BuildContext context, WidgetRef ref) {
final passphraseController = useTextEditingController();
return AlertDialog(
title: Text("Verify"),
content: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Enter your recovery key or passphrase below to unlock encrypted messages.\nYour passphrase is usually not the same as your password.",
),
SizedBox(height: 12),
FormTextInput(
required: false,
autofocus: true,
capitalize: true,
controller: passphraseController,
obscure: true,
title: "Recovery Key or Passphrase",
),
],
),
actions: [
TextButton(
onPressed: () async {
ref
.watch(ClientController.provider.notifier)
.verify(passphraseController.text);
Navigator.of(context).pop();
},
child: Text("Verify"),
),
],
);
}
}