Modal Menu UI Fixes #467
|
@ -87,7 +87,7 @@ class _AddEditProfileViewState extends State<AddEditProfileView> {
|
|||
child: Container(
|
||||
margin: EdgeInsets.all(30),
|
||||
padding: EdgeInsets.all(20),
|
||||
child: Column(mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.stretch, children: [
|
||||
child: Column(mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.center, children: [
|
||||
Visibility(
|
||||
visible: Provider.of<ProfileInfoState>(context).onion.isNotEmpty,
|
||||
child: Row(mainAxisAlignment: MainAxisAlignment.center, children: <Widget>[
|
||||
|
@ -127,6 +127,9 @@ class _AddEditProfileViewState extends State<AddEditProfileView> {
|
|||
badgeEdit: Provider.of<Settings>(context).isExperimentEnabled(ImagePreviewsExperiment))))
|
||||
])),
|
||||
Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
||||
SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
CwtchLabel(label: AppLocalizations.of(context)!.displayNameLabel),
|
||||
SizedBox(
|
||||
height: 20,
|
||||
|
@ -273,29 +276,31 @@ class _AddEditProfileViewState extends State<AddEditProfileView> {
|
|||
SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Expanded(
|
||||
child: ElevatedButton(
|
||||
ElevatedButton(
|
||||
onPressed: _createPressed,
|
||||
style: ElevatedButton.styleFrom(
|
||||
minimumSize: Size(400, 50),
|
||||
maximumSize: Size(800, 50),
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.horizontal(left: Radius.circular(180), right: Radius.circular(180))),
|
||||
),
|
||||
child: Text(
|
||||
Provider.of<ProfileInfoState>(context).onion.isEmpty ? AppLocalizations.of(context)!.addNewProfileBtn : AppLocalizations.of(context)!.saveProfileBtn,
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
Visibility(
|
||||
visible: Provider.of<ProfileInfoState>(context, listen: false).onion.isNotEmpty,
|
||||
child: Column(mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.end, children: [
|
||||
SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
Tooltip(
|
||||
Visibility(
|
||||
visible: Provider.of<ProfileInfoState>(context, listen: false).onion.isNotEmpty,
|
||||
child: Tooltip(
|
||||
message: AppLocalizations.of(context)!.exportProfileTooltip,
|
||||
child: ElevatedButton.icon(
|
||||
style: ElevatedButton.styleFrom(
|
||||
minimumSize: Size(400, 50),
|
||||
maximumSize: Size(800, 50),
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.horizontal(left: Radius.circular(180), right: Radius.circular(180))),
|
||||
),
|
||||
onPressed: () {
|
||||
if (Platform.isAndroid) {
|
||||
Provider.of<FlwtchState>(context, listen: false).cwtch.ExportProfile(ctrlrOnion.value.text, ctrlrOnion.value.text + ".tar.gz");
|
||||
|
@ -313,24 +318,29 @@ class _AddEditProfileViewState extends State<AddEditProfileView> {
|
|||
},
|
||||
icon: Icon(Icons.import_export),
|
||||
label: Text(AppLocalizations.of(context)!.exportProfile),
|
||||
))
|
||||
])),
|
||||
Visibility(
|
||||
visible: Provider.of<ProfileInfoState>(context, listen: false).onion.isNotEmpty,
|
||||
child: Column(mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.end, children: [
|
||||
))),
|
||||
SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
Tooltip(
|
||||
Visibility(
|
||||
visible: Provider.of<ProfileInfoState>(context, listen: false).onion.isNotEmpty,
|
||||
child: Tooltip(
|
||||
message: AppLocalizations.of(context)!.enterCurrentPasswordForDelete,
|
||||
child: ElevatedButton.icon(
|
||||
style: ElevatedButton.styleFrom(
|
||||
minimumSize: Size(400, 50),
|
||||
maximumSize: Size(800, 50),
|
||||
shape: RoundedRectangleBorder(
|
||||
side: BorderSide(color: Provider.of<Settings>(context).theme.defaultButtonActiveColor, width: 2.0),
|
||||
borderRadius: BorderRadius.horizontal(left: Radius.circular(180), right: Radius.circular(180))),
|
||||
primary: Provider.of<Settings>(context).theme.backgroundMainColor,
|
||||
),
|
||||
onPressed: () {
|
||||
showAlertDialog(context);
|
||||
},
|
||||
icon: Icon(Icons.delete_forever),
|
||||
label: Text(AppLocalizations.of(context)!.deleteBtn),
|
||||
))
|
||||
]))
|
||||
)))
|
||||
]))))));
|
||||
});
|
||||
});
|
||||
|
|
|
@ -254,34 +254,52 @@ class _ContactsViewState extends State<ContactsView> {
|
|||
height: 200, // bespoke value courtesy of the [TextField] docs
|
||||
child: Center(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.all(10.0),
|
||||
padding: EdgeInsets.all(2.0),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: <Widget>[
|
||||
Row(mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [
|
||||
Spacer(),
|
||||
SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
Expanded(
|
||||
child: Tooltip(
|
||||
message: AppLocalizations.of(context)!.tooltipAddContact,
|
||||
child: ElevatedButton(
|
||||
child: Text(AppLocalizations.of(context)!.addContact, semanticsLabel: AppLocalizations.of(context)!.addContact),
|
||||
style: ElevatedButton.styleFrom(
|
||||
minimumSize: Size.fromWidth(double.infinity),
|
||||
maximumSize: Size.fromWidth(400),
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.horizontal(left: Radius.circular(180), right: Radius.circular(180))),
|
||||
),
|
||||
child: Text(
|
||||
AppLocalizations.of(context)!.addContact,
|
||||
semanticsLabel: AppLocalizations.of(context)!.addContact,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(fontWeight: FontWeight.bold),
|
||||
),
|
||||
onPressed: () {
|
||||
_pushAddContact(false);
|
||||
},
|
||||
))),
|
||||
Spacer()
|
||||
]),
|
||||
SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
Row(mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [
|
||||
Spacer(),
|
||||
Expanded(
|
||||
child: Tooltip(
|
||||
message: groupsEnabled ? AppLocalizations.of(context)!.addServerTooltip : AppLocalizations.of(context)!.thisFeatureRequiresGroupExpermientsToBeEnabled,
|
||||
child: ElevatedButton(
|
||||
child: Text(AppLocalizations.of(context)!.addServerTitle, semanticsLabel: AppLocalizations.of(context)!.addServerTitle),
|
||||
style: ElevatedButton.styleFrom(
|
||||
minimumSize: Size.fromWidth(double.infinity),
|
||||
maximumSize: Size.fromWidth(400),
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.horizontal(left: Radius.circular(180), right: Radius.circular(180))),
|
||||
),
|
||||
child: Text(
|
||||
AppLocalizations.of(context)!.addServerTitle,
|
||||
semanticsLabel: AppLocalizations.of(context)!.addServerTitle,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(fontWeight: FontWeight.bold),
|
||||
),
|
||||
onPressed: groupsEnabled
|
||||
? () {
|
||||
_pushAddContact(false);
|
||||
|
@ -289,26 +307,33 @@ class _ContactsViewState extends State<ContactsView> {
|
|||
: null,
|
||||
)),
|
||||
),
|
||||
Spacer()
|
||||
]),
|
||||
SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
Row(mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [
|
||||
Spacer(),
|
||||
Expanded(
|
||||
child: Tooltip(
|
||||
message: groupsEnabled ? AppLocalizations.of(context)!.createGroupTitle : AppLocalizations.of(context)!.thisFeatureRequiresGroupExpermientsToBeEnabled,
|
||||
child: ElevatedButton(
|
||||
child: Text(AppLocalizations.of(context)!.createGroupTitle, semanticsLabel: AppLocalizations.of(context)!.createGroupTitle),
|
||||
style: ElevatedButton.styleFrom(
|
||||
minimumSize: Size.fromWidth(double.infinity),
|
||||
maximumSize: Size.fromWidth(400),
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.horizontal(left: Radius.circular(180), right: Radius.circular(180))),
|
||||
),
|
||||
child: Text(
|
||||
AppLocalizations.of(context)!.createGroupTitle,
|
||||
semanticsLabel: AppLocalizations.of(context)!.createGroupTitle,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(fontWeight: FontWeight.bold),
|
||||
),
|
||||
onPressed: groupsEnabled
|
||||
? () {
|
||||
_pushAddContact(true);
|
||||
}
|
||||
: null,
|
||||
))),
|
||||
Spacer()
|
||||
]),
|
||||
SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
],
|
||||
))),
|
||||
)));
|
||||
|
|
|
@ -81,7 +81,7 @@ class _MessageViewState extends State<MessageView> {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
// After leaving a conversation the selected conversation is set to null...
|
||||
if (Provider.of<ContactInfoState>(context).profileOnion == "") {
|
||||
if (Provider.of<ContactInfoState>(context, listen: false).profileOnion == "") {
|
||||
return Card(child: Center(child: Text(AppLocalizations.of(context)!.addContactFirst)));
|
||||
}
|
||||
|
||||
|
|
|
@ -194,29 +194,45 @@ class _ProfileMgrViewState extends State<ProfileMgrView> {
|
|||
padding: EdgeInsets.all(10.0),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: <Widget>[
|
||||
Row(mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [
|
||||
Spacer(),
|
||||
SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
Expanded(
|
||||
child: ElevatedButton(
|
||||
child: Text(AppLocalizations.of(context)!.addProfileTitle, semanticsLabel: AppLocalizations.of(context)!.addProfileTitle),
|
||||
style: ElevatedButton.styleFrom(
|
||||
minimumSize: Size(double.infinity, 20),
|
||||
maximumSize: Size(400, 20),
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.horizontal(left: Radius.circular(180), right: Radius.circular(180))),
|
||||
),
|
||||
child: Text(
|
||||
AppLocalizations.of(context)!.addProfileTitle,
|
||||
semanticsLabel: AppLocalizations.of(context)!.addProfileTitle,
|
||||
style: TextStyle(fontWeight: FontWeight.bold),
|
||||
),
|
||||
onPressed: () {
|
||||
_pushAddProfile(context);
|
||||
},
|
||||
)),
|
||||
Spacer()
|
||||
]),
|
||||
SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
Row(mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [
|
||||
Spacer(),
|
||||
Expanded(
|
||||
child: Tooltip(
|
||||
message: AppLocalizations.of(context)!.importProfileTooltip,
|
||||
child: ElevatedButton(
|
||||
child: Text(AppLocalizations.of(context)!.importProfile, semanticsLabel: AppLocalizations.of(context)!.importProfile),
|
||||
style: ElevatedButton.styleFrom(
|
||||
minimumSize: Size(double.infinity, 20),
|
||||
maximumSize: Size(400, 20),
|
||||
shape: RoundedRectangleBorder(
|
||||
side: BorderSide(color: Provider.of<Settings>(context).theme.defaultButtonActiveColor, width: 2.0),
|
||||
borderRadius: BorderRadius.horizontal(left: Radius.circular(180), right: Radius.circular(180))),
|
||||
primary: Provider.of<Settings>(context).theme.backgroundMainColor,
|
||||
),
|
||||
child:
|
||||
Text(AppLocalizations.of(context)!.importProfile, semanticsLabel: AppLocalizations.of(context)!.importProfile, style: TextStyle(fontWeight: FontWeight.bold)),
|
||||
onPressed: () {
|
||||
// 10GB profiles should be enough for anyone?
|
||||
showFilePicker(context, MaxGeneralFileSharingSize, (file) {
|
||||
|
@ -235,8 +251,9 @@ class _ProfileMgrViewState extends State<ProfileMgrView> {
|
|||
}, () {}, () {});
|
||||
},
|
||||
))),
|
||||
Spacer()
|
||||
]),
|
||||
SizedBox(
|
||||
height: 20,
|
||||
),
|
||||
],
|
||||
))),
|
||||
)));
|
||||
|
|
Loading…
Reference in New Issue