fix: 统一应用名称为 "E-Party" 并更新相关描述
主要变更: 1. 在 Info.plist 中将应用名称和描述中的 "E-Parti" 替换为 "E-Party"。 2. 更新多个本地化字符串和提示信息,确保一致性。 3. 修改部分代码中的错误提示信息,使用本地化字符串替代硬编码文本。 此更新旨在提升品牌一致性,确保用户在使用过程中获得统一的体验。
This commit is contained in:
@@ -21,6 +21,9 @@
|
||||
/// 卡片容器
|
||||
@property (nonatomic, strong) UIView *cardView;
|
||||
|
||||
/// 彩色背景层(毛玻璃下方)
|
||||
@property (nonatomic, strong) UIView *colorBackgroundView;
|
||||
|
||||
/// 毛玻璃效果视图
|
||||
@property (nonatomic, strong) UIVisualEffectView *blurEffectView;
|
||||
|
||||
@@ -83,7 +86,13 @@
|
||||
make.bottom.equalTo(self.contentView).offset(-8);
|
||||
}];
|
||||
|
||||
// 毛玻璃效果视图
|
||||
// 彩色背景层(最底层)
|
||||
[self.cardView addSubview:self.colorBackgroundView];
|
||||
[self.colorBackgroundView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.equalTo(self.cardView);
|
||||
}];
|
||||
|
||||
// 毛玻璃效果视图(在彩色背景层之上)
|
||||
[self.cardView addSubview:self.blurEffectView];
|
||||
[self.blurEffectView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.equalTo(self.cardView);
|
||||
@@ -153,7 +162,7 @@
|
||||
self.currentModel = model;
|
||||
|
||||
// 配置用户名
|
||||
self.nameLabel.text = model.nick ?: @"匿名用户";
|
||||
self.nameLabel.text = model.nick ?: YMLocalizedString(@"user.anonymous");
|
||||
|
||||
// 配置时间(将时间戳转换为 MM/dd 格式)
|
||||
self.timeLabel.text = [self formatTimestampToDate:model.publishTime];
|
||||
@@ -176,20 +185,21 @@
|
||||
[self applyEmotionColorEffect:model.emotionColor];
|
||||
}
|
||||
|
||||
/// 应用情绪颜色视觉效果(Border + Shadow)
|
||||
/// 应用情绪颜色视觉效果(Background + Shadow)
|
||||
- (void)applyEmotionColorEffect:(NSString *)emotionColorHex {
|
||||
NSString *displayColorHex = emotionColorHex;
|
||||
|
||||
// 如果没有保存的颜色,使用随机颜色(不持久化)
|
||||
if (!displayColorHex) {
|
||||
displayColorHex = [EPEmotionColorStorage randomEmotionColor];
|
||||
// 获取颜色(已在列表加载时处理,这里直接使用)
|
||||
if (!emotionColorHex) {
|
||||
NSLog(@"[EPMomentCell] 警告:emotionColorHex 为 nil");
|
||||
return;
|
||||
}
|
||||
|
||||
UIColor *color = [self colorFromHex:displayColorHex];
|
||||
UIColor *color = [self colorFromHex:emotionColorHex];
|
||||
|
||||
// 设置 border
|
||||
self.cardView.layer.borderWidth = 3.0;
|
||||
self.cardView.layer.borderColor = color.CGColor;
|
||||
// 移除边框
|
||||
self.cardView.layer.borderWidth = 0;
|
||||
|
||||
// 设置彩色背景(50% 透明度,在毛玻璃下方)
|
||||
self.colorBackgroundView.backgroundColor = [color colorWithAlphaComponent:0.5];
|
||||
|
||||
// 设置 shadow(使用情绪颜色)
|
||||
self.cardView.layer.shadowColor = color.CGColor;
|
||||
@@ -295,18 +305,18 @@
|
||||
|
||||
/// 格式化时间戳为相对时间
|
||||
- (NSString *)formatTimeInterval:(NSInteger)timestamp {
|
||||
if (timestamp <= 0) return @"刚刚";
|
||||
if (timestamp <= 0) return YMLocalizedString(@"time.just_now");
|
||||
|
||||
NSTimeInterval interval = [[NSDate date] timeIntervalSince1970] - timestamp / 1000.0;
|
||||
|
||||
if (interval < 60) {
|
||||
return @"刚刚";
|
||||
return YMLocalizedString(@"time.just_now");
|
||||
} else if (interval < 3600) {
|
||||
return [NSString stringWithFormat:@"%.0f分钟前", interval / 60];
|
||||
return [NSString stringWithFormat:YMLocalizedString(@"time.minutes_ago"), interval / 60];
|
||||
} else if (interval < 86400) {
|
||||
return [NSString stringWithFormat:@"%.0f小时前", interval / 3600];
|
||||
return [NSString stringWithFormat:YMLocalizedString(@"time.hours_ago"), interval / 3600];
|
||||
} else if (interval < 604800) {
|
||||
return [NSString stringWithFormat:@"%.0f天前", interval / 86400];
|
||||
return [NSString stringWithFormat:YMLocalizedString(@"time.days_ago"), interval / 86400];
|
||||
} else {
|
||||
NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
|
||||
formatter.dateFormat = @"yyyy-MM-dd";
|
||||
@@ -415,14 +425,23 @@
|
||||
- (UIView *)cardView {
|
||||
if (!_cardView) {
|
||||
_cardView = [[UIView alloc] init];
|
||||
_cardView.backgroundColor = [UIColor clearColor]; // 透明背景,毛玻璃效果由 blurEffectView 提供
|
||||
_cardView.backgroundColor = [UIColor clearColor]; // 透明背景,颜色由 colorBackgroundView 提供
|
||||
_cardView.layer.cornerRadius = 12; // 圆角
|
||||
// Shadow 和 Border 将由 applyEmotionColorEffect 动态设置
|
||||
// Shadow 将由 applyEmotionColorEffect 动态设置
|
||||
_cardView.layer.masksToBounds = NO;
|
||||
}
|
||||
return _cardView;
|
||||
}
|
||||
|
||||
- (UIView *)colorBackgroundView {
|
||||
if (!_colorBackgroundView) {
|
||||
_colorBackgroundView = [[UIView alloc] init];
|
||||
_colorBackgroundView.layer.cornerRadius = 12;
|
||||
_colorBackgroundView.layer.masksToBounds = YES;
|
||||
}
|
||||
return _colorBackgroundView;
|
||||
}
|
||||
|
||||
- (UIVisualEffectView *)blurEffectView {
|
||||
if (!_blurEffectView) {
|
||||
UIBlurEffect *blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight];
|
||||
|
Reference in New Issue
Block a user