Fix toolbar tabs

This commit is contained in:
Arkadiusz Fal
2022-11-18 22:22:57 +01:00
parent c31a5ee2e0
commit 414b6210c0
5 changed files with 29 additions and 14 deletions

View File

@@ -2,6 +2,19 @@ import Defaults
import Foundation
struct VideoDetailsTool: Identifiable {
static let all = [
Self(icon: "info.circle", name: "Info", page: .info),
Self(icon: "wand.and.stars", name: "Inspector", page: .inspector),
Self(icon: "bookmark", name: "Chapters", page: .chapters),
Self(icon: "text.bubble", name: "Comments", page: .comments),
Self(icon: "rectangle.stack.fill", name: "Related", page: .related),
Self(icon: "list.number", name: "Queue", page: .queue)
]
static func find(for page: VideoDetails.DetailsPage) -> Self? {
all.first { $0.page == page }
}
var id: String {
page.rawValue
}