更新法语语言包

This commit is contained in:
wyf
2026-01-31 14:43:47 +08:00
parent 2aedbb3d74
commit 97ffc1220d
48 changed files with 1608 additions and 1837 deletions

View File

@@ -166,7 +166,7 @@ class _DeviceComponentWidgetState extends State<DeviceComponentWidget> {
),
),
Text(
"${device['bind'] == true ? "已被绑定" : "可绑定"}",
"${device['bind'] == true ? "已被绑定".tr : "可绑定".tr}",
style: TextStyle(
fontSize: 26.rpx,
color: device['bind'] == true

View File

@@ -82,7 +82,6 @@ class MHTBlueToothController extends GetControllerEx<MHTBlueToothModel> {
RxBool allSelect = false.obs; //升级是否全选
RxBool autoUpgrade = false.obs; //是否自动升级
void startStatusPolling() {
updateDeviceStatus().then((res) {
if (res.code == HttpStatusCodes.ok) {
@@ -419,6 +418,28 @@ class MHTBlueToothController extends GetControllerEx<MHTBlueToothModel> {
return result; // 在 requestWithLog 完成之后返回 result
}
sendCommand(Map commandData) async {
//todo 下发wifi指令
if (commandData == null || commandData.isEmpty) {
throw "指令数据不能为空";
}
//todo 填充蓝牙指令
String serviceAddress = ServiceConstant.service_address;
String serviceName = ServiceConstant.server_service;
String serviceApi = ServiceConstant.sendWifiCommand;
String queryUrl = "${serviceAddress}${serviceName}${serviceApi}";
await requestWithLog(
logTitle: "下发wifi控制指令",
method: MyHttpMethod.post,
queryUrl: queryUrl,
onSuccess: (res) {
},
onFailure: (res) {
throw "下发wifi控制指令失败: ${res.msg}";
},
);
}
//todo 解绑的时候删除自己所拥有的所有设备的睡眠习惯
}

View File

@@ -16,6 +16,7 @@ import 'package:vbvs_app/controller/main_bottom/global_controller.dart';
import 'package:vbvs_app/controller/person/person_controller.dart';
import 'package:vbvs_app/controller/theme_controller/ThemeController.dart';
import 'package:vbvs_app/controller/user_info_controller.dart';
import 'package:vbvs_app/pages/mh_page/device/controller/mht_bluetooth_controller.dart';
import 'package:vbvs_app/pages/mh_page/device/model/BlueToothDataModel.dart';
import 'package:vbvs_app/pages/mh_page/homepage/controller/mht_home_controller.dart';
@@ -245,9 +246,9 @@ class _MHTBindDeviceSuccessState extends State<MHTBindDeviceSuccess> {
Map editeData;
BlueToothDataModel data =
blueteethBindController.shareDevice;
editeData = {"mac".tr: data.mac};
Get.toNamed("/deviceSharePage", arguments: editeData);
},
colors: AppConstants().mhtButtongradientColors,
gradientDirection: GradientDirection.vertical,
@@ -367,7 +368,6 @@ class _MHTBindDeviceSuccessState extends State<MHTBindDeviceSuccess> {
),
),
),
),
],
),

View File

@@ -502,13 +502,19 @@ class _MHTBlueteethDevicePageState extends State<MHTBlueteethDevicePage> {
child: Row(
mainAxisSize: MainAxisSize.max,
children: [
Text(
'最小信号强度'.tr,
style: TextStyle(
fontFamily: 'Inter',
color: stringToColor("#FFFFFF"),
fontSize: 26.rpx,
letterSpacing: 0.0,
Container(
constraints: BoxConstraints(
maxWidth: boxConstraints.maxWidth * 0.3),
child: Text(
'最小信号强度'.tr,
style: TextStyle(
fontFamily: 'Inter',
color: stringToColor("#FFFFFF"),
fontSize: 26.rpx,
letterSpacing: 0.0,
),
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
),
Expanded(

View File

@@ -895,37 +895,56 @@ class _MHTPeopleInfoPageState extends State<MHTPeopleInfoPage> {
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Text(
'请选择城市'.tr,
style: TextStyle(
fontFamily: 'Readex Pro',
color: Color(0xFF9EA4B7),
fontSize: 30.rpx,
letterSpacing: 0,
Expanded(
flex: 1, // 左侧占1份权重约33%
child: Text(
'请选择城市'.tr,
style: TextStyle(
fontFamily: 'Readex Pro',
color: Color(0xFF9EA4B7),
fontSize: 30.rpx,
letterSpacing: 0,
),
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
),
Row(
children: [
Text(
cityModels[index].id != null
? MyUtils
.getDetailedCityDisplayText(
cityModels[index])
: "请选择城市".tr,
style: TextStyle(
color:
cityModels[index].id != null
? Colors.white
: themeController
.currentColor.sc4,
fontSize: 30.rpx,
Expanded(
flex: 2, // 右侧占2份权重约67%
child: Row(
mainAxisAlignment: MainAxisAlignment
.end, // 右侧内容右对齐
children: [
Flexible(
child: Text(
cityModels[index].id != null
? MyUtils
.getDetailedCityDisplayText(
cityModels[index])
: "请选择城市".tr,
style: TextStyle(
color:
cityModels[index].id !=
null
? Colors.white
: themeController
.currentColor
.sc4,
fontSize: 30.rpx,
),
maxLines: 1,
overflow:
TextOverflow.ellipsis,
textAlign:
TextAlign.right, // 文本右对齐
),
),
),
SizedBox(width: 16.rpx),
Icon(Icons.expand_more,
color: Colors.white,
size: 48.rpx),
],
SizedBox(width: 16.rpx),
Icon(Icons.expand_more,
color: Colors.white,
size: 48.rpx),
],
),
),
],
),
@@ -973,52 +992,69 @@ class _MHTPeopleInfoPageState extends State<MHTPeopleInfoPage> {
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Text(
'请选择时区'.tr,
style: TextStyle(
fontFamily: 'Readex Pro',
color: Color(0xFF9EA4B7),
fontSize: 30.rpx,
letterSpacing: 0,
Expanded(
flex: 1, // 左侧占1份权重约33%
child: Text(
'请选择时区'.tr,
style: TextStyle(
fontFamily: 'Readex Pro',
color: Color(0xFF9EA4B7),
fontSize: 30.rpx,
letterSpacing: 0,
),
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
),
Obx(() {
PeopleInfoController
personController = Get.find();
var aa =
personController.timeZone.value;
return Row(
children: [
Text(
peopleList[index]['UTC'] ==
null ||
peopleList[index]
['UTC'] ==
""
? "请选择时区".tr
: peopleList[index]['UTC'],
style: TextStyle(
color: peopleList[index]
['UTC'] !=
null
? Colors
.white // 有时区时使用白色,保持和参考代码一致
: themeController
.currentColor.sc4,
fontSize: 30
.rpx, // 使用固定的30.rpx而不是AppConstants().title_text_fontSize
),
),
SizedBox(width: 16.rpx),
Icon(
Icons.expand_more,
color: Colors
.white, // 保持白色,和参考代码一致
size: 48.rpx,
),
],
);
})
Expanded(
flex: 2, // 右侧占2份权重约67%
child: Obx(() {
PeopleInfoController
personController = Get.find();
var aa = personController
.timeZone.value;
return Row(
mainAxisAlignment:
MainAxisAlignment
.end, // 右侧内容右对齐
children: [
Flexible(
child: Text(
peopleList[index]
['UTC'] ==
null ||
peopleList[index]
['UTC'] ==
""
? "请选择时区".tr
: peopleList[index]
['UTC'],
style: TextStyle(
color: peopleList[index]
['UTC'] !=
null
? Colors.white
: themeController
.currentColor
.sc4,
fontSize: 30.rpx,
),
maxLines: 1,
overflow:
TextOverflow.ellipsis,
textAlign: TextAlign
.right, // 文本右对齐
),
),
SizedBox(width: 16.rpx),
Icon(
Icons.expand_more,
color: Colors.white,
size: 48.rpx,
),
],
);
})),
],
),
),
@@ -1063,38 +1099,92 @@ class _MHTPeopleInfoPageState extends State<MHTPeopleInfoPage> {
);
});
},
// child: Row(
// mainAxisAlignment:
// MainAxisAlignment.spaceBetween,
// children: [
// Text(
// '慢病管理'.tr,
// style: TextStyle(
// fontFamily: 'Readex Pro',
// color: Color(0xFF9EA4B7),
// fontSize: 30.rpx,
// letterSpacing: 0,
// ),
// maxLines: 1,
// overflow: TextOverflow.ellipsis,
// ),
// Row(
// children: [
// Text(
// getSelectedDiseaseNames(
// diseaseIdsList[index]),
// style: TextStyle(
// color: diseaseIdsList[index]
// .isNotEmpty
// ? Colors.white
// : themeController
// .currentColor.sc4,
// fontSize: 30.rpx,
// ),
// maxLines: 1,
// overflow: TextOverflow.ellipsis,
// ),
// SizedBox(width: 16.rpx),
// Icon(Icons.expand_more,
// color: Colors.white,
// size: 48.rpx),
// ],
// ),
// ],
// ),
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Text(
'慢病管理'.tr,
style: TextStyle(
fontFamily: 'Readex Pro',
color: Color(0xFF9EA4B7),
fontSize: 30.rpx,
letterSpacing: 0,
Expanded(
flex: 1, // 设置左侧最大宽度权重
child: Text(
'慢病管理'.tr,
style: TextStyle(
fontFamily: 'Readex Pro',
color: Color(0xFF9EA4B7),
fontSize: 30.rpx,
letterSpacing: 0,
),
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
),
Row(
children: [
Text(
getSelectedDiseaseNames(
diseaseIdsList[index]),
style: TextStyle(
color: diseaseIdsList[index]
.isNotEmpty
? Colors.white
: themeController
.currentColor.sc4,
fontSize: 30.rpx,
Expanded(
flex: 2, // 右侧内容占更多空间
child: Row(
mainAxisAlignment:
MainAxisAlignment.end,
children: [
Flexible(
child: Text(
getSelectedDiseaseNames(
diseaseIdsList[index]),
style: TextStyle(
color: diseaseIdsList[index]
.isNotEmpty
? Colors.white
: themeController
.currentColor.sc4,
fontSize: 30.rpx,
),
maxLines: 1,
overflow:
TextOverflow.ellipsis,
),
),
),
SizedBox(width: 16.rpx),
Icon(Icons.expand_more,
color: Colors.white,
size: 48.rpx),
],
SizedBox(width: 16.rpx),
Icon(Icons.expand_more,
color: Colors.white,
size: 48.rpx),
],
),
),
],
),

View File

@@ -57,6 +57,7 @@ class _MHTWifiPageState extends State<MHTWifiPage> {
WidgetsBinding.instance.addPostFrameCallback((_) async {
// _initController();
blueteethBindController.shareDevice = widget.deviceInfo;
await dealWifi(widget.deviceInfo.macA);
print("object");
});