fix: 统一应用名称为 "E-Party" 并更新相关描述
主要变更: 1. 在 Info.plist 中将应用名称和描述中的 "E-Parti" 替换为 "E-Party"。 2. 更新多个本地化字符串和提示信息,确保一致性。 3. 修改部分代码中的错误提示信息,使用本地化字符串替代硬编码文本。 此更新旨在提升品牌一致性,确保用户在使用过程中获得统一的体验。
This commit is contained in:
@@ -35,13 +35,13 @@ import Foundation
|
||||
|
||||
if let hud = currentHUD {
|
||||
// 更新现有 HUD
|
||||
hud.label.text = "上传中 \(uploaded)/\(total)"
|
||||
hud.label.text = String(format: YMLocalizedString("upload.progress_format"), uploaded, total)
|
||||
hud.progress = Float(uploaded) / Float(total)
|
||||
} else {
|
||||
// 创建新 HUD
|
||||
let hud = MBProgressHUD.showAdded(to: window, animated: true)
|
||||
hud.mode = .determinateHorizontalBar
|
||||
hud.label.text = "上传中 \(uploaded)/\(total)"
|
||||
hud.label.text = String(format: YMLocalizedString("upload.progress_format"), uploaded, total)
|
||||
hud.progress = Float(uploaded) / Float(total)
|
||||
hud.removeFromSuperViewOnHide = true
|
||||
currentHUD = hud
|
||||
@@ -49,6 +49,36 @@ import Foundation
|
||||
}
|
||||
}
|
||||
|
||||
/// 显示错误提示
|
||||
/// - Parameter message: 错误信息
|
||||
@objc static func showError(_ message: String) {
|
||||
DispatchQueue.main.async {
|
||||
guard let window = keyWindow else { return }
|
||||
|
||||
let hud = MBProgressHUD.showAdded(to: window, animated: true)
|
||||
hud.mode = .text
|
||||
hud.label.text = message
|
||||
hud.label.numberOfLines = 0
|
||||
hud.removeFromSuperViewOnHide = true
|
||||
hud.hide(animated: true, afterDelay: 2.0)
|
||||
}
|
||||
}
|
||||
|
||||
/// 显示成功提示
|
||||
/// - Parameter message: 成功信息
|
||||
@objc static func showSuccess(_ message: String) {
|
||||
DispatchQueue.main.async {
|
||||
guard let window = keyWindow else { return }
|
||||
|
||||
let hud = MBProgressHUD.showAdded(to: window, animated: true)
|
||||
hud.mode = .text
|
||||
hud.label.text = message
|
||||
hud.label.numberOfLines = 0
|
||||
hud.removeFromSuperViewOnHide = true
|
||||
hud.hide(animated: true, afterDelay: 2.0)
|
||||
}
|
||||
}
|
||||
|
||||
/// 关闭 HUD
|
||||
@objc static func dismiss() {
|
||||
DispatchQueue.main.async {
|
||||
|
Reference in New Issue
Block a user