新增举报摄影师模块并接入首页路由,桌面应用名改为随心瞰商家版。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@ -0,0 +1,91 @@
|
||||
//
|
||||
// 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
|
||||
Reference in New Issue
Block a user