- Refactor authentication flow to require endpoint for login and decouple token saving - Add and integrate search functionality for bookmarks - Simplify and improve server settings setup (remove connection test, direct save & login) - Update sidebar/tab navigation to include search and improve structure - Show placeholder image in BookmarkCardView if no image is available, ensuring consistent layout - Improve BookmarkDetailView header and meta info display - Add utility for domain extraction from URLs - General code cleanup and minor UI/UX improvements
43 lines
1.2 KiB
Swift
43 lines
1.2 KiB
Swift
//
|
|
// SidebarTab.swift
|
|
// readeck
|
|
//
|
|
// Created by Ilyas Hallak on 01.07.25.
|
|
//
|
|
|
|
enum SidebarTab: Hashable, CaseIterable, Identifiable {
|
|
case search, all, unread, favorite, archived, article, videos, pictures, tags, settings
|
|
|
|
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 .search: return "Suche"
|
|
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 .search: return "magnifyingglass"
|
|
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"
|
|
}
|
|
}
|
|
}
|