feat(app): 完善播放协议搜索与空状态

This commit is contained in:
Zhou Weidong committed 2026-10-23 12:38:47 +08:00
1 parent 671e0ce143
commit ef29fc5f15
85 files changed
+2976 -768

No files matched your search

+8
View File
@@ -2,6 +2,14 @@
import '../../l10n/app_localizations.dart';
const int _serverErrorCode = 500;
/// 用户端不展示内部故障文案。500 与空提示改成可理解的说明,业务提示原样保留。
String userFacingApiMessage(AppLocalizations l10n, int code, String message) {
if (code >= _serverErrorCode || message.isEmpty) return l10n.authServerError;
return message;
}
/// logic 里的错误在两种情况下是"哨兵值":本地网络异常(读不到后端提示语)与
/// 我们自己包装的失败。这里统一翻译成当前语言的文案;服务端给的中文提示原样展示。
String errorText(AppLocalizations l10n, String? code, String fallback) {