- Split TabView and Sidebar logic into PhoneTabView, PadSidebarView, SidebarTab, and BookmarkState for better device adaptation - Remove old SettingsViewModel, introduce SettingsGeneralViewModel and SettingsServerViewModel for modular settings - Update BookmarksView and BookmarksViewModel for new paginated and filtered data model - Clean up and modularize settings UI (SettingsGeneralView, SettingsServerView, FontSettingsView) - Remove obsolete files (old TabView, File.swift, SettingsViewModel, etc.) - Add BookmarksPageDto and update related data flow - Various UI/UX improvements and code cleanup BREAKING: Settings and navigation structure refactored, old settings logic removed
33 lines
1020 B
Swift
33 lines
1020 B
Swift
enum SidebarTab: Hashable, CaseIterable, Identifiable {
|
|
case all, unread, favorite, archived, settings, article, videos, pictures, tags
|
|
|
|
var id: Self { self }
|
|
|
|
var label: String {
|
|
switch self {
|
|
case .all: return "Alle"
|
|
case .unread: return "Ungelesen"
|
|
case .favorite: return "Favoriten"
|
|
case .archived: return "Archiv"
|
|
case .settings: return "Einstellungen"
|
|
case .article: return "Artikel"
|
|
case .videos: return "Videos"
|
|
case .pictures: return "Bilder"
|
|
case .tags: return "Tags"
|
|
}
|
|
}
|
|
|
|
var systemImage: String {
|
|
switch self {
|
|
case .unread: return "house"
|
|
case .favorite: return "heart"
|
|
case .archived: return "archivebox"
|
|
case .settings: return "gear"
|
|
case .all: return "list.bullet"
|
|
case .article: return "doc.plaintext"
|
|
case .videos: return "film"
|
|
case .pictures: return "photo"
|
|
case .tags: return "tag"
|
|
}
|
|
}
|
|
} |