mirror of
https://gitlab.com/veilid/veilidchat.git
synced 2024-10-01 06:55:46 -04:00
Merge branch 'debugging' into 'main'
Debugging See merge request veilid/veilidchat!17
This commit is contained in:
commit
b0edfa9b29
9
.gitignore
vendored
9
.gitignore
vendored
@ -32,6 +32,15 @@ migrate_working_dir/
|
|||||||
.pub/
|
.pub/
|
||||||
/build/
|
/build/
|
||||||
|
|
||||||
|
# Flutter generated files
|
||||||
|
# Not doing this at this time: https://stackoverflow.com/questions/56110386/should-i-commit-generated-code-in-flutter-dart-to-vcs
|
||||||
|
# *.g.dart
|
||||||
|
# *.freezed.dart
|
||||||
|
# *.pb.dart
|
||||||
|
# *.pbenum.dart
|
||||||
|
# *.pbjson.dart
|
||||||
|
# *.pbserver.dart
|
||||||
|
|
||||||
# Symbolication related
|
# Symbolication related
|
||||||
app.*.symbols
|
app.*.symbols
|
||||||
|
|
||||||
|
8
build.bat
Normal file
8
build.bat
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
@echo off
|
||||||
|
dart run build_runner build --delete-conflicting-outputs
|
||||||
|
|
||||||
|
pushd lib
|
||||||
|
protoc --dart_out=proto -I veilid_support\proto -I veilid_support\dht_support\proto -I proto veilidchat.proto
|
||||||
|
protoc --dart_out=proto -I veilid_support\proto -I veilid_support\dht_support\proto dht.proto
|
||||||
|
protoc --dart_out=proto -I veilid_support\proto veilid.proto
|
||||||
|
popd
|
2
build.sh
2
build.sh
@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
dart run build_runner build
|
dart run build_runner build --delete-conflicting-outputs
|
||||||
|
|
||||||
pushd lib > /dev/null
|
pushd lib > /dev/null
|
||||||
protoc --dart_out=proto -I veilid_support/proto -I veilid_support/dht_support/proto -I proto veilidchat.proto
|
protoc --dart_out=proto -I veilid_support/proto -I veilid_support/dht_support/proto -I proto veilidchat.proto
|
||||||
|
@ -369,10 +369,10 @@ class ScanInviteDialogState extends ConsumerState<ScanInviteDialog> {
|
|||||||
: () async {
|
: () async {
|
||||||
final inviteData = await pasteQRImage(context);
|
final inviteData = await pasteQRImage(context);
|
||||||
if (inviteData != null) {
|
if (inviteData != null) {
|
||||||
|
await validateInviteData(inviteData: inviteData);
|
||||||
setState(() {
|
setState(() {
|
||||||
scanned = true;
|
scanned = true;
|
||||||
});
|
});
|
||||||
await validateInviteData(inviteData: inviteData);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: Text(translate('scan_invite_dialog.paste'))),
|
child: Text(translate('scan_invite_dialog.paste'))),
|
||||||
|
@ -27,6 +27,8 @@ void main() async {
|
|||||||
// Ansi colors
|
// Ansi colors
|
||||||
ansiColorDisabled = false;
|
ansiColorDisabled = false;
|
||||||
|
|
||||||
|
// Catch errors
|
||||||
|
await runZonedGuarded(() async {
|
||||||
// Logs
|
// Logs
|
||||||
initLoggy();
|
initLoggy();
|
||||||
|
|
||||||
@ -48,7 +50,6 @@ void main() async {
|
|||||||
|
|
||||||
// Run the app
|
// Run the app
|
||||||
// Hot reloads will only restart this part, not Veilid
|
// Hot reloads will only restart this part, not Veilid
|
||||||
runZonedGuarded(() {
|
|
||||||
runApp(ProviderScope(
|
runApp(ProviderScope(
|
||||||
observers: const [StateLogger()],
|
observers: const [StateLogger()],
|
||||||
child: LocalizedApp(delegate, VeilidChatApp(theme: initTheme))));
|
child: LocalizedApp(delegate, VeilidChatApp(theme: initTheme))));
|
||||||
|
@ -154,6 +154,10 @@ class MainPagerState extends ConsumerState<MainPager>
|
|||||||
Widget _newContactInvitationBottomSheetBuilder(
|
Widget _newContactInvitationBottomSheetBuilder(
|
||||||
// ignore: prefer_expression_function_bodies
|
// ignore: prefer_expression_function_bodies
|
||||||
BuildContext context) {
|
BuildContext context) {
|
||||||
|
final theme = Theme.of(context);
|
||||||
|
final textTheme = theme.textTheme;
|
||||||
|
final scale = theme.extension<ScaleScheme>()!;
|
||||||
|
|
||||||
return KeyboardListener(
|
return KeyboardListener(
|
||||||
focusNode: FocusNode(),
|
focusNode: FocusNode(),
|
||||||
onKeyEvent: (ke) {
|
onKeyEvent: (ke) {
|
||||||
@ -165,37 +169,40 @@ class MainPagerState extends ConsumerState<MainPager>
|
|||||||
height: 200,
|
height: 200,
|
||||||
child: Column(children: [
|
child: Column(children: [
|
||||||
Text(translate('accounts_menu.invite_contact'),
|
Text(translate('accounts_menu.invite_contact'),
|
||||||
style: Theme.of(context).textTheme.titleMedium)
|
style: textTheme.titleMedium)
|
||||||
.paddingAll(8),
|
.paddingAll(8),
|
||||||
Row(mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [
|
Row(mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [
|
||||||
Column(mainAxisAlignment: MainAxisAlignment.center, children: [
|
Column(children: [
|
||||||
IconButton(
|
IconButton(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
await SendInviteDialog.show(context);
|
await SendInviteDialog.show(context);
|
||||||
},
|
},
|
||||||
iconSize: 64,
|
iconSize: 64,
|
||||||
icon: const Icon(Icons.contact_page)),
|
icon: const Icon(Icons.contact_page),
|
||||||
|
color: scale.primaryScale.background),
|
||||||
Text(translate('accounts_menu.create_invite'))
|
Text(translate('accounts_menu.create_invite'))
|
||||||
]),
|
]),
|
||||||
Column(mainAxisAlignment: MainAxisAlignment.center, children: [
|
Column(children: [
|
||||||
IconButton(
|
IconButton(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
await ScanInviteDialog.show(context);
|
await ScanInviteDialog.show(context);
|
||||||
},
|
},
|
||||||
iconSize: 64,
|
iconSize: 64,
|
||||||
icon: const Icon(Icons.qr_code_scanner)),
|
icon: const Icon(Icons.qr_code_scanner),
|
||||||
|
color: scale.primaryScale.background),
|
||||||
Text(translate('accounts_menu.scan_invite'))
|
Text(translate('accounts_menu.scan_invite'))
|
||||||
]),
|
]),
|
||||||
Column(mainAxisAlignment: MainAxisAlignment.center, children: [
|
Column(children: [
|
||||||
IconButton(
|
IconButton(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
await PasteInviteDialog.show(context);
|
await PasteInviteDialog.show(context);
|
||||||
},
|
},
|
||||||
iconSize: 64,
|
iconSize: 64,
|
||||||
icon: const Icon(Icons.paste)),
|
icon: const Icon(Icons.paste),
|
||||||
|
color: scale.primaryScale.background),
|
||||||
Text(translate('accounts_menu.paste_invite'))
|
Text(translate('accounts_menu.paste_invite'))
|
||||||
])
|
])
|
||||||
]).expanded()
|
]).expanded()
|
||||||
@ -288,7 +295,7 @@ class MainPagerState extends ConsumerState<MainPager>
|
|||||||
floatingActionButton: BottomSheetActionButton(
|
floatingActionButton: BottomSheetActionButton(
|
||||||
shape: const RoundedRectangleBorder(
|
shape: const RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.all(Radius.circular(14))),
|
borderRadius: BorderRadius.all(Radius.circular(14))),
|
||||||
//foregroundColor: scale.secondaryScale.text,
|
foregroundColor: scale.secondaryScale.text,
|
||||||
backgroundColor: scale.secondaryScale.hoverBorder,
|
backgroundColor: scale.secondaryScale.hoverBorder,
|
||||||
builder: (context) => Icon(
|
builder: (context) => Icon(
|
||||||
_fabIconList[_currentPage],
|
_fabIconList[_currentPage],
|
||||||
|
@ -6,7 +6,7 @@ part of 'router_notifier.dart';
|
|||||||
// RiverpodGenerator
|
// RiverpodGenerator
|
||||||
// **************************************************************************
|
// **************************************************************************
|
||||||
|
|
||||||
String _$routerNotifierHash() => r'5a3527e3890f0746db4cbe051d453b89e5809989';
|
String _$routerNotifierHash() => r'6f52ed95f090f2d198d358e7526a91511c0a61e5';
|
||||||
|
|
||||||
/// See also [RouterNotifier].
|
/// See also [RouterNotifier].
|
||||||
@ProviderFor(RouterNotifier)
|
@ProviderFor(RouterNotifier)
|
||||||
|
@ -537,9 +537,15 @@ ThemeData radixGenerator(Brightness brightness, RadixThemeColor themeColor) {
|
|||||||
final colorScheme = _radixColorScheme(brightness, radix);
|
final colorScheme = _radixColorScheme(brightness, radix);
|
||||||
final scaleScheme = radix.toScale();
|
final scaleScheme = radix.toScale();
|
||||||
|
|
||||||
return ThemeData.from(
|
final themeData = ThemeData.from(
|
||||||
colorScheme: colorScheme, textTheme: textTheme, useMaterial3: true)
|
colorScheme: colorScheme, textTheme: textTheme, useMaterial3: true);
|
||||||
.copyWith(extensions: <ThemeExtension<dynamic>>[
|
return themeData.copyWith(
|
||||||
|
bottomSheetTheme: themeData.bottomSheetTheme.copyWith(
|
||||||
|
elevation: 0,
|
||||||
|
modalElevation: 0,
|
||||||
|
shape:
|
||||||
|
RoundedRectangleBorder(borderRadius: BorderRadius.circular(16))),
|
||||||
|
extensions: <ThemeExtension<dynamic>>[
|
||||||
scaleScheme,
|
scaleScheme,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user