mirror of
https://github.com/yattee/yattee.git
synced 2024-12-22 13:33:42 +00:00
Display project version number
This commit is contained in:
parent
db9f7e5f5d
commit
3b7d54aab2
@ -36,7 +36,7 @@ struct PlayerControlsView<Content: View>: View {
|
||||
.foregroundColor(model.currentItem.isNil ? .secondary : .accentColor)
|
||||
.lineLimit(1)
|
||||
|
||||
Text(model.currentItem?.video?.author ?? "Yattee v0.1")
|
||||
Text(model.currentItem?.video?.author ?? "Yattee v\(appVersion)")
|
||||
.fontWeight(model.currentItem.isNil ? .light : .bold)
|
||||
.font(.system(size: 10))
|
||||
.foregroundColor(.secondary)
|
||||
@ -109,6 +109,10 @@ struct PlayerControlsView<Content: View>: View {
|
||||
#endif
|
||||
}
|
||||
|
||||
private var appVersion: String {
|
||||
Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? "unknown"
|
||||
}
|
||||
|
||||
private var progressViewValue: Double {
|
||||
[model.time?.seconds, model.videoDuration].compactMap { $0 }.min() ?? 0
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user