feat: 样式
This commit is contained in:
parent
36b95abc37
commit
b1cd957d0c
@ -1,4 +1,4 @@
|
||||
<svg width="106" height="66" viewBox="0 0 106 66" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M0.666667 60C0.666667 62.9455 3.05448 65.3333 6 65.3333C8.94552 65.3333 11.3333 62.9455 11.3333 60C11.3333 57.0545 8.94552 54.6667 6 54.6667C3.05448 54.6667 0.666667 57.0545 0.666667 60ZM22.2802 31.0204L23.152 31.5102L22.2802 31.0204ZM97.5663 30V29H24.0239V30V31H97.5663V30ZM22.2802 31.0204L21.4083 30.5306L5.12816 59.5102L6 60L6.87184 60.4898L23.152 31.5102L22.2802 31.0204ZM24.0239 30V29C22.9395 29 21.9395 29.5852 21.4083 30.5306L22.2802 31.0204L23.152 31.5102C23.3291 31.1951 23.6624 31 24.0239 31V30Z" fill="black"/>
|
||||
<rect x="16.8433" width="89.1566" height="30" rx="15" fill="black"/>
|
||||
<svg width="90" height="66" viewBox="0 0 90 66" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M0.666667 60C0.666667 62.9455 3.05448 65.3333 6 65.3333C8.94552 65.3333 11.3333 62.9455 11.3333 60C11.3333 57.0545 8.94552 54.6667 6 54.6667C3.05448 54.6667 0.666667 57.0545 0.666667 60ZM28.9006 28.8162L29.7066 29.4081L28.9006 28.8162ZM75.5 28V27H30.5126V28V29H75.5V28ZM28.9006 28.8162L28.0946 28.2243L5.194 59.4081L6 60L6.806 60.5919L29.7066 29.4081L28.9006 28.8162ZM30.5126 28V27C29.5577 27 28.6598 27.4546 28.0946 28.2243L28.9006 28.8162L29.7066 29.4081C29.895 29.1515 30.1943 29 30.5126 29V28Z" fill="black"/>
|
||||
<rect x="15.5" width="74" height="30" rx="15" fill="black"/>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 705 B After Width: | Height: | Size: 687 B |
@ -402,6 +402,8 @@ struct BlindBoxView: View {
|
||||
// 如果列表为空数组 设置盲盒状态为none
|
||||
if self.blindList.isEmpty {
|
||||
self.animationPhase = .none
|
||||
}else{
|
||||
self.animationPhase = .loading
|
||||
}
|
||||
print("✅ 成功获取 \(self.blindList.count) 个盲盒")
|
||||
case .failure(let error):
|
||||
@ -744,7 +746,7 @@ struct BlindBoxView: View {
|
||||
Button(action: showUserProfile) {
|
||||
SVGImage(svgName: "User")
|
||||
.frame(width: 24, height: 24)
|
||||
.padding(13) // Increases tap area while keeping visual size
|
||||
.padding(.trailing, 13) // Increases tap area while keeping visual size
|
||||
.contentShape(Rectangle()) // Makes the padded area tappable
|
||||
}
|
||||
.buttonStyle(PlainButtonStyle()) // Prevents the button from affecting the layout
|
||||
@ -785,18 +787,25 @@ struct BlindBoxView: View {
|
||||
.foregroundColor(.white)
|
||||
.cornerRadius(16)
|
||||
}
|
||||
.padding(.trailing)
|
||||
.fullScreenCover(isPresented: $showLogin) {
|
||||
LoginView()
|
||||
}
|
||||
}
|
||||
.padding(.horizontal)
|
||||
.padding(.top, 20)
|
||||
.padding(.horizontal)
|
||||
}
|
||||
// 标题
|
||||
VStack(alignment: .leading, spacing: 4) {
|
||||
Text("Hi! Click And")
|
||||
Text("Open Your First Box~")
|
||||
HStack {
|
||||
Text("Open Your")
|
||||
if mediaType == .video {
|
||||
Text("Second")
|
||||
} else if mediaType == .image {
|
||||
Text("First")
|
||||
}
|
||||
Text("Box~")
|
||||
}
|
||||
}
|
||||
.font(Typography.font(for: .smallLargeTitle))
|
||||
.fontWeight(.bold)
|
||||
@ -908,7 +917,7 @@ struct BlindBoxView: View {
|
||||
.frame(width: 300, height: 300)
|
||||
|
||||
case .none:
|
||||
SVGImage(svgName: "BlindNone")
|
||||
SVGImageHtml(svgName: "BlindNone")
|
||||
.frame(width: 300, height: 300)
|
||||
}
|
||||
}
|
||||
@ -938,9 +947,9 @@ struct BlindBoxView: View {
|
||||
maxHeight: UIScreen.main.bounds.height * 0.65
|
||||
)
|
||||
.opacity(showScalingOverlay ? 0 : 1)
|
||||
.animation(.easeOut(duration: 1.5), value: showScalingOverlay)
|
||||
.animation(.easeOut(duration: 0.5), value: showScalingOverlay)
|
||||
.offset(y: showScalingOverlay ? -100 : 0)
|
||||
.animation(.easeInOut(duration: 1.5), value: showScalingOverlay)
|
||||
.animation(.easeInOut(duration: 0.5), value: showScalingOverlay)
|
||||
// 打开
|
||||
if mediaType == .all {
|
||||
Button(action: {
|
||||
|
||||
@ -66,7 +66,9 @@ struct BlindOutcomeView: View {
|
||||
RoundedRectangle(cornerRadius: 12)
|
||||
.fill(Color.white)
|
||||
.shadow(color: Color.black.opacity(0.1), radius: 8, x: 0, y: 2)
|
||||
|
||||
Spacer()
|
||||
.frame(height: 16)
|
||||
|
||||
VStack(spacing: 0) {
|
||||
switch media {
|
||||
case .image(let uiImage):
|
||||
@ -75,7 +77,6 @@ struct BlindOutcomeView: View {
|
||||
.scaledToFit()
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
.cornerRadius(10)
|
||||
.padding(4)
|
||||
.onTapGesture {
|
||||
withAnimation {
|
||||
isFullscreen.toggle()
|
||||
@ -84,7 +85,7 @@ struct BlindOutcomeView: View {
|
||||
|
||||
case .video(let url, _):
|
||||
VideoPlayerView(url: url, isPlaying: $isPlaying, player: $player)
|
||||
.frame(width: UIScreen.main.bounds.width - 40)
|
||||
.frame(width: UIScreen.main.bounds.width)
|
||||
.background(Color.clear)
|
||||
.cornerRadius(10)
|
||||
.clipped()
|
||||
|
||||
@ -154,10 +154,10 @@ struct JoinModal: View {
|
||||
.font(Typography.font(for: .body, family: .quicksandBold))
|
||||
}
|
||||
.foregroundColor(.themeTextMessageMain)
|
||||
.padding(.vertical, 12)
|
||||
.padding(.vertical, 16)
|
||||
.padding(.horizontal, 30)
|
||||
.background(Color.themePrimary)
|
||||
.cornerRadius(20)
|
||||
.cornerRadius(32)
|
||||
}
|
||||
.padding(.top, 16)
|
||||
// 协议条款
|
||||
|
||||
@ -39,7 +39,7 @@ struct CreditsInfoCard: View {
|
||||
|
||||
// MARK: - 主要积分显示区域
|
||||
private var mainCreditsSection: some View {
|
||||
HStack(spacing: Theme.Spacing.md) {
|
||||
HStack(spacing: Theme.Spacing.sm) {
|
||||
// 积分图标和数量
|
||||
HStack(spacing: Theme.Spacing.sm) {
|
||||
Text("Credits:")
|
||||
|
||||
@ -116,7 +116,7 @@ struct UserInfo: View {
|
||||
// Content VStack
|
||||
VStack(spacing: 20) {
|
||||
// Title
|
||||
Text(showUsername ? "Add Your Avatar" : "What's Your Name?")
|
||||
Text(showUsername ? "What's Your Name?" : "Add Your Avatar")
|
||||
.font(Typography.font(for: .body, family: .quicksandBold))
|
||||
.frame(maxWidth: .infinity, alignment: .center)
|
||||
|
||||
|
||||
@ -97,6 +97,9 @@ struct SubscriptionStatusBar: View {
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .leading)
|
||||
}
|
||||
.frame(height: height)
|
||||
.onTapGesture {
|
||||
onSubscribeTap?()
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - 日期格式化
|
||||
|
||||
@ -94,7 +94,7 @@ struct SubscribeView: View {
|
||||
// 法律链接
|
||||
legalLinks
|
||||
|
||||
Spacer(minLength: 100)
|
||||
Spacer(minLength: 10)
|
||||
}
|
||||
}
|
||||
.background(Theme.Colors.background)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user