mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
fix: ios widget webp support (#19469)
This commit is contained in:
parent
bcfc967d77
commit
2e13543d5d
2 changed files with 42 additions and 24 deletions
|
|
@ -24,27 +24,11 @@ struct ImageEntry: TimelineEntry {
|
|||
struct ImmichWidgetView: View {
|
||||
var entry: ImageEntry
|
||||
|
||||
func getErrorText(_ error: WidgetError?) -> String {
|
||||
switch error {
|
||||
case .noLogin:
|
||||
return "Login to Immich"
|
||||
|
||||
case .fetchFailed:
|
||||
return "Unable to connect to your Immich instance"
|
||||
|
||||
case .albumNotFound:
|
||||
return "Album not found"
|
||||
|
||||
default:
|
||||
return "An unknown error occured"
|
||||
}
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
if entry.image == nil {
|
||||
VStack {
|
||||
Image("LaunchImage")
|
||||
Text(getErrorText(entry.error))
|
||||
Text(entry.error?.errorDescription ?? "")
|
||||
.minimumScaleFactor(0.25)
|
||||
.multilineTextAlignment(.center)
|
||||
.foregroundStyle(.secondary)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue