Skip to content

Commit

Permalink
Update AboutView.swift
Browse files Browse the repository at this point in the history
  • Loading branch information
WindowsMEMZ authored Nov 19, 2023
1 parent 71cdc2b commit 9a3e27c
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions DarockBili Watch App/Others/AboutView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,19 @@ import SwiftUI
import DarockKit

struct AboutView: View {
@State var signVerifyStatus = ""
@State var verSign = "*Darock \(CodingTime.getCodingTime()) \(Bundle.main.infoDictionary?["CFBundleShortVersionString"] as! String) \(Bundle.main.infoDictionary?["CFBundleVersion"] as! String) Salt*".DDMD5Encrypt(.lowercase16)
var body: some View {
var body: some View {
NavigationStack {
List {
Section {
Text("喵哩喵哩 v\(Bundle.main.infoDictionary?["CFBundleShortVersionString"] as! String) Build \(Bundle.main.infoDictionary?["CFBundleVersion"] as! String)")
Text("编译时间: \(CodingTime.getCodingTime())")
Text("版本签名:\(Text(verSign).foregroundColor(signVerifyStatus == "OK" ? .green : signVerifyStatus == "Fcuk" ? .red : .yellow))")
Text("遇到问题?在设置页面点击“反馈问题”进行反馈,感谢您的支持!")
}
Section {
Text("Credits:")
Text("Darock Studio")
Label("来自 \(Text("Darock Studio").bold()) 的消息:欢迎加群 248036605 获取最新消息谢谢喵!", systemImage: "arrowshape.up")
Text("ThreeManager785")
}
Section {
NavigationLink(destination: {OpenSource()}, label: {
Expand All @@ -33,17 +31,7 @@ struct AboutView: View {
}
.bold()
}
.onAppear {
DarockKit.Network.shared.requestString("https://api.darock.top/bili/verify/list") { respStr, isSuccess in
if isSuccess {
if respStr.contains(verSign) {
signVerifyStatus = "OK"
} else {
signVerifyStatus = "Fcuk"
}
}
}
}

}
struct OpenSource: View {
var body: some View {
Expand Down

0 comments on commit 9a3e27c

Please sign in to comment.