修改样式

This commit is contained in:
czz
2025-08-15 17:42:34 +08:00
parent 4c2728eb2e
commit 8731f7c335
10 changed files with 36 additions and 22 deletions

View File

@@ -270,7 +270,7 @@
"设备分享": "Device sharing",
"请输入对方手机号或邮箱": "Please enter recipient's phone/email",
"微信好友一键分享": "Share via WeChat",
"发送邀请": "Send invitation",
"发送邀请": "Send",
"要分享的设备": "Device to share",
"主设备": "Primary device:",
"从设备": "Secondary device:",
@@ -281,9 +281,9 @@
"体征消息": "Vital messages",
"系统消息": "System messages",
"无需处理": "No action needed",
"待处理": "Pending",
"已处理": "Processed",
"已超时": "Timeout",
"待处理": "Todo",
"已处理": "Done",
"已超时": "Overdue",
"是否确认接受该设备": "Confirm accepting this device?",
"信号强度": "Signal strength:",
"设备升级": "Device upgrade",
@@ -377,7 +377,7 @@
"睡眠时长": "Sleep duration",
"起床时间": "Wake time",
"小时": "h",
"分钟": "minutes",
"分钟": "m",
"消息提醒设置": "Message notification settings",
"APP消息": "APP messages",
"APP消息介绍": "Open 'Taihe eCare' APP to view device messages",
@@ -506,5 +506,6 @@
"选择生日": "Select Birthday",
"sleep_duration": "Sleep Duration",
"deep_sleep": "Deep Sleep",
"light_sleep": "Light Sleep"
"light_sleep": "Light Sleep", "女": "Female",
"男": "Male"
}

View File

@@ -519,5 +519,6 @@
"选择生日": "选择生日",
"sleep_duration": "睡眠时长",
"deep_sleep": "深睡",
"light_sleep": "浅睡"
"light_sleep": "浅睡", "女": "女",
"男": "男"
}

View File

@@ -503,5 +503,7 @@
"选择生日": "選擇生日",
"sleep_duration": "睡眠時長",
"deep_sleep": "深睡",
"light_sleep": "淺睡"
"light_sleep": "淺睡",
"女": "女",
"男": "男"
}

View File

@@ -137,10 +137,10 @@ class UserInfoController extends GetControllerEx<UserInfoModel> {
apiResponse.msg = "昵称为空".tr;
return apiResponse;
}
if (user.tmpNickName!.length >= 9) {
apiResponse.msg = "最长字符为8个字".tr;
return apiResponse;
}
// if (user.tmpNickName!.length >= 9) {
// apiResponse.msg = "最长字符为8个字".tr;
// return apiResponse;
// }
String serviceAddress = ServiceConstant.service_address;
String serviceName = ServiceConstant.server_service;
String serviceApi = ServiceConstant.user_info;

View File

@@ -165,11 +165,14 @@ class _MinePageState extends State<MinePage> {
CrossAxisAlignment.start,
children: [
Text(
limitText(
login == 1
? (userInfoController.model
.user!.nick_name ??
'未命名'.tr)
: "未命名".tr,
? userInfoController
.model.user?.nick_name
: '未命名'.tr,
AppConstants()
.text_length, // 这里设置最大长度,按你需求改,比如 6~10 字符
),
style: TextStyle(
fontFamily: 'Inter',
color: themeController
@@ -678,3 +681,10 @@ class _MinePageState extends State<MinePage> {
);
}
}
String limitText(String? text, int maxLength) {
if (text == null || text.isEmpty) return '';
if (text.characters.length <= maxLength) return text;
return text.characters.take(maxLength).toString() + '...';
}

View File

@@ -212,7 +212,6 @@ class _RepairModelReadOnlyWidgetState extends State<RepairModelReadOnlyWidget> {
isDense: true,
labelStyle: TextStyle(
letterSpacing: 0.0,
),
hintText: "设备参数提示".tr,
hintStyle: TextStyle(
@@ -293,7 +292,6 @@ class _RepairModelReadOnlyWidgetState extends State<RepairModelReadOnlyWidget> {
isDense: true,
labelStyle: TextStyle(
letterSpacing: 0.0,
),
hintText: '问题描述'.tr,
hintStyle: TextStyle(
@@ -345,6 +343,7 @@ class _RepairModelReadOnlyWidgetState extends State<RepairModelReadOnlyWidget> {
borderRadius: 20.rpx,
padding: EdgeInsets.zero,
onTap: () async {
return;
ApiResponse apiResponse = await repairController.uploadImg();
print(apiResponse);
if (apiResponse.code == HttpStatusCodes.ok) {

View File

@@ -287,6 +287,7 @@ class _RepairModelWidgetState extends State<RepairModelWidget> {
// controller: TextEditingController(),
autofocus: false,
obscureText: false,
maxLength: 60,
decoration: InputDecoration(
isDense: true,
labelStyle: TextStyle(

View File

@@ -262,7 +262,7 @@ class _CommonMessageSettingPageState extends State<CommonMessageSettingPage> {
),
Padding(
padding: EdgeInsetsDirectional.fromSTEB(
30.rpx, 21.rpx, 30.rpx, 0),
0.rpx, 21.rpx, 0.rpx, 0),
child: Container(
decoration: BoxDecoration(
color: themeController.currentColor.sc5,

View File

@@ -104,7 +104,7 @@ Widget WeekDataWidget(
displayMode: ChartDisplayMode.bar,
barColors:
buildWeekDatesAndPoints(sleepReport['scoreList'])['colors'],
tips: buildValueTexts(sleepReport['scoreList']['data'], '', 1),
tips: buildValueTexts(sleepReport['scoreList']['data'], ''.tr, 1),
xUnit: sleepReport['scoreList']['yUnit'],
barWidth: 0.2,
),

View File

@@ -291,7 +291,7 @@ class _UpdateUserPageState extends State<UpdateUserPage> {
),
style: TextStyle(
fontFamily: 'Inter',
fontSize: 26.rpx,
fontSize: 30.rpx,
letterSpacing: 0.0,
color: themeController
.currentColor.sc3,