Files
suixinkan_ios_new/suixinkan/Features/WildPhotographerReport/Views/WildPhotographerReportSharedViews.swift

92 lines
2.9 KiB
Swift
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// WildPhotographerReportSharedViews.swift
// suixinkan
//
// Created by Codex on 2026/7/1.
//
import SwiftUI
///
struct WildReportSectionHeader: View {
let icon: String
let title: String
let subtitle: String
var body: some View {
HStack(spacing: 12) {
Image(systemName: icon)
.font(.system(size: 22, weight: .semibold))
.foregroundStyle(AppDesign.primary)
.frame(width: 46, height: 46)
.background(AppDesign.primarySoft, in: RoundedRectangle(cornerRadius: 12))
VStack(alignment: .leading, spacing: 4) {
Text(title)
.font(.system(size: 20, weight: .bold))
.foregroundStyle(AppDesign.textPrimary)
.lineLimit(1)
.minimumScaleFactor(0.78)
Text(subtitle)
.font(.system(size: 13))
.foregroundStyle(AppDesign.textSecondary)
.lineLimit(2)
}
Spacer()
}
.padding(16)
.background(.white, in: RoundedRectangle(cornerRadius: 14))
}
}
///
struct WildReportHeroIllustration: View {
var body: some View {
ZStack {
Circle()
.fill(AppDesign.primary.opacity(0.10))
.frame(width: 104, height: 104)
RoundedRectangle(cornerRadius: 26)
.fill(.white.opacity(0.88))
.frame(width: 78, height: 78)
.shadow(color: Color(hex: 0x0F172A).opacity(0.06), radius: 10, y: 4)
Image(systemName: "exclamationmark.shield.fill")
.font(.system(size: 42, weight: .semibold))
.foregroundStyle(AppDesign.primary)
Image(systemName: "camera.fill")
.font(.system(size: 18, weight: .semibold))
.foregroundStyle(Color(hex: 0x1D4D89))
.frame(width: 34, height: 34)
.background(Color(hex: 0xEAF3FF), in: Circle())
.offset(x: 36, y: 36)
}
}
}
#if DEBUG
/// Debug //
struct WildReportStateToolbar: ToolbarContent {
@Binding var selection: WildReportPageState
var body: some ToolbarContent {
ToolbarItem(placement: .navigationBarTrailing) {
Menu {
ForEach(WildReportPageState.allCases) { state in
Button(state.title) {
selection = state
}
}
} label: {
Image(systemName: "ellipsis.circle")
.font(.system(size: 18, weight: .semibold))
.foregroundStyle(AppDesign.primary)
}
.accessibilityLabel("切换页面状态")
}
}
}
#endif