diff --git a/AIStudyApp/AIStudyApp/Assets.xcassets/Icons/icon-moon.imageset/Contents.json b/AIStudyApp/AIStudyApp/Assets.xcassets/Icons/icon-moon.imageset/Contents.json
new file mode 100644
index 0000000..4552af7
--- /dev/null
+++ b/AIStudyApp/AIStudyApp/Assets.xcassets/Icons/icon-moon.imageset/Contents.json
@@ -0,0 +1 @@
+{"images":[{"filename":"icon-moon.svg","idiom":"universal"}],"info":{"author":"xcode","version":1},"properties":{"template-rendering-intent":"template","preserves-vector-representation":true}}
diff --git a/AIStudyApp/AIStudyApp/Assets.xcassets/Icons/icon-moon.imageset/icon-moon.svg b/AIStudyApp/AIStudyApp/Assets.xcassets/Icons/icon-moon.imageset/icon-moon.svg
new file mode 100644
index 0000000..e08816d
--- /dev/null
+++ b/AIStudyApp/AIStudyApp/Assets.xcassets/Icons/icon-moon.imageset/icon-moon.svg
@@ -0,0 +1 @@
+
diff --git a/AIStudyApp/AIStudyApp/Assets.xcassets/Icons/icon-sun.imageset/Contents.json b/AIStudyApp/AIStudyApp/Assets.xcassets/Icons/icon-sun.imageset/Contents.json
new file mode 100644
index 0000000..18a08d2
--- /dev/null
+++ b/AIStudyApp/AIStudyApp/Assets.xcassets/Icons/icon-sun.imageset/Contents.json
@@ -0,0 +1 @@
+{"images":[{"filename":"icon-sun.svg","idiom":"universal"}],"info":{"author":"xcode","version":1},"properties":{"template-rendering-intent":"template","preserves-vector-representation":true}}
diff --git a/AIStudyApp/AIStudyApp/Assets.xcassets/Icons/icon-sun.imageset/icon-sun.svg b/AIStudyApp/AIStudyApp/Assets.xcassets/Icons/icon-sun.imageset/icon-sun.svg
new file mode 100644
index 0000000..6872696
--- /dev/null
+++ b/AIStudyApp/AIStudyApp/Assets.xcassets/Icons/icon-sun.imageset/icon-sun.svg
@@ -0,0 +1 @@
+
diff --git a/AIStudyApp/AIStudyApp/Features/Profile/SettingsView.swift b/AIStudyApp/AIStudyApp/Features/Profile/SettingsView.swift
index 1e64848..085fb22 100644
--- a/AIStudyApp/AIStudyApp/Features/Profile/SettingsView.swift
+++ b/AIStudyApp/AIStudyApp/Features/Profile/SettingsView.swift
@@ -21,7 +21,7 @@ struct SettingsView: View {
VStack(spacing: 16) {
sectionHeader("外观与语言")
VStack(spacing: 0) {
- ZXSettingRow(title: "外观", value: appearanceLabel, icon: "moon.stars.fill", color: Color.zxPurple)
+ ZXSettingRow(title: "外观", value: appearanceLabel, icon: appearance == "dark" ? "icon-moon" : "icon-sun", color: Color.zxPurple, isCustom: true)
.contentShape(Rectangle())
.onTapGesture { cycleAppearance() }
ZXSettingDivider()
@@ -156,10 +156,11 @@ struct SettingsView: View {
// MARK: - Setting row components
struct ZXSettingRow: View {
- let title: String; let value: String; let icon: String; let color: Color
+ let title: String; let value: String; let icon: String; let color: Color; var isCustom: Bool = false
var body: some View {
HStack(spacing: 12) {
- Image(systemName: icon).font(.system(size: 16)).foregroundColor(color).frame(width: 32, height: 32).background(color.opacity(0.12)).clipShape(RoundedRectangle(cornerRadius: 8))
+ if isCustom { Image(icon).resizable().scaledToFit().frame(width: 16, height: 16).foregroundColor(color).frame(width: 32, height: 32).background(color.opacity(0.12)).clipShape(RoundedRectangle(cornerRadius: 8)) }
+ else { Image(systemName: icon).font(.system(size: 16)).foregroundColor(color).frame(width: 32, height: 32).background(color.opacity(0.12)).clipShape(RoundedRectangle(cornerRadius: 8)) }
Text(title).font(.system(size: 14, weight: .semibold)).foregroundColor(Color.zxF0)
Spacer()
if !value.isEmpty { Text(value).font(.system(size: 13)).foregroundColor(Color.zxF03) }