mirror of
https://github.com/yattee/yattee.git
synced 2026-02-20 01:39:46 +00:00
Yattee v2 rewrite
This commit is contained in:
51
Yattee/Models/Navigation/ChannelTab.swift
Normal file
51
Yattee/Models/Navigation/ChannelTab.swift
Normal file
@@ -0,0 +1,51 @@
|
||||
//
|
||||
// ChannelTab.swift
|
||||
// Yattee
|
||||
//
|
||||
// Navigation tabs for channel content views.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
/// Represents different content tabs available on a channel page.
|
||||
enum ChannelTab: String, CaseIterable, Identifiable {
|
||||
case about
|
||||
case videos
|
||||
case playlists
|
||||
case shorts
|
||||
case streams
|
||||
|
||||
var id: String { rawValue }
|
||||
|
||||
/// Localized title for the tab.
|
||||
var title: String {
|
||||
switch self {
|
||||
case .about:
|
||||
return String(localized: "channel.tab.about")
|
||||
case .videos:
|
||||
return String(localized: "channel.tab.videos")
|
||||
case .playlists:
|
||||
return String(localized: "channel.tab.playlists")
|
||||
case .shorts:
|
||||
return String(localized: "channel.tab.shorts")
|
||||
case .streams:
|
||||
return String(localized: "channel.tab.streams")
|
||||
}
|
||||
}
|
||||
|
||||
/// SF Symbol name for the tab icon.
|
||||
var systemImage: String {
|
||||
switch self {
|
||||
case .about:
|
||||
return "info.circle.fill"
|
||||
case .videos:
|
||||
return "play.rectangle.fill"
|
||||
case .playlists:
|
||||
return "list.bullet.rectangle.fill"
|
||||
case .shorts:
|
||||
return "bolt.fill"
|
||||
case .streams:
|
||||
return "video.fill"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user