Skip to content

Commit

Permalink
Updated source editor & Feedback Assistant
Browse files Browse the repository at this point in the history
  • Loading branch information
WindowsMEMZ committed Jul 19, 2024
1 parent 6748012 commit de1150f
Show file tree
Hide file tree
Showing 9 changed files with 617 additions and 224 deletions.
8 changes: 4 additions & 4 deletions BAGen.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
8CCFEBFE2ACD1931003ADFEA /* NotoSansSC-Bold.otf in Resources */ = {isa = PBXBuildFile; fileRef = 8CCFEBF22ACD1931003ADFEA /* NotoSansSC-Bold.otf */; };
8CCFEBFF2ACD1931003ADFEA /* NotoSansTC-Medium.otf in Resources */ = {isa = PBXBuildFile; fileRef = 8CCFEBF32ACD1931003ADFEA /* NotoSansTC-Medium.otf */; };
8CCFEC002ACD1931003ADFEA /* NotoSansSC-Regular#6513.otf in Resources */ = {isa = PBXBuildFile; fileRef = 8CCFEBF42ACD1931003ADFEA /* NotoSansSC-Regular#6513.otf */; };
8CE8F1572ADB9A550075B3FD /* SettingsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8CE8F1562ADB9A550075B3FD /* SettingsView.swift */; };
8CE8F1572ADB9A550075B3FD /* FeedbackView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8CE8F1562ADB9A550075B3FD /* FeedbackView.swift */; };
8CF94C2C2C116AAE00831C4F /* Airi_Collection.webp in Resources */ = {isa = PBXBuildFile; fileRef = 8CF949432C116A9500831C4F /* Airi_Collection.webp */; };
8CF94C2D2C116AAE00831C4F /* Airi.webp in Resources */ = {isa = PBXBuildFile; fileRef = 8CF949442C116A9500831C4F /* Airi.webp */; };
8CF94C2E2C116AAE00831C4F /* Akane_BunnyGirl.webp in Resources */ = {isa = PBXBuildFile; fileRef = 8CF949452C116A9500831C4F /* Akane_BunnyGirl.webp */; };
Expand Down Expand Up @@ -807,7 +807,7 @@
8CCFEBF22ACD1931003ADFEA /* NotoSansSC-Bold.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "NotoSansSC-Bold.otf"; sourceTree = "<group>"; };
8CCFEBF32ACD1931003ADFEA /* NotoSansTC-Medium.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "NotoSansTC-Medium.otf"; sourceTree = "<group>"; };
8CCFEBF42ACD1931003ADFEA /* NotoSansSC-Regular#6513.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "NotoSansSC-Regular#6513.otf"; sourceTree = "<group>"; };
8CE8F1562ADB9A550075B3FD /* SettingsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsView.swift; sourceTree = "<group>"; };
8CE8F1562ADB9A550075B3FD /* FeedbackView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FeedbackView.swift; sourceTree = "<group>"; };
8CF949432C116A9500831C4F /* Airi_Collection.webp */ = {isa = PBXFileReference; lastKnownFileType = file; path = Airi_Collection.webp; sourceTree = "<group>"; };
8CF949442C116A9500831C4F /* Airi.webp */ = {isa = PBXFileReference; lastKnownFileType = file; path = Airi.webp; sourceTree = "<group>"; };
8CF949452C116A9500831C4F /* Akane_BunnyGirl.webp */ = {isa = PBXFileReference; lastKnownFileType = file; path = Akane_BunnyGirl.webp; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1601,7 +1601,7 @@
8CFC141D2ACE8F8E00DE14D7 /* MTEditChooserView.swift */,
8CFC141F2ACE8FA000DE14D7 /* MTEditorView.swift */,
8CC889902ADA74D100191A59 /* MTRawEditorView.swift */,
8CE8F1562ADB9A550075B3FD /* SettingsView.swift */,
8CE8F1562ADB9A550075B3FD /* FeedbackView.swift */,
6BD5A6312AC988E7004B05F9 /* Assets.xcassets */,
6BD5A6332AC988E7004B05F9 /* Preview Content */,
);
Expand Down Expand Up @@ -3256,7 +3256,7 @@
8C6912582C48EB5B000F85B4 /* MTExporter.swift in Sources */,
8CFC141E2ACE8F8E00DE14D7 /* MTEditChooserView.swift in Sources */,
8CC889912ADA74D100191A59 /* MTRawEditorView.swift in Sources */,
8CE8F1572ADB9A550075B3FD /* SettingsView.swift in Sources */,
8CE8F1572ADB9A550075B3FD /* FeedbackView.swift in Sources */,
6BB0220B2AC9B67900460189 /* CodeExt.swift in Sources */,
6BD5A62E2AC988E6004B05F9 /* BAGenApp.swift in Sources */,
);
Expand Down
4 changes: 4 additions & 0 deletions BAGen/BAGen.entitlements
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>aps-environment</key>
<string>development</string>
<key>com.apple.developer.aps-environment</key>
<string>development</string>
<key>com.apple.developer.kernel.increased-memory-limit</key>
<true/>
<key>com.apple.developer.sustained-execution</key>
Expand Down
6 changes: 5 additions & 1 deletion BAGen/BAGenApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,9 @@ struct BAGenApp: App {
}

