Files
.github
Backports
Extensions
Fixtures
Model
Open in Yattee
Shared
Assets.xcassets
Channels
Documents
Gestures
Home
Modifiers
Navigation
Player
Playlists
Search
Settings
Subscriptions
Trending
Videos
Views
AccentButton.swift
CacheStatusHeader.swift
ClearQueueButton.swift
ContentItemView.swift
ControlsBar.swift
DetailBadge.swift
FavoriteButton.swift
HideShortsButtons.swift
HideWatchedButtons.swift
HomeSettingsButton.swift
LazyView.swift
ListingStyleButtons.swift
MPVPlayerView.swift
OpenSettingsButton.swift
OpenVideosView.swift
PlaceholderCell.swift
PlaceholderListItem.swift
PlaceholderProgressView.swift
PlayingIndicatorView.swift
PopularView.swift
RequestErrorButton.swift
SettingsButtons.swift
SettingsPickerModifier.swift
ShareButton.swift
SignInRequiredView.swift
VideoContextMenuView.swift
WelcomeScreen.swift
ar.lproj
ars.lproj
az.lproj
ca.lproj
cs.lproj
de.lproj
en.lproj
es.lproj
fa.lproj
fi.lproj
fr.lproj
hi.lproj
it.lproj
ja.lproj
ko.lproj
nb-NO.lproj
nl.lproj
pl.lproj
pt-BR.lproj
pt.lproj
ro.lproj
ru.lproj
sv.lproj
tr.lproj
uk.lproj
zh-Hans.lproj
zh-Hant.lproj
Constants.swift
Debounce.swift
Defaults.swift
Delay.swift
EnvironmentValues.swift
HTTPStatus.swift
LanguageCodes.swift
MenuCommands.swift
OpenURLHandler.swift
PreferenceKeys.swift
SiestaConfiguration.swift
Strings.swift
Throttle.swift
URLParser.swift
URLTester.swift
UserAgentManager.swift
Yattee.entitlements
YatteeApp.swift
Shared Tests
Tests Apple TV
Tests iOS
Tests macOS
Vendor
Xcode-config
Yattee.xcodeproj
fastlane
iOS
macOS
tvOS
.gitignore
.swift-version
.swiftformat
.swiftlint.yml
CHANGELOG.md
Gemfile
Gemfile.lock
LICENSE
README.md
yattee/Shared/Views/RequestErrorButton.swift
2023-02-05 14:24:12 +01:00

24 lines
553 B
Swift

import Siesta
import SwiftUI
struct RequestErrorButton: View {
var error: RequestError?
var body: some View {
if let error {
Button {
NavigationModel.shared.presentRequestErrorAlert(error)
} label: {
Label("Error", systemImage: "exclamationmark.circle.fill")
.foregroundColor(Color("AppRedColor"))
}
}
}
}
struct RequestErrorButton_Previews: PreviewProvider {
static var previews: some View {
RequestErrorButton()
}
}