Fix label in french + resolve qrcodes font issue

This commit is contained in:
Fransolet Thomas 2022-10-21 17:54:19 +02:00
parent 42c442b145
commit e6e20d1a0e
7 changed files with 15 additions and 13 deletions

View File

@ -28,7 +28,7 @@ class _RoundedPasswordFieldState extends State<RoundedPasswordField> {
cursorColor: kPrimaryColor, cursorColor: kPrimaryColor,
style: TextStyle(fontSize: 20, color: kBlack), style: TextStyle(fontSize: 20, color: kBlack),
decoration: InputDecoration( decoration: InputDecoration(
hintText: "Password", hintText: "Mot de passe",
hintStyle: TextStyle(fontSize: 20.0, color: kBlack), hintStyle: TextStyle(fontSize: 20.0, color: kBlack),
icon: Icon( icon: Icon(
Icons.lock, Icons.lock,

View File

@ -10,7 +10,7 @@ class PDFHelper {
var sectionsArticle = sections.where((section) => section.type == SectionType.article); var sectionsArticle = sections.where((section) => section.type == SectionType.article);
if(sectionsArticle.length > 0) { if(sectionsArticle.length > 0) {
final font = await rootBundle.load("fonts/OpenSans-Medium.ttf"); 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(); final pdf = pw.Document();
pdf.addPage(pw.MultiPage( pdf.addPage(pw.MultiPage(
@ -22,7 +22,7 @@ class PDFHelper {
child: child:
pw.Column( pw.Column(
children: [ 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.Padding(padding: const pw.EdgeInsets.only(top: 20)),
pw.BarcodeWidget( pw.BarcodeWidget(
data: section.id, data: section.id,

View File

@ -98,11 +98,11 @@ class _ConfigurationDetailScreenState extends State<ConfigurationDetailScreen> {
anchorElement.click(); anchorElement.click();
} else { } else {
File test = await FileHelper().storeConfiguration(export); 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) { } catch(e) {
log(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( child: Padding(
@ -420,7 +420,7 @@ class _ConfigurationDetailScreenState extends State<ConfigurationDetailScreen> {
Future<void> delete(ConfigurationDTO configurationDTO, AppContext appContext) async { Future<void> delete(ConfigurationDTO configurationDTO, AppContext appContext) async {
showConfirmationDialog( showConfirmationDialog(
"Êtes-vous sûr de vouloir supprimer cette configuration ?", "Êtes-vous sûr de vouloir supprimer cette visite ?",
() {}, () {},
() async { () async {
ManagerAppContext managerAppContext = appContext.getContext(); ManagerAppContext managerAppContext = appContext.getContext();
@ -438,7 +438,7 @@ class _ConfigurationDetailScreenState extends State<ConfigurationDetailScreen> {
managerAppContext.selectedConfiguration = configuration; managerAppContext.selectedConfiguration = configuration;
appContext.setContext(managerAppContext); 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<ConfigurationDTO> getConfiguration(ConfigurationDetailScreen widget, Client client) async { Future<ConfigurationDTO> getConfiguration(ConfigurationDetailScreen widget, Client client) async {

View File

@ -25,7 +25,7 @@ void showNewConfiguration(AppContext appContext, ValueChanged<bool> isImport, Bu
height: size.height*0.3, height: size.height*0.3,
child: Column( child: Column(
children: [ children: [
Text("Nouvelle configuration", style: new TextStyle(fontSize: 25, fontWeight: FontWeight.w400)), Text("Nouvelle visite", style: new TextStyle(fontSize: 25, fontWeight: FontWeight.w400)),
Column( Column(
children: [ children: [
StringInputContainer( StringInputContainer(
@ -139,7 +139,7 @@ void create(ConfigurationDTO configurationDTO, AppContext appContext, context) a
managerAppContext.selectedConfiguration = null; managerAppContext.selectedConfiguration = null;
appContext.setContext(managerAppContext); 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(); Navigator.of(context).pop();
} }

View File

@ -123,7 +123,7 @@ class _SectionReorderListState extends State<SectionReorderList> {
child: Container( child: Container(
height: size.height*0.1, height: size.height*0.1,
child: StringInputContainer( child: StringInputContainer(
label: "Recherche test:", label: "Recherche:",
isSmall: true, isSmall: true,
fontSize: 15, fontSize: 15,
fontSizeText: 15, fontSizeText: 15,

View File

@ -27,7 +27,7 @@ class _BodyState extends State<Body> {
var selectedElement; var selectedElement;
//MenuSection devices = new MenuSection(name: "Test", type: "devices", order: 0); //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); MenuSection resources = new MenuSection(name: "Ressources", type: "resources", order: 1);
Menu menu = new Menu(title: "MyMuseum"); Menu menu = new Menu(title: "MyMuseum");

View File

@ -142,6 +142,8 @@ class _LoginScreenState extends State<LoginScreen> {
print("subdomain not found"); print("subdomain not found");
} }
} else { } else {
this.email = "test@email.be"; //widget.session.email;
this.password = "kljqsdkljqsd"; //widget.session.password;
print("localhost.. set mymuseum instance by default"); print("localhost.. set mymuseum instance by default");
} }
@ -209,7 +211,7 @@ class _LoginScreenState extends State<LoginScreen> {
SizedBox( SizedBox(
width: size.width*0.2, width: size.width*0.2,
child: RoundedInputField( child: RoundedInputField(
hintText: "Email", hintText: "E-mail",
onChanged: (value) { onChanged: (value) {
email = value; email = value;
}, },
@ -251,7 +253,7 @@ class _LoginScreenState extends State<LoginScreen> {
), ),
SizedBox(height: size.height * 0.05), SizedBox(height: size.height * 0.05),
!isLoading ? RoundedButton( !isLoading ? RoundedButton(
text: "LOGIN", text: "SE CONNECTER",
fontSize: 25, fontSize: 25,
vertical: 25, vertical: 25,
horizontal: 45, horizontal: 45,