Support more instances
This commit is contained in:
parent
c7a61ae271
commit
8921e6c8df
|
@ -35,11 +35,13 @@ public struct InstanceInfoSection: View {
|
||||||
}
|
}
|
||||||
.listRowBackground(theme.primaryBackgroundColor)
|
.listRowBackground(theme.primaryBackgroundColor)
|
||||||
|
|
||||||
Section("Instance rules") {
|
if let rules = instance.rules {
|
||||||
ForEach(instance.rules) { rule in
|
Section("Instance rules") {
|
||||||
Text(rule.text)
|
ForEach(rules) { rule in
|
||||||
|
Text(rule.text)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
.listRowBackground(theme.primaryBackgroundColor)
|
||||||
}
|
}
|
||||||
.listRowBackground(theme.primaryBackgroundColor)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,9 +34,9 @@ public struct Instance: Codable {
|
||||||
public let email: String
|
public let email: String
|
||||||
public let version: String
|
public let version: String
|
||||||
public let stats: Stats
|
public let stats: Stats
|
||||||
public let languages: [String]
|
public let languages: [String]?
|
||||||
public let registrations: Bool
|
public let registrations: Bool
|
||||||
public let thumbnail: URL?
|
public let thumbnail: URL?
|
||||||
public let configuration: Configuration
|
public let configuration: Configuration?
|
||||||
public let rules: [Rule]
|
public let rules: [Rule]?
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue