From 8ab62fed3b9040f6155956662af9d6a642c4afc6 Mon Sep 17 00:00:00 2001 From: William Jordan-Cooley Date: Wed, 3 Jul 2024 14:42:51 -0400 Subject: [PATCH 1/2] update lemma factory --- .gitignore | 2 ++ lib/main.dart | 2 +- lib/pangea/models/lemma.dart | 19 ++++++++++--------- pubspec.yaml | 2 ++ 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 3c47c0cc2..1071f4410 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,8 @@ prime *.env !/public/.env +*.env.local_choreo +*.env.prod # libolm package /assets/js/package diff --git a/lib/main.dart b/lib/main.dart index 6be6edc91..36add47dc 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -22,7 +22,7 @@ void main() async { // #Pangea try { - await dotenv.load(fileName: ".env"); + await dotenv.load(fileName: ".env.local_choreo"); } catch (e) { Logs().e('Failed to load .env file', e); } diff --git a/lib/pangea/models/lemma.dart b/lib/pangea/models/lemma.dart index d07ac8ff0..017a7ab88 100644 --- a/lib/pangea/models/lemma.dart +++ b/lib/pangea/models/lemma.dart @@ -16,14 +16,15 @@ class Lemma { /// [morph] ex {} - morphological features of the lemma /// https://universaldependencies.org/u/feat/ - final Map morph; + final Map morph; - Lemma( - {required this.text, - required this.saveVocab, - required this.form, - this.pos = '', - this.morph = const {}}); + Lemma({ + required this.text, + required this.saveVocab, + required this.form, + this.pos = '', + this.morph = const {}, + }); factory Lemma.fromJson(Map json) { return Lemma( @@ -31,7 +32,7 @@ class Lemma { saveVocab: json['save_vocab'] ?? json['saveVocab'] ?? false, form: json["form"] ?? json['text'], pos: json['pos'] ?? '', - morph: json['morph'] ?? {}, + morph: json['morph'] ?? '{}', ); } @@ -41,7 +42,7 @@ class Lemma { 'save_vocab': saveVocab, 'form': form, 'pos': pos, - 'morph': morph + 'morph': morph, }; } diff --git a/pubspec.yaml b/pubspec.yaml index a24dfdff3..c78c7dbba 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -151,6 +151,8 @@ flutter: # causes error with github actions # - .env # - assets/.env + - .env.local_choreo + - assets/.env.local_choreo - assets/pangea/ - assets/pangea/bot_faces/ # Pangea# From 9362f9c915645cef5e8b7d19419fda34a53f11c0 Mon Sep 17 00:00:00 2001 From: ggurdin Date: Wed, 3 Jul 2024 15:09:16 -0400 Subject: [PATCH 2/2] uncommented message info button --- lib/pages/chat/chat_view.dart | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/lib/pages/chat/chat_view.dart b/lib/pages/chat/chat_view.dart index 5b4f96606..3c819f412 100644 --- a/lib/pages/chat/chat_view.dart +++ b/lib/pages/chat/chat_view.dart @@ -89,19 +89,17 @@ class ChatView extends StatelessWidget { } }, itemBuilder: (context) => [ - // #Pangea - // PopupMenuItem( - // value: _EventContextAction.info, - // child: Row( - // mainAxisSize: MainAxisSize.min, - // children: [ - // const Icon(Icons.info_outlined), - // const SizedBox(width: 12), - // Text(L10n.of(context)!.messageInfo), - // ], - // ), - // ), - // Pangea# + PopupMenuItem( + value: _EventContextAction.info, + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + const Icon(Icons.info_outlined), + const SizedBox(width: 12), + Text(L10n.of(context)!.messageInfo), + ], + ), + ), if (controller.selectedEvents.single.status.isSent) PopupMenuItem( value: _EventContextAction.report, @@ -442,7 +440,8 @@ class ChatView extends StatelessWidget { children: [ const ConnectionStatusHeader(), ITBar( - choreographer: controller.choreographer, + choreographer: + controller.choreographer, ), ReactionsPicker(controller), ReplyDisplay(controller),