From e6e20d1a0ed8528f2858ddd3005b83a2bd37e2f9 Mon Sep 17 00:00:00 2001 From: Fransolet Thomas Date: Fri, 21 Oct 2022 17:54:19 +0200 Subject: [PATCH] Fix label in french + resolve qrcodes font issue --- lib/Components/rounded_password_field.dart | 2 +- lib/Helpers/PDFHelper.dart | 4 ++-- .../Configurations/configuration_detail_screen.dart | 8 ++++---- lib/Screens/Configurations/new_configuration_popup.dart | 4 ++-- lib/Screens/Configurations/section_reorderList.dart | 2 +- lib/Screens/Main/components/body.dart | 2 +- lib/Screens/login_screen.dart | 6 ++++-- 7 files changed, 15 insertions(+), 13 deletions(-) diff --git a/lib/Components/rounded_password_field.dart b/lib/Components/rounded_password_field.dart index 055df84..381fdd1 100644 --- a/lib/Components/rounded_password_field.dart +++ b/lib/Components/rounded_password_field.dart @@ -28,7 +28,7 @@ class _RoundedPasswordFieldState extends State { cursorColor: kPrimaryColor, style: TextStyle(fontSize: 20, color: kBlack), decoration: InputDecoration( - hintText: "Password", + hintText: "Mot de passe", hintStyle: TextStyle(fontSize: 20.0, color: kBlack), icon: Icon( Icons.lock, diff --git a/lib/Helpers/PDFHelper.dart b/lib/Helpers/PDFHelper.dart index d132048..3a6348f 100644 --- a/lib/Helpers/PDFHelper.dart +++ b/lib/Helpers/PDFHelper.dart @@ -10,7 +10,7 @@ class PDFHelper { var sectionsArticle = sections.where((section) => section.type == SectionType.article); if(sectionsArticle.length > 0) { final font = await rootBundle.load("fonts/OpenSans-Medium.ttf"); - final ttf = pw.Font.ttf(font); + //final ttf = pw.Font.ttf(font); final pdf = pw.Document(); pdf.addPage(pw.MultiPage( @@ -22,7 +22,7 @@ class PDFHelper { child: pw.Column( children: [ - pw.Text(section.label, style: pw.TextStyle(font: ttf, fontSize: 30)), + pw.Text(section.label, style: pw.TextStyle(fontSize: 30)), //font: ttf, pw.Padding(padding: const pw.EdgeInsets.only(top: 20)), pw.BarcodeWidget( data: section.id, diff --git a/lib/Screens/Configurations/configuration_detail_screen.dart b/lib/Screens/Configurations/configuration_detail_screen.dart index 376f90b..f75f9db 100644 --- a/lib/Screens/Configurations/configuration_detail_screen.dart +++ b/lib/Screens/Configurations/configuration_detail_screen.dart @@ -98,11 +98,11 @@ class _ConfigurationDetailScreenState extends State { anchorElement.click(); } else { File test = await FileHelper().storeConfiguration(export); - showNotification(Colors.green, kWhite, "L'export de la configuration a réussi, le document se trouve là : " + test.path, context, 3000); + showNotification(Colors.green, kWhite, "L'export de la visite a réussi, le document se trouve là : " + test.path, context, 3000); } } catch(e) { log(e); - showNotification(kPrimaryColor, kWhite, "L'export de la configuration a échoué", context, null); + showNotification(kPrimaryColor, kWhite, "L'export de la visite a échoué", context, null); } }, child: Padding( @@ -420,7 +420,7 @@ class _ConfigurationDetailScreenState extends State { Future delete(ConfigurationDTO configurationDTO, AppContext appContext) async { showConfirmationDialog( - "Êtes-vous sûr de vouloir supprimer cette configuration ?", + "Êtes-vous sûr de vouloir supprimer cette visite ?", () {}, () async { ManagerAppContext managerAppContext = appContext.getContext(); @@ -438,7 +438,7 @@ class _ConfigurationDetailScreenState extends State { managerAppContext.selectedConfiguration = configuration; appContext.setContext(managerAppContext); - showNotification(Colors.green, kWhite, 'La configuration a été sauvegardée avec succès', context, null); + showNotification(Colors.green, kWhite, 'La visite a été sauvegardée avec succès', context, null); } Future getConfiguration(ConfigurationDetailScreen widget, Client client) async { diff --git a/lib/Screens/Configurations/new_configuration_popup.dart b/lib/Screens/Configurations/new_configuration_popup.dart index e916dff..a5ae2db 100644 --- a/lib/Screens/Configurations/new_configuration_popup.dart +++ b/lib/Screens/Configurations/new_configuration_popup.dart @@ -25,7 +25,7 @@ void showNewConfiguration(AppContext appContext, ValueChanged isImport, Bu height: size.height*0.3, child: Column( children: [ - Text("Nouvelle configuration", style: new TextStyle(fontSize: 25, fontWeight: FontWeight.w400)), + Text("Nouvelle visite", style: new TextStyle(fontSize: 25, fontWeight: FontWeight.w400)), Column( children: [ StringInputContainer( @@ -139,7 +139,7 @@ void create(ConfigurationDTO configurationDTO, AppContext appContext, context) a managerAppContext.selectedConfiguration = null; appContext.setContext(managerAppContext); - showNotification(Colors.green, kWhite, 'La configuration a été créée avec succès', context, null); + showNotification(Colors.green, kWhite, 'La visite a été créée avec succès', context, null); Navigator.of(context).pop(); } diff --git a/lib/Screens/Configurations/section_reorderList.dart b/lib/Screens/Configurations/section_reorderList.dart index 185d6ef..0e42188 100644 --- a/lib/Screens/Configurations/section_reorderList.dart +++ b/lib/Screens/Configurations/section_reorderList.dart @@ -123,7 +123,7 @@ class _SectionReorderListState extends State { child: Container( height: size.height*0.1, child: StringInputContainer( - label: "Recherche test:", + label: "Recherche:", isSmall: true, fontSize: 15, fontSizeText: 15, diff --git a/lib/Screens/Main/components/body.dart b/lib/Screens/Main/components/body.dart index ad1d312..823db12 100644 --- a/lib/Screens/Main/components/body.dart +++ b/lib/Screens/Main/components/body.dart @@ -27,7 +27,7 @@ class _BodyState extends State { var selectedElement; //MenuSection devices = new MenuSection(name: "Test", type: "devices", order: 0); - MenuSection configurations = new MenuSection(name: "Configurations", type: "configurations", order: 0); + MenuSection configurations = new MenuSection(name: "Visites", type: "configurations", order: 0); MenuSection resources = new MenuSection(name: "Ressources", type: "resources", order: 1); Menu menu = new Menu(title: "MyMuseum"); diff --git a/lib/Screens/login_screen.dart b/lib/Screens/login_screen.dart index 1032c8b..54723db 100644 --- a/lib/Screens/login_screen.dart +++ b/lib/Screens/login_screen.dart @@ -142,6 +142,8 @@ class _LoginScreenState extends State { print("subdomain not found"); } } else { + this.email = "test@email.be"; //widget.session.email; + this.password = "kljqsdkljqsd"; //widget.session.password; print("localhost.. set mymuseum instance by default"); } @@ -209,7 +211,7 @@ class _LoginScreenState extends State { SizedBox( width: size.width*0.2, child: RoundedInputField( - hintText: "Email", + hintText: "E-mail", onChanged: (value) { email = value; }, @@ -251,7 +253,7 @@ class _LoginScreenState extends State { ), SizedBox(height: size.height * 0.05), !isLoading ? RoundedButton( - text: "LOGIN", + text: "SE CONNECTER", fontSize: 25, vertical: 25, horizontal: 45,