mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-09 20:39:35 +00:00
Merge pull request #101 from cake-tech/CAKE-38-change-button-position-in-alerts
CAKE-38 | changed button position in alerts (contact list page, walle…
This commit is contained in:
commit
2a7a4cad0a
8 changed files with 35 additions and 57 deletions
|
@ -252,10 +252,10 @@ class ContactListPage extends BasePage {
|
||||||
return AlertWithTwoActions(
|
return AlertWithTwoActions(
|
||||||
alertTitle: S.of(context).address_remove_contact,
|
alertTitle: S.of(context).address_remove_contact,
|
||||||
alertContent: S.of(context).address_remove_content,
|
alertContent: S.of(context).address_remove_content,
|
||||||
leftButtonText: S.of(context).remove,
|
rightButtonText: S.of(context).remove,
|
||||||
rightButtonText: S.of(context).cancel,
|
leftButtonText: S.of(context).cancel,
|
||||||
actionLeftButton: () => Navigator.of(context).pop(true),
|
actionRightButton: () => Navigator.of(context).pop(true),
|
||||||
actionRightButton: () => Navigator.of(context).pop(false));
|
actionLeftButton: () => Navigator.of(context).pop(false));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -267,10 +267,10 @@ class ContactListPage extends BasePage {
|
||||||
return AlertWithTwoActions(
|
return AlertWithTwoActions(
|
||||||
alertTitle: name,
|
alertTitle: name,
|
||||||
alertContent: address,
|
alertContent: address,
|
||||||
leftButtonText: S.of(context).copy,
|
rightButtonText: S.of(context).copy,
|
||||||
rightButtonText: S.of(context).cancel,
|
leftButtonText: S.of(context).cancel,
|
||||||
actionLeftButton: () => Navigator.of(context).pop(true),
|
actionRightButton: () => Navigator.of(context).pop(true),
|
||||||
actionRightButton: () => Navigator.of(context).pop(false));
|
actionLeftButton: () => Navigator.of(context).pop(false));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,13 +78,13 @@ class WalletMenu {
|
||||||
return AlertWithTwoActions(
|
return AlertWithTwoActions(
|
||||||
alertTitle: S.of(context).reconnection,
|
alertTitle: S.of(context).reconnection,
|
||||||
alertContent: S.of(context).reconnect_alert_text,
|
alertContent: S.of(context).reconnect_alert_text,
|
||||||
leftButtonText: S.of(context).ok,
|
rightButtonText: S.of(context).ok,
|
||||||
rightButtonText: S.of(context).cancel,
|
leftButtonText: S.of(context).cancel,
|
||||||
actionLeftButton: () {
|
actionRightButton: () {
|
||||||
walletStore.reconnect();
|
walletStore.reconnect();
|
||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
},
|
},
|
||||||
actionRightButton: () => Navigator.of(context).pop()
|
actionLeftButton: () => Navigator.of(context).pop()
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -284,14 +284,14 @@ class BaseExchangeWidgetState extends State<BaseExchangeWidget> {
|
||||||
return AlertWithTwoActions(
|
return AlertWithTwoActions(
|
||||||
alertTitle: S.of(context).template,
|
alertTitle: S.of(context).template,
|
||||||
alertContent: S.of(context).confirm_delete_template,
|
alertContent: S.of(context).confirm_delete_template,
|
||||||
leftButtonText: S.of(context).delete,
|
rightButtonText: S.of(context).delete,
|
||||||
rightButtonText: S.of(context).cancel,
|
leftButtonText: S.of(context).cancel,
|
||||||
actionLeftButton: () {
|
actionRightButton: () {
|
||||||
Navigator.of(dialogContext).pop();
|
Navigator.of(dialogContext).pop();
|
||||||
exchangeViewModel.exchangeTemplateStore.remove(template: template);
|
exchangeViewModel.exchangeTemplateStore.remove(template: template);
|
||||||
exchangeViewModel.exchangeTemplateStore.update();
|
exchangeViewModel.exchangeTemplateStore.update();
|
||||||
},
|
},
|
||||||
actionRightButton: () => Navigator.of(dialogContext).pop()
|
actionLeftButton: () => Navigator.of(dialogContext).pop()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
@ -36,13 +36,13 @@ class NodeListPage extends BasePage {
|
||||||
alertTitle: S.of(context).node_reset_settings_title,
|
alertTitle: S.of(context).node_reset_settings_title,
|
||||||
alertContent:
|
alertContent:
|
||||||
S.of(context).nodes_list_reset_to_default_message,
|
S.of(context).nodes_list_reset_to_default_message,
|
||||||
leftButtonText: S.of(context).reset,
|
rightButtonText: S.of(context).reset,
|
||||||
rightButtonText: S.of(context).cancel,
|
leftButtonText: S.of(context).cancel,
|
||||||
actionLeftButton: () async {
|
actionRightButton: () async {
|
||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
await nodeListViewModel.reset();
|
await nodeListViewModel.reset();
|
||||||
},
|
},
|
||||||
actionRightButton: () => Navigator.of(context).pop());
|
actionLeftButton: () => Navigator.of(context).pop());
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
|
@ -90,11 +90,11 @@ class NodeListPage extends BasePage {
|
||||||
return AlertWithTwoActions(
|
return AlertWithTwoActions(
|
||||||
alertTitle: S.of(context).remove_node,
|
alertTitle: S.of(context).remove_node,
|
||||||
alertContent: S.of(context).remove_node_message,
|
alertContent: S.of(context).remove_node_message,
|
||||||
leftButtonText: S.of(context).remove,
|
rightButtonText: S.of(context).remove,
|
||||||
rightButtonText: S.of(context).cancel,
|
leftButtonText: S.of(context).cancel,
|
||||||
actionLeftButton: () =>
|
|
||||||
Navigator.pop(context, true),
|
|
||||||
actionRightButton: () =>
|
actionRightButton: () =>
|
||||||
|
Navigator.pop(context, true),
|
||||||
|
actionLeftButton: () =>
|
||||||
Navigator.pop(context, false));
|
Navigator.pop(context, false));
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -387,14 +387,14 @@ class BaseSendWidget extends StatelessWidget {
|
||||||
return AlertWithTwoActions(
|
return AlertWithTwoActions(
|
||||||
alertTitle: S.of(context).template,
|
alertTitle: S.of(context).template,
|
||||||
alertContent: S.of(context).confirm_delete_template,
|
alertContent: S.of(context).confirm_delete_template,
|
||||||
leftButtonText: S.of(context).delete,
|
rightButtonText: S.of(context).delete,
|
||||||
rightButtonText: S.of(context).cancel,
|
leftButtonText: S.of(context).cancel,
|
||||||
actionLeftButton: () {
|
actionRightButton: () {
|
||||||
Navigator.of(dialogContext).pop();
|
Navigator.of(dialogContext).pop();
|
||||||
sendViewModel.sendTemplateStore.remove(template: template);
|
sendViewModel.sendTemplateStore.remove(template: template);
|
||||||
sendViewModel.sendTemplateStore.update();
|
sendViewModel.sendTemplateStore.update();
|
||||||
},
|
},
|
||||||
actionRightButton: () => Navigator.of(dialogContext).pop()
|
actionLeftButton: () => Navigator.of(dialogContext).pop()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
@ -43,15 +43,15 @@ class ChangeLanguage extends BasePage {
|
||||||
return AlertWithTwoActions(
|
return AlertWithTwoActions(
|
||||||
alertTitle: S.of(context).change_language,
|
alertTitle: S.of(context).change_language,
|
||||||
alertContent: S.of(context).change_language_to(item),
|
alertContent: S.of(context).change_language_to(item),
|
||||||
leftButtonText: S.of(context).change,
|
rightButtonText: S.of(context).change,
|
||||||
rightButtonText: S.of(context).cancel,
|
leftButtonText: S.of(context).cancel,
|
||||||
actionLeftButton: () {
|
actionRightButton: () {
|
||||||
settingsStore.saveLanguageCode(
|
settingsStore.saveLanguageCode(
|
||||||
languageCode: code);
|
languageCode: code);
|
||||||
currentLanguage.setCurrentLanguage(code);
|
currentLanguage.setCurrentLanguage(code);
|
||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
},
|
},
|
||||||
actionRightButton: () => Navigator.of(context).pop()
|
actionLeftButton: () => Navigator.of(context).pop()
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,7 +47,7 @@ class BaseAlertDialog extends StatelessWidget {
|
||||||
child: Container(
|
child: Container(
|
||||||
height: 52,
|
height: 52,
|
||||||
padding: EdgeInsets.only(left: 6, right: 6),
|
padding: EdgeInsets.only(left: 6, right: 6),
|
||||||
color: Palette.blueCraiola,
|
color: Palette.alizarinRed,
|
||||||
child: ButtonTheme(
|
child: ButtonTheme(
|
||||||
minWidth: double.infinity,
|
minWidth: double.infinity,
|
||||||
child: FlatButton(
|
child: FlatButton(
|
||||||
|
@ -72,7 +72,7 @@ class BaseAlertDialog extends StatelessWidget {
|
||||||
child: Container(
|
child: Container(
|
||||||
height: 52,
|
height: 52,
|
||||||
padding: EdgeInsets.only(left: 6, right: 6),
|
padding: EdgeInsets.only(left: 6, right: 6),
|
||||||
color: Palette.alizarinRed,
|
color: Palette.blueCraiola,
|
||||||
child: ButtonTheme(
|
child: ButtonTheme(
|
||||||
minWidth: double.infinity,
|
minWidth: double.infinity,
|
||||||
child: FlatButton(
|
child: FlatButton(
|
||||||
|
@ -92,7 +92,7 @@ class BaseAlertDialog extends StatelessWidget {
|
||||||
)),
|
)),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
)
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -168,16 +168,6 @@ class Themes {
|
||||||
decorationColor: Palette.darkGray // switch (PIN code)
|
decorationColor: Palette.darkGray // switch (PIN code)
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
cardColor: Palette.blueAlice,
|
|
||||||
cardTheme: CardTheme(
|
|
||||||
color: Colors.white, // synced card start
|
|
||||||
),
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
@ -346,17 +336,5 @@ class Themes {
|
||||||
decorationColor: PaletteDark.lightPurpleBlue // switch (PIN code)
|
decorationColor: PaletteDark.lightPurpleBlue // switch (PIN code)
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
cardColor: PaletteDark.darkNightBlue,
|
|
||||||
cardTheme: CardTheme(
|
|
||||||
color: PaletteDark.moderateBlue, // synced card start
|
|
||||||
),
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in a new issue