语言样式

This commit is contained in:
czz
2025-08-16 16:32:15 +08:00
parent b507148465
commit 7d3e4ad1e8
6 changed files with 77 additions and 23 deletions

View File

@@ -124,7 +124,7 @@
}, },
"日期": { "日期": {
"取消": "Cancel", "取消": "Cancel",
"确定": "Confirm", "确定": "OK",
"年": "Year", "年": "Year",
"月": "Month", "月": "Month",
"日": "Day" "日": "Day"
@@ -486,8 +486,8 @@
"与上月对比": "VS Last Month", "与上月对比": "VS Last Month",
"每日得分": "Day Score", "每日得分": "Day Score",
"本周睡眠时长": "Weekly Sleep", "本周睡眠时长": "Weekly Sleep",
"用户本周睡眠分数的汇总": "Weekly Sleep Score Summary", "用户本周睡眠分数的汇总": "Weekly Sleep Score Summary.",
"用户本月睡眠分数的汇总": "Monthly Sleep Score Summary", "用户本月睡眠分数的汇总": "Monthly Sleep Score Summary.",
"与上周对比": "VS Last Week", "与上周对比": "VS Last Week",
"本月平均分": "Monthly Avg", "本月平均分": "Monthly Avg",
"选择月份": "Select Month", "选择月份": "Select Month",
@@ -497,7 +497,7 @@
"次/分": "times/min", "次/分": "times/min",
"毫秒": "ms", "毫秒": "ms",
"起床时间:": "Wake Up:", "起床时间:": "Wake Up:",
"入睡时间:": "Sleep Time", "入睡时间:": "Sleep Time:",
"睡眠分数与上月分数进行对比,是通过量化分析近期睡眠质量变化,可了解自身睡眠状态的波动情况,进而调整用户的作息习惯。": "The sleep score is compared with last months score to analyze recent changes in sleep quality, helping you understand fluctuations and adjust your routine accordingly.", "睡眠分数与上月分数进行对比,是通过量化分析近期睡眠质量变化,可了解自身睡眠状态的波动情况,进而调整用户的作息习惯。": "The sleep score is compared with last months score to analyze recent changes in sleep quality, helping you understand fluctuations and adjust your routine accordingly.",
"睡眠分数与上周分数进行对比,是通过量化分析近期睡眠质量变化,可了解自身睡眠状态的波动情况,进而调整用户的作息习惯。": "The sleep score is compared with last week's score to analyze changes in sleep quality, helping you understand fluctuations and adjust your routine.", "睡眠分数与上周分数进行对比,是通过量化分析近期睡眠质量变化,可了解自身睡眠状态的波动情况,进而调整用户的作息习惯。": "The sleep score is compared with last week's score to analyze changes in sleep quality, helping you understand fluctuations and adjust your routine.",
"本月睡眠时长": "Monthly Sleep Duration", "本月睡眠时长": "Monthly Sleep Duration",
@@ -516,5 +516,12 @@
"检测到": "Detected", "检测到": "Detected",
"绑定流程未走完是否继续": "Binding process is incomplete, continue?", "绑定流程未走完是否继续": "Binding process is incomplete, continue?",
"继续": "Continue", "继续": "Continue",
"下次再说": "deal next time","请输入人员名称":"Please enter the person's name" "下次再说": "deal next time",
"请输入人员名称": "Please enter the person's name", "一": "Mon",
"二": "Tue",
"三": "Wed",
"四": "Thu",
"五": "Fri",
"六": "Sat",
"日": "Sun"
} }

View File

