Преглед изворни кода

feat: 补充清理缓存的弹窗

陈文艺 пре 2 месеци
родитељ
комит
e59a75fe06
2 измењених фајлова са 31 додато и 1 уклоњено
  1. 23 0
      Lanu/Localizable.xcstrings
  2. 8 1
      Lanu/Views/Settings/LNSettingsViewController.swift

+ 23 - 0
Lanu/Localizable.xcstrings

@@ -9111,6 +9111,29 @@
           }
         }
       }
+    },
+    "B00110" : {
+      "extractionState" : "manual",
+      "localizations" : {
+        "en" : {
+          "stringUnit" : {
+            "state" : "translated",
+            "value" : "Your image cache will be cleared, and your chat history will not be cleared"
+          }
+        },
+        "id" : {
+          "stringUnit" : {
+            "state" : "translated",
+            "value" : "Cache gambar Anda akan dihapus, dan riwayat obrolan Anda tidak akan dihapus"
+          }
+        },
+        "zh-Hans" : {
+          "stringUnit" : {
+            "state" : "translated",
+            "value" : "图片缓存将被清空,聊天记录不会被清除"
+          }
+        }
+      }
     }
   },
   "version" : "1.1"

+ 8 - 1
Lanu/Views/Settings/LNSettingsViewController.swift

@@ -63,7 +63,14 @@ extension LNSettingsViewController {
         
         let cleanCache = buildFunctionItem(icon: .icCleanCache, title: .init(key: "A00257"), infoView: nil)
         cleanCache.onTap {
-            showToast(.init(key: "A00258"))
+            let alert = LNCommonAlertView()
+            alert.titleLabel.text = .init(key: "A00257")
+            alert.messageLabel.text = .init(key: "B00110")
+            alert.setConfirm {
+                showToast(.init(key: "A00258"))
+            }
+            alert.setCancel()
+            alert.popup()
         }
         stackView.addArrangedSubview(cleanCache)