AllDebrid is another debrid provider. Add support to Ferrite in addition to RealDebrid. The overall debrid login backend has changed to accomodate for a more agnostic app structure where more services can be added as needed. Also add some cosmetic changes to search so filters can be added while searching for a phrase. Signed-off-by: kingbri <bdashore3@proton.me>
36 lines
832 B
Swift
36 lines
832 B
Swift
//
|
|
// DebridLabelView.swift
|
|
// Ferrite
|
|
//
|
|
// Created by Brian Dashore on 11/27/22.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
struct DebridLabelView: View {
|
|
@EnvironmentObject var debridManager: DebridManager
|
|
|
|
var result: SearchResult
|
|
|
|
let debridAbbreviation: String
|
|
|
|
var body: some View {
|
|
Text(debridAbbreviation)
|
|
.fontWeight(.bold)
|
|
.padding(2)
|
|
.background {
|
|
Group {
|
|
switch debridManager.matchSearchResult(result: result) {
|
|
case .full:
|
|
Color.green
|
|
case .partial:
|
|
Color.orange
|
|
case .none:
|
|
Color.red
|
|
}
|
|
}
|
|
.cornerRadius(4)
|
|
.opacity(0.5)
|
|
}
|
|
}
|
|
}
|