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,
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,

View File

@ -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,

View File

@ -98,11 +98,11 @@ class _ConfigurationDetailScreenState extends State<ConfigurationDetailScreen> {
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<ConfigurationDetailScreen> {
Future<void> 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<ConfigurationDetailScreen> {
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<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,
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();
}

View File

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

View File

@ -27,7 +27,7 @@ class _BodyState extends State<Body> {
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");

View File

@ -142,6 +142,8 @@ class _LoginScreenState extends State<LoginScreen> {
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<LoginScreen> {
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<LoginScreen> {
),
SizedBox(height: size.height * 0.05),
!isLoading ? RoundedButton(
text: "LOGIN",
text: "SE CONNECTER",
fontSize: 25,
vertical: 25,
horizontal: 45,