Skip to content

Commit

Permalink
Merge pull request #262 from Darock-Studio/ios/watermark
Browse files Browse the repository at this point in the history
fix(iOS, watchOS): Fixed MeowBili watermark can always be seen on dev…
  • Loading branch information
WindowsMEMZ authored Feb 21, 2024
2 parents be892c5 + 11aab4b commit 72dd037
Show file tree
Hide file tree
Showing 8 changed files with 328 additions and 299 deletions.
12 changes: 6 additions & 6 deletions DarockBili.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1146,7 +1146,7 @@
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO;
CODE_SIGN_ENTITLEMENTS = "MeowBili/MeowBili Vision App.entitlements";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 755;
CURRENT_PROJECT_VERSION = 773;
DEVELOPMENT_ASSET_PATHS = "\"MeowBili/Preview Content\"";
DEVELOPMENT_TEAM = B57D8PP775;
ENABLE_PREVIEWS = YES;
Expand Down Expand Up @@ -1181,7 +1181,7 @@
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO;
CODE_SIGN_ENTITLEMENTS = "MeowBili/MeowBili Vision App.entitlements";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 755;
CURRENT_PROJECT_VERSION = 773;
DEVELOPMENT_ASSET_PATHS = "\"MeowBili/Preview Content\"";
DEVELOPMENT_TEAM = B57D8PP775;
ENABLE_PREVIEWS = YES;
Expand Down Expand Up @@ -1218,7 +1218,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = MeowBili/MeowBili.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 755;
CURRENT_PROJECT_VERSION = 773;
DEVELOPMENT_ASSET_PATHS = "\"MeowBili/Preview Content\"";
DEVELOPMENT_TEAM = B57D8PP775;
ENABLE_PREVIEWS = YES;
Expand Down Expand Up @@ -1265,7 +1265,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = MeowBili/MeowBili.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 755;
CURRENT_PROJECT_VERSION = 773;
DEVELOPMENT_ASSET_PATHS = "\"MeowBili/Preview Content\"";
DEVELOPMENT_TEAM = B57D8PP775;
ENABLE_PREVIEWS = YES;
Expand Down Expand Up @@ -1309,7 +1309,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIconWatch;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 755;
CURRENT_PROJECT_VERSION = 773;
DEVELOPMENT_ASSET_PATHS = "\"MeowBili/Preview\\ Content\"";
DEVELOPMENT_TEAM = B57D8PP775;
ENABLE_PREVIEWS = YES;
Expand Down Expand Up @@ -1345,7 +1345,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIconWatch;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 755;
CURRENT_PROJECT_VERSION = 773;
DEVELOPMENT_ASSET_PATHS = "\"MeowBili/Preview\\ Content\"";
DEVELOPMENT_TEAM = B57D8PP775;
ENABLE_PREVIEWS = YES;
Expand Down
23 changes: 23 additions & 0 deletions MeowBili/Assets.xcassets/AppIconFrontImage.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "VisionAppIco-Front.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "VisionAppIco-Front 1.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "VisionAppIco-Front 2.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 8 additions & 6 deletions MeowBili/MeowBiliApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -206,14 +206,16 @@ struct DarockBili_Watch_AppApp: App {
if shouldShowAppName {
VStack {
Spacer()
.frame(height: 5)
.frame(height: 12)
ZStack {
Capsule()
.fill(Color.accentColor)
.frame(width: 100, height: 25)
Text("喵哩喵哩")
.foregroundStyle(Color.white)
.font(.system(size: 16, weight: .semibold))
.frame(width: 60, height: 20)
HStack {
Text("喵哩喵哩")
.foregroundStyle(Color.white)
.font(.system(size: 12, weight: .medium))
}
}
Spacer()
}
Expand Down Expand Up @@ -367,7 +369,7 @@ struct DarockBili_Watch_AppApp: App {
case .background:
break
case .inactive:
#if !os(watchOS) && !os(visionOS)
#if os(iOS)
shouldShowAppName = false
#endif
case .active:
Expand Down
545 changes: 276 additions & 269 deletions MeowBili/PersonalCenter/UserDetailView.swift

Large diffs are not rendered by default.

33 changes: 15 additions & 18 deletions MeowBili/Video/VideoDetailView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ struct VideoDetailView: View {
@State var nowPlayingCount = "0"
@State var publishTime = ""
@State var videoDesc = ""
@State var isMoreMenuPresented = false
@State var isDownloadPresented = false
@State var isAudioPlayerPresented = false
@State var backgroundPicOpacity = 0.0
@State var mainVerticalTabViewSelection = 1
Expand All @@ -83,6 +81,8 @@ struct VideoDetailView: View {
@State var videoCID: Int64 = 0
@State var isDescSelectPresented = false
#if !os(watchOS)
@State var isMoreMenuPresented = false
@State var isDownloadPresented = false
@State var shouldPausePlayer = false
@State var danmakuSendCache = ""
@State var danmakuSendColor = Color(hex: 0xFFFFFF)
Expand Down Expand Up @@ -523,24 +523,20 @@ struct VideoDetailView: View {
.offset(y: 16)
.toolbar {
ToolbarItem(placement: .topBarTrailing) {
Button(action: {
isMoreMenuPresented = true
}, label: {
Image(systemName: "ellipsis")
})
.sheet(isPresented: $isMoreMenuPresented, content: {
NavigationLink(destination: {
List {
Button(action: {
if videoPages.count <= 1 {
isDownloadPresented = true
} else {
if videoPages.count <= 1 {
NavigationLink(destination: { VideoDownloadView(bvid: videoDetails["BV"]!, videoDetails: videoDetails) }, label: {
Label("Video.download", systemImage: "arrow.down.doc")
})
} else {
Button(action: {
videoPartShouldShowDownloadTip = true
mainVerticalTabViewSelection = 3
isMoreMenuPresented = false
}
}, label: {
Label("Video.download", systemImage: "arrow.down.doc")
})
}, label: {
Label("Video.download", systemImage: "arrow.down.doc")
})
}
Button(action: {
let headers: HTTPHeaders = [
"cookie": "SESSDATA=\(sessdata)",
Expand All @@ -566,6 +562,8 @@ struct VideoDetailView: View {
Label("Video.watch-later", systemImage: "memories.badge.plus")
})
}
}, label: {
Image(systemName: "ellipsis")
})
}
ToolbarItemGroup(placement: .bottomBar) {
Expand Down Expand Up @@ -611,7 +609,6 @@ struct VideoDetailView: View {
.bold()
}
}
.sheet(isPresented: $isDownloadPresented, content: { VideoDownloadView(bvid: videoDetails["BV"]!, videoDetails: videoDetails) })
.sheet(isPresented: $isVideoPlayerPresented, content: {
VideoPlayerView(videoDetails: $videoDetails, videoLink: $videoLink, videoBvid: $videoBvid, videoCID: $videoCID)
.navigationBarHidden(true)
Expand Down

0 comments on commit 72dd037

Please sign in to comment.