add ColorPicker translations

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2023-08-23 08:15:56 +08:00
parent 6666dece5d
commit d87ea854bc
36 changed files with 78 additions and 2 deletions

View File

@@ -579,6 +579,13 @@ class AddressBookTag extends StatelessWidget {
ColorPickerType.accent: false,
ColorPickerType.wheel: true,
},
pickerTypeLabels: {
ColorPickerType.primary: translate("Primary Color"),
ColorPickerType.wheel: translate("HSV Color"),
},
actionButtons: ColorPickerActionButtons(
dialogOkButtonLabel: translate("OK"),
dialogCancelButtonLabel: translate("Cancel")),
showColorCode: true,
);
if (oldColor != newColor) {

View File

@@ -735,11 +735,12 @@ abstract class BasePeerCard extends StatelessWidget {
proc: () async {
bool result = gFFI.abModel.changePassword(id, '');
await bind.mainForgetPassword(id: id);
bool toast = false;
if (result) {
bool toast = tab == PeerTabIndex.ab;
toast = tab == PeerTabIndex.ab;
gFFI.abModel.pushAb(toastIfFail: toast, toastIfSucc: toast);
}
showToast(translate('Successful'));
if (!toast) showToast(translate('Successful'));
},
padding: menuPadding,
dismissOnClicked: true,