From b1cd957d0c9b67f5594cd408f3e9f8ed282dcd90 Mon Sep 17 00:00:00 2001 From: jinyaqiu Date: Wed, 3 Sep 2025 14:53:03 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wake/Assets/Svg/BlindCount.svg | 6 ++--- wake/ContentView.swift | 23 +++++++++++++------ wake/View/Blind/BlindOutCome.swift | 7 +++--- wake/View/Blind/JoinModal.swift | 4 ++-- wake/View/Credits/CreditsInfoCard.swift | 2 +- wake/View/Owner/UserInfo/UserInfo.swift | 2 +- .../Components/SubscriptionStatusBar.swift | 3 +++ wake/View/Subscribe/SubscribeView.swift | 2 +- 8 files changed, 31 insertions(+), 18 deletions(-) diff --git a/wake/Assets/Svg/BlindCount.svg b/wake/Assets/Svg/BlindCount.svg index e103713..6b10a86 100644 --- a/wake/Assets/Svg/BlindCount.svg +++ b/wake/Assets/Svg/BlindCount.svg @@ -1,4 +1,4 @@ - - - + + + diff --git a/wake/ContentView.swift b/wake/ContentView.swift index f25e6b1..5d9df67 100644 --- a/wake/ContentView.swift +++ b/wake/ContentView.swift @@ -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: { diff --git a/wake/View/Blind/BlindOutCome.swift b/wake/View/Blind/BlindOutCome.swift index cdd4bc9..cce7d72 100644 --- a/wake/View/Blind/BlindOutCome.swift +++ b/wake/View/Blind/BlindOutCome.swift @@ -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() diff --git a/wake/View/Blind/JoinModal.swift b/wake/View/Blind/JoinModal.swift index 2a21e5c..541c825 100644 --- a/wake/View/Blind/JoinModal.swift +++ b/wake/View/Blind/JoinModal.swift @@ -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) // 协议条款 diff --git a/wake/View/Credits/CreditsInfoCard.swift b/wake/View/Credits/CreditsInfoCard.swift index 509625b..1cfd9de 100644 --- a/wake/View/Credits/CreditsInfoCard.swift +++ b/wake/View/Credits/CreditsInfoCard.swift @@ -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:") diff --git a/wake/View/Owner/UserInfo/UserInfo.swift b/wake/View/Owner/UserInfo/UserInfo.swift index b2b8ab4..e00b784 100644 --- a/wake/View/Owner/UserInfo/UserInfo.swift +++ b/wake/View/Owner/UserInfo/UserInfo.swift @@ -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) diff --git a/wake/View/Subscribe/Components/SubscriptionStatusBar.swift b/wake/View/Subscribe/Components/SubscriptionStatusBar.swift index 8137093..aeb3640 100644 --- a/wake/View/Subscribe/Components/SubscriptionStatusBar.swift +++ b/wake/View/Subscribe/Components/SubscriptionStatusBar.swift @@ -97,6 +97,9 @@ struct SubscriptionStatusBar: View { .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .leading) } .frame(height: height) + .onTapGesture { + onSubscribeTap?() + } } // MARK: - 日期格式化 diff --git a/wake/View/Subscribe/SubscribeView.swift b/wake/View/Subscribe/SubscribeView.swift index 02a886b..f994317 100644 --- a/wake/View/Subscribe/SubscribeView.swift +++ b/wake/View/Subscribe/SubscribeView.swift @@ -94,7 +94,7 @@ struct SubscribeView: View { // 法律链接 legalLinks - Spacer(minLength: 100) + Spacer(minLength: 10) } } .background(Theme.Colors.background)