mirror of
https://github.com/yattee/yattee.git
synced 2025-04-25 16:16:29 +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)
|
.foregroundColor(model.currentItem.isNil ? .secondary : .accentColor)
|
||||||
.lineLimit(1)
|
.lineLimit(1)
|
||||||
|
|
||||||
Text(model.currentItem?.video?.author ?? "Yattee v0.1")
|
Text(model.currentItem?.video?.author ?? "Yattee v\(appVersion)")
|
||||||
.fontWeight(model.currentItem.isNil ? .light : .bold)
|
.fontWeight(model.currentItem.isNil ? .light : .bold)
|
||||||
.font(.system(size: 10))
|
.font(.system(size: 10))
|
||||||
.foregroundColor(.secondary)
|
.foregroundColor(.secondary)
|
||||||
@ -109,6 +109,10 @@ struct PlayerControlsView<Content: View>: View {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private var appVersion: String {
|
||||||
|
Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? "unknown"
|
||||||
|
}
|
||||||
|
|
||||||
private var progressViewValue: Double {
|
private var progressViewValue: Double {
|
||||||
[model.time?.seconds, model.videoDuration].compactMap { $0 }.min() ?? 0
|
[model.time?.seconds, model.videoDuration].compactMap { $0 }.min() ?? 0
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user