class AppDelegate: NSObject, UIApplicationDelegate {

func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
let tokenString = deviceToken.hexEncodedString()
debugPrint(tokenString)
UserDefaults.standard.set(tokenString, forKey: "UserNotificationToken")
}
}
94 changes: 0 additions & 94 deletions BAGen/CodeExt.swift
Original file line number Diff line number Diff line change
Expand Up @@ -78,100 +78,6 @@ private func drawOutlineAttributedString(
}
}

/// BlueArchive 横屏上方的顶部栏
/// - Parameters:
/// - backAction: 返回按钮执行的操作
/// - navigationTitle: 导航文本
/// - Returns: 视图
@ViewBuilder func BATopBar(backAction: (() -> Void)? = nil, navigationTitle: String? = nil) -> some View {
@State var isSettingsPresented = false
ZStack {
RoundedRectangle(cornerRadius: 8)
.fill(Color(hex: 0xF7F9F9))
.frame(height: 40)
.shadow(color: .black.opacity(0.8), radius: 2, x: 1, y: 2)
HStack {
Image("TopBarLeftImage")
.resizable()
.frame(width: 150, height: 40)
.cornerRadius(8)
Spacer()
}
HStack {
Spacer()
.frame(width: 30)
if let bac = backAction {
Button(action: {
bac()
}, label: {
ZStack {
Circle()
.fill(Color(hex: 0x3D578D))
.frame(width: 35, height: 35)
Image(systemName: "arrow.left")
.foregroundColor(.white)
}
})
.offset(y: 5)
}
if let nt = navigationTitle {
BAText(nt, fontSize: 18, isSystemd: true)
}
Spacer()
Group {
Image("ActionPointImage")
.resizable()
.frame(width: 12, height: 20)
BAText("114/114", fontSize: 16, isSystemd: true, isBold: false)
Image(systemName: "plus")
.font(.system(size: 20))
.foregroundColor(Color(hex: 0x5BCDFE))
Text("/")
.font(.system(size: 16))
.foregroundColor(Color(hex: 0xD0D4D9))
}
Group {
Image("CMoneyImage")
.resizable()
.frame(width: 25, height: 20)
BAText("10,224,509", fontSize: 16, isSystemd: true, isBold: false)
Image(systemName: "plus")
.font(.system(size: 20))
.foregroundColor(Color(hex: 0x5BCDFE))
Text("/")
.font(.system(size: 16))
.foregroundColor(Color(hex: 0xD0D4D9))
}
Group {
Image("CyanStoneImage")
.resizable()
.frame(width: 17, height: 20)
BAText("12,345", fontSize: 16, isSystemd: true, isBold: false)
Image(systemName: "plus")
.font(.system(size: 20))
.foregroundColor(Color(hex: 0x5BCDFE))
Text("/")
.font(.system(size: 16))
.foregroundColor(Color(hex: 0xD0D4D9))
}
Button(action: {
isSettingsPresented = true
}, label: {
Image(systemName: "gearshape.fill")
.resizable()
.frame(width: 20, height: 20)
.foregroundColor(Color(hex: 0x3D578D))
})
.fullScreenCover(isPresented: $isSettingsPresented, content: {SettingsView()})
Spacer()
.frame(width: 10)
}
.offset(y: 5)
}
.frame(height: 40)
.offset(y: -30)
}

extension String {
/// 文本中是否含有二创不适宜内容
var isContainBads: Bool {
Expand Down
Loading

0 comments on commit de1150f

Please sign in to comment.