修改样式

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

View File

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

View File

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

View File

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

View File

@@ -165,11 +165,14 @@ class _MinePageState extends State<MinePage> {
CrossAxisAlignment.start, CrossAxisAlignment.start,
children: [ children: [
Text( Text(
login == 1 limitText(
? (userInfoController.model login == 1
.user!.nick_name ?? ? userInfoController
'未命名'.tr) .model.user?.nick_name
: "未命名".tr, : '未命名'.tr,
AppConstants()
.text_length, // 这里设置最大长度,按你需求改,比如 6~10 字符
),
style: TextStyle( style: TextStyle(
fontFamily: 'Inter', fontFamily: 'Inter',
color: themeController 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, isDense: true,
labelStyle: TextStyle( labelStyle: TextStyle(
letterSpacing: 0.0, letterSpacing: 0.0,
), ),
hintText: "设备参数提示".tr, hintText: "设备参数提示".tr,
hintStyle: TextStyle( hintStyle: TextStyle(
@@ -293,7 +292,6 @@ class _RepairModelReadOnlyWidgetState extends State<RepairModelReadOnlyWidget> {
isDense: true, isDense: true,
labelStyle: TextStyle( labelStyle: TextStyle(
letterSpacing: 0.0, letterSpacing: 0.0,
), ),
hintText: '问题描述'.tr, hintText: '问题描述'.tr,
hintStyle: TextStyle( hintStyle: TextStyle(
@@ -345,6 +343,7 @@ class _RepairModelReadOnlyWidgetState extends State<RepairModelReadOnlyWidget> {
borderRadius: 20.rpx, borderRadius: 20.rpx,
padding: EdgeInsets.zero, padding: EdgeInsets.zero,
onTap: () async { onTap: () async {
return;
ApiResponse apiResponse = await repairController.uploadImg(); ApiResponse apiResponse = await repairController.uploadImg();
print(apiResponse); print(apiResponse);
if (apiResponse.code == HttpStatusCodes.ok) { if (apiResponse.code == HttpStatusCodes.ok) {

View File

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

View File

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

View File

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

View File

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