mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2025-05-02 22:34:56 -04:00
beta warning dialog
This commit is contained in:
parent
ba191d3903
commit
6080c2f0c6
26 changed files with 445 additions and 339 deletions
|
@ -86,7 +86,7 @@ class _HomeAccountReadyState extends State<HomeAccountReady> {
|
|||
if (activeChatLocalConversationKey == null) {
|
||||
return const NoConversationWidget();
|
||||
}
|
||||
return ChatComponentWidget.builder(
|
||||
return ChatComponentWidget(
|
||||
localConversationRecordKey: activeChatLocalConversationKey,
|
||||
key: ValueKey(activeChatLocalConversationKey));
|
||||
}
|
||||
|
@ -104,11 +104,6 @@ class _HomeAccountReadyState extends State<HomeAccountReady> {
|
|||
|
||||
final activeChat = context.watch<ActiveChatCubit>().state;
|
||||
final hasActiveChat = activeChat != null;
|
||||
// if (hasActiveChat) {
|
||||
// _chatAnimationController.forward();
|
||||
// } else {
|
||||
// _chatAnimationController.reset();
|
||||
// }
|
||||
|
||||
return LayoutBuilder(builder: (context, constraints) {
|
||||
const leftColumnSize = 300.0;
|
||||
|
|
|
@ -1,9 +1,14 @@
|
|||
import 'dart:async';
|
||||
import 'dart:math';
|
||||
|
||||
import 'package:flutter/gestures.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_translate/flutter_translate.dart';
|
||||
import 'package:flutter_zoom_drawer/flutter_zoom_drawer.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:quickalert/quickalert.dart';
|
||||
import 'package:transitioned_indexed_stack/transitioned_indexed_stack.dart';
|
||||
import 'package:url_launcher/url_launcher_string.dart';
|
||||
import 'package:veilid_support/veilid_support.dart';
|
||||
|
||||
import '../../account_manager/account_manager.dart';
|
||||
|
@ -36,6 +41,8 @@ class HomeScreenState extends State<HomeScreen>
|
|||
.indexWhere((x) => x.superIdentity.recordKey == activeLocalAccount);
|
||||
final canClose = activeIndex != -1;
|
||||
|
||||
unawaited(_doBetaDialog(context));
|
||||
|
||||
if (!canClose) {
|
||||
await _zoomDrawerController.open!();
|
||||
}
|
||||
|
@ -43,6 +50,36 @@ class HomeScreenState extends State<HomeScreen>
|
|||
super.initState();
|
||||
}
|
||||
|
||||
Future<void> _doBetaDialog(BuildContext context) async {
|
||||
await QuickAlert.show(
|
||||
context: context,
|
||||
title: translate('splash.beta_title'),
|
||||
widget: RichText(
|
||||
textAlign: TextAlign.center,
|
||||
text: TextSpan(
|
||||
children: <TextSpan>[
|
||||
TextSpan(
|
||||
text: translate('splash.beta_text'),
|
||||
style: const TextStyle(
|
||||
color: Colors.black87,
|
||||
),
|
||||
),
|
||||
TextSpan(
|
||||
text: 'https://veilid.com/chat/beta',
|
||||
style: const TextStyle(
|
||||
color: Colors.blue,
|
||||
decoration: TextDecoration.underline,
|
||||
),
|
||||
recognizer: TapGestureRecognizer()
|
||||
..onTap =
|
||||
() => launchUrlString('https://veilid.com/chat/beta'),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
type: QuickAlertType.warning);
|
||||
}
|
||||
|
||||
Widget _buildAccountPage(
|
||||
BuildContext context,
|
||||
TypedKey superIdentityRecordKey,
|
||||
|
|
|
@ -43,8 +43,7 @@ class ContactsPageState extends State<ContactsPage> {
|
|||
final ciState = context.watch<ContactListCubit>().state;
|
||||
final ciBusy = ciState.busy;
|
||||
final contactList =
|
||||
ciState.state.asData?.value.map((x) => x.value).toIList() ??
|
||||
const IListConst([]);
|
||||
ciState.state.asData?.value.map((x) => x.value).toIList();
|
||||
|
||||
return CustomScrollView(slivers: [
|
||||
if (contactInvitationRecordList.isNotEmpty)
|
||||
|
@ -53,7 +52,7 @@ class ContactsPageState extends State<ContactsPage> {
|
|||
sliver: ContactInvitationListWidget(
|
||||
contactInvitationRecordList: contactInvitationRecordList,
|
||||
disabled: cilBusy)),
|
||||
ContactListWidget(contactList: contactList, disabled: ciBusy),
|
||||
ContactListWidget(contactList: contactList, disabled: ciBusy)
|
||||
]).paddingLTRB(8, 0, 8, 8);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
import 'dart:async';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:flutter_translate/flutter_translate.dart';
|
||||
import 'package:quickalert/quickalert.dart';
|
||||
import 'package:radix_colors/radix_colors.dart';
|
||||
|
||||
import '../tools/tools.dart';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue