diff --git a/AIStudyApp/AIStudyApp/Assets.xcassets/Icons/icon-notifications.imageset/Contents.json b/AIStudyApp/AIStudyApp/Assets.xcassets/Icons/icon-notifications.imageset/Contents.json new file mode 100644 index 0000000..96fc13d --- /dev/null +++ b/AIStudyApp/AIStudyApp/Assets.xcassets/Icons/icon-notifications.imageset/Contents.json @@ -0,0 +1 @@ +{"images":[{"filename":"icon-notifications.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-notifications.imageset/icon-notifications.svg b/AIStudyApp/AIStudyApp/Assets.xcassets/Icons/icon-notifications.imageset/icon-notifications.svg new file mode 100644 index 0000000..910d02a --- /dev/null +++ b/AIStudyApp/AIStudyApp/Assets.xcassets/Icons/icon-notifications.imageset/icon-notifications.svg @@ -0,0 +1 @@ + diff --git a/AIStudyApp/AIStudyApp/Assets.xcassets/Icons/icon-search.imageset/Contents.json b/AIStudyApp/AIStudyApp/Assets.xcassets/Icons/icon-search.imageset/Contents.json new file mode 100644 index 0000000..7299af4 --- /dev/null +++ b/AIStudyApp/AIStudyApp/Assets.xcassets/Icons/icon-search.imageset/Contents.json @@ -0,0 +1 @@ +{"images":[{"filename":"icon-search.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-search.imageset/icon-search.svg b/AIStudyApp/AIStudyApp/Assets.xcassets/Icons/icon-search.imageset/icon-search.svg new file mode 100644 index 0000000..86a1ca0 --- /dev/null +++ b/AIStudyApp/AIStudyApp/Assets.xcassets/Icons/icon-search.imageset/icon-search.svg @@ -0,0 +1 @@ + diff --git a/AIStudyApp/AIStudyApp/Assets.xcassets/Icons/icon-settings.imageset/Contents.json b/AIStudyApp/AIStudyApp/Assets.xcassets/Icons/icon-settings.imageset/Contents.json new file mode 100644 index 0000000..5d40c73 --- /dev/null +++ b/AIStudyApp/AIStudyApp/Assets.xcassets/Icons/icon-settings.imageset/Contents.json @@ -0,0 +1 @@ +{"images":[{"filename":"icon-settings.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-settings.imageset/icon-settings.svg b/AIStudyApp/AIStudyApp/Assets.xcassets/Icons/icon-settings.imageset/icon-settings.svg new file mode 100644 index 0000000..0c56445 --- /dev/null +++ b/AIStudyApp/AIStudyApp/Assets.xcassets/Icons/icon-settings.imageset/icon-settings.svg @@ -0,0 +1 @@ + diff --git a/AIStudyApp/AIStudyApp/Core/DesignSystem/ZhiXiIcon.swift b/AIStudyApp/AIStudyApp/Core/DesignSystem/ZhiXiIcon.swift index e00ae86..79e9ea5 100644 --- a/AIStudyApp/AIStudyApp/Core/DesignSystem/ZhiXiIcon.swift +++ b/AIStudyApp/AIStudyApp/Core/DesignSystem/ZhiXiIcon.swift @@ -1,19 +1,25 @@ import SwiftUI /// 统一图标组件 — 所有自定义图标在此管理 -/// 后续 Android 对应资源放在 shared-assets/icons/ enum ZhiXiIcon: String { + // Tab 图标(双色:默认态 + 激活态) case tabLearn = "tab-learn" - // 待补充: - // case tabLibrary = "tab-library" - // case tabAnalysis = "tab-analysis" - // case tabProfile = "tab-profile" + case tabLearnActive = "tab-learn-active" + case tabLibrary = "tab-library" + case tabLibraryActive = "tab-library-active" + case tabAnalysis = "tab-analysis" + case tabAnalysisActive = "tab-analysis-active" + case tabProfile = "tab-profile" + case tabProfileActive = "tab-profile-active" + // 页面内图标(单色 Template) + case iconSettings = "icon-settings" + case iconNotifications = "icon-notifications" + case iconSearch = "icon-search" var image: Image { Image(rawValue) } } extension Image { - /// 自定义图标(模板渲染,支持 tintColor) static func zxIcon(_ icon: ZhiXiIcon) -> Image { icon.image.renderingMode(.template) } diff --git a/AIStudyApp/AIStudyApp/Features/Library/LibraryHomeView.swift b/AIStudyApp/AIStudyApp/Features/Library/LibraryHomeView.swift index ec807b0..cd98a0b 100644 --- a/AIStudyApp/AIStudyApp/Features/Library/LibraryHomeView.swift +++ b/AIStudyApp/AIStudyApp/Features/Library/LibraryHomeView.swift @@ -12,7 +12,7 @@ struct LibraryHomeView: View { VStack(spacing: 0) { HStack { Text("知识库").font(.system(size: 22, weight: .heavy)).foregroundColor(Color.zxF0).tracking(-0.5); Spacer() NavigationLink(value: Route.librarySearch) { - Image(systemName: "magnifyingglass").font(.system(size: 18)).foregroundColor(Color.zxF05) + Image("icon-search").resizable().scaledToFit().frame(width: 18, height: 18).foregroundColor(Color.zxF05) .frame(width: 36, height: 36).background(Color(hex:"#FFFFFF",opacity:0.05)) .clipShape(RoundedRectangle(cornerRadius: 10)) .overlay(RoundedRectangle(cornerRadius: 10).stroke(Color.zxBorder008, lineWidth: 1)) diff --git a/AIStudyApp/AIStudyApp/Features/Profile/ProfileView.swift b/AIStudyApp/AIStudyApp/Features/Profile/ProfileView.swift index a0266c0..384b975 100644 --- a/AIStudyApp/AIStudyApp/Features/Profile/ProfileView.swift +++ b/AIStudyApp/AIStudyApp/Features/Profile/ProfileView.swift @@ -12,14 +12,14 @@ struct ProfileView: View { Text("我的").font(.system(size: 22, weight: .heavy)).foregroundColor(Color.zxF0).tracking(-0.5) Spacer() NavigationLink(value: Route.notificationList) { - Image(systemName: "bell").font(.system(size: 18)).foregroundColor(Color.zxF05) + Image("icon-notifications").resizable().scaledToFit().frame(width: 18, height: 18).foregroundColor(Color.zxF05) .frame(width: 36, height: 36).background(Color(hex:"#FFFFFF",opacity:0.05)) .clipShape(RoundedRectangle(cornerRadius: 10)) .overlay(RoundedRectangle(cornerRadius: 10).stroke(Color.zxBorder008, lineWidth: 1)) } .accessibilityLabel("通知中心") NavigationLink(value: Route.settings) { - Image(systemName: "gearshape").font(.system(size: 18)).foregroundColor(Color.zxF05) + Image("icon-settings").resizable().scaledToFit().frame(width: 18, height: 18).foregroundColor(Color.zxF05) .frame(width: 36, height: 36).background(Color(hex:"#FFFFFF",opacity:0.05)) .clipShape(RoundedRectangle(cornerRadius: 10)) .overlay(RoundedRectangle(cornerRadius: 10).stroke(Color.zxBorder008, lineWidth: 1))