@@ -499,8 +499,8 @@
"与上月对比": "与上月对比", "与上月对比": "与上月对比",
"每日得分": "每日得分", "每日得分": "每日得分",
"本周睡眠时长": "本周睡眠时长", "本周睡眠时长": "本周睡眠时长",
"用户本周睡眠分数的汇总": "用户本周睡眠分数的汇总。", "用户本周睡眠分数的汇总": "用户本周睡眠分数的汇总。",
"用户本月睡眠分数的汇总": "用户本月睡眠分数的汇总。", "用户本月睡眠分数的汇总": "用户本月睡眠分数的汇总。",
"与上周对比": "与上周对比", "与上周对比": "与上周对比",
"本月平均分": "本月平均分", "本月平均分": "本月平均分",
"选择月份": "选择月份", "选择月份": "选择月份",
@@ -524,5 +524,12 @@
"否": "否", "否": "否",
"男": "男", "男": "男",
"女": "女", "女": "女",
"可用WLAN": "可用WLAN","请输入人员名称":"请输入人员名称" "可用WLAN": "可用WLAN",
"请输入人员名称": "请输入人员名称", "一": "一",
"二": "二",
"三": "三",
"四": "四",
"五": "五",
"六": "六",
"日": "日"
} }

View File

@@ -483,8 +483,8 @@
"与上月对比": "與上月對比", "与上月对比": "與上月對比",
"每日得分": "每日得分", "每日得分": "每日得分",
"本周睡眠时长": "本週睡眠時長", "本周睡眠时长": "本週睡眠時長",
"用户本周睡眠分数的汇总": "用戶本週睡眠分數的匯總。", "用户本周睡眠分数的汇总": "用戶本週睡眠分數的匯總。",
"用户本月睡眠分数的汇总": "用戶本月睡眠分數的匯總。", "用户本月睡眠分数的汇总": "用戶本月睡眠分數的匯總。",
"与上周对比": "與上週對比", "与上周对比": "與上週對比",
"本月平均分": "本月平均分", "本月平均分": "本月平均分",
"选择月份": "選擇月份", "选择月份": "選擇月份",
@@ -514,5 +514,12 @@
"继续": "繼續", "继续": "繼續",
"下次再说": "下次再說", "下次再说": "下次再說",
"请输入人员名称": "請輸入人員名稱", "请输入人员名称": "請輸入人員名稱",
"可用wifi": "可用wifi" "可用wifi": "可用wifi",
"一": "一",
"二": "二",
"三": "三",
"四": "四",
"五": "五",
"六": "六",
"日": "日"
} }

View File

@@ -507,8 +507,8 @@
"最高分": "Max", "最高分": "Max",
"每日得分": "Day Score", "每日得分": "Day Score",
"本周睡眠时长": "Weekly Sleep", "本周睡眠时长": "Weekly Sleep",
"用户本周睡眠分数的汇总": "Weekly Sleep Score Summary", "用户本周睡眠分数的汇总": "Weekly Sleep Score Summary.",
"用户本月睡眠分数的汇总": "Monthly Sleep Score Summary", "用户本月睡眠分数的汇总": "Monthly Sleep Score Summary.",
"参考范围": "Range", "参考范围": "Range",
"与上周对比": "VS Last Week", "与上周对比": "VS Last Week",
"本月平均分": "Monthly Avg", "本月平均分": "Monthly Avg",

View File

@@ -321,7 +321,7 @@ Future showMonthSelectionDialog(
final currentYear = DateTime.now().year; final currentYear = DateTime.now().year;
final currentMonth = DateTime.now().month; final currentMonth = DateTime.now().month;
final colors = _getDialogColors(AppConstants().ent_type); // 获取颜色配置
final List<int> years = List.generate(100, (i) => DateTime.now().year - i) final List<int> years = List.generate(100, (i) => DateTime.now().year - i)
..sort(); ..sort();
@@ -330,7 +330,6 @@ Future showMonthSelectionDialog(
// 初始化 yearIndex // 初始化 yearIndex
final int initYearIndex = years.indexOf(checkDate.year); final int initYearIndex = years.indexOf(checkDate.year);
final RxInt yearIndex = (initYearIndex >= 0 ? initYearIndex : 0).obs; final RxInt yearIndex = (initYearIndex >= 0 ? initYearIndex : 0).obs;
final RxInt monthIndex = 0.obs; final RxInt monthIndex = 0.obs;
bool isInit = true; bool isInit = true;
@@ -369,7 +368,7 @@ Future showMonthSelectionDialog(
child: Material( child: Material(
color: Colors.transparent, color: Colors.transparent,
child: Dialog( child: Dialog(
backgroundColor: const Color(0xFF003058), backgroundColor: colors.primaryColor,
insetPadding: EdgeInsets.zero, insetPadding: EdgeInsets.zero,
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(0), borderRadius: BorderRadius.circular(0),
@@ -430,9 +429,7 @@ Future showMonthSelectionDialog(
child: Text( child: Text(
"确定".tr, "确定".tr,
style: TextStyle( style: TextStyle(
fontSize: 30.rpx, fontSize: 30.rpx, color: colors.textColor),
color: stringToColor("#84F5FF"),
),
), ),
), ),
), ),
@@ -450,7 +447,7 @@ Future showMonthSelectionDialog(
margin: margin:
EdgeInsets.symmetric(horizontal: 95.rpx), EdgeInsets.symmetric(horizontal: 95.rpx),
decoration: BoxDecoration( decoration: BoxDecoration(
color: const Color(0xFF84F5FF), color: colors.highlightColor,
borderRadius: BorderRadius.circular(16.rpx), borderRadius: BorderRadius.circular(16.rpx),
), ),
), ),
@@ -753,7 +750,6 @@ Future<void> showHeightPickerDialog(
); );
} }
Future showDayTimeSelectionDialog( Future showDayTimeSelectionDialog(
BuildContext context, { BuildContext context, {
required List<int> dayTimeArr, required List<int> dayTimeArr,
@@ -1590,3 +1586,40 @@ Future showCustomConfirmOfWebViewDialog(
}, },
); );
} }
class DialogColorScheme {
final Color primaryColor; // 背景色
final Color highlightColor; // 高亮色(选择框背景)
final Color textColor; // 文本色(如"确定"按钮)
DialogColorScheme({
required this.primaryColor,
required this.highlightColor,
required this.textColor,
});
}
// 根据 ent_type 获取颜色配置
DialogColorScheme _getDialogColors(int entType) {
switch (entType) {
case 1: // 企业类型1
return DialogColorScheme(
primaryColor: themeController.currentColor.sc17, // 深紫背景
highlightColor: themeController.currentColor.sc2, // 浅紫高亮
textColor: themeController.currentColor.sc2, // 浅紫文本
);
case 2: // 企业类型2
return DialogColorScheme(
primaryColor: const Color(0xFF003058), // 深蓝背景
highlightColor: const Color(0xFF84F5FF), // 浅蓝高亮
textColor: const Color(0xFF84F5FF), // 浅蓝文本
);
default: // 默认配置
return DialogColorScheme(
primaryColor: const Color(0xFF003058),
highlightColor: const Color(0xFF84F5FF),
textColor: const Color(0xFF84F5FF),
);
}
}

View File

@@ -25,7 +25,7 @@ Widget MonthDataWidget(
), //睡眠评分 ), //睡眠评分
SleepChartContainer( SleepChartContainer(
title: "每日得分".tr, title: "每日得分".tr,
tipText: "用户本月睡眠分数的汇总".tr, tipText: "用户本月睡眠分数的汇总".tr,
sleepReport: sleepReport, sleepReport: sleepReport,
chartContent: LineView( chartContent: LineView(
xLabels: [ xLabels: [
@@ -565,7 +565,7 @@ List<String> buildValueTexts(
// 中文年月日格式 // 中文年月日格式
DateTime date = DateTime.fromMillisecondsSinceEpoch(item['st']); DateTime date = DateTime.fromMillisecondsSinceEpoch(item['st']);
final dateStr = "${date.year}/ ${date.month}/ ${date.day}"; final dateStr = "${date.year}/${date.month}/${date.day}";
return "$prefix$val$suffix\n$dateStr"; return "$prefix$val$suffix\n$dateStr";
}).toList(); }).toList();