large titles

This commit is contained in:
spaced4ndy
2024-10-31 20:39:31 +04:00
parent 6090cfb6d9
commit 66430d7fbd
3 changed files with 11 additions and 9 deletions
+1 -1
View File
@@ -199,7 +199,7 @@ final class ChatModel: ObservableObject {
@Published var draftChatId: String?
@Published var networkInfo = UserNetworkInfo(networkType: .other, online: true)
// server operators
@Published var serverOperators: [ServerOperator] = [ServerOperator.sampleData1, ServerOperator.sampleData2, ServerOperator.sampleData3]
@Published var serverOperators: [ServerOperator] = [ServerOperator.sampleData1, ServerOperator.sampleData2] // ServerOperator.sampleData3
var messageDelivery: Dictionary<Int64, () -> Void> = [:]
@@ -93,12 +93,10 @@ struct ChooseServerOperators: View {
let icon = checked ? "checkmark.circle.fill" : "circle"
let iconColor = checked ? theme.colors.primary : Color(uiColor: .tertiaryLabel).asAnotherColorFromSecondary(theme)
HStack(spacing: 10) {
Image(serverOperator.info.logo)
Image(serverOperator.info.largeLogo)
.resizable()
.scaledToFit()
.frame(width: 30, height: 30)
Text(serverOperator.name)
.font(.title2)
.frame(height: 48)
Spacer()
Image(systemName: icon)
.resizable()
+8 -4
View File
@@ -1204,23 +1204,27 @@ public struct ServerOperatorInfo: Decodable {
public var description: String
public var website: String
public var logo: String
public var largeLogo: String // TODO light/dark
}
public let operatorsInfo: Dictionary<OperatorTag, ServerOperatorInfo> = [
.simplex: ServerOperatorInfo(
description: "SimpleX Chat preset servers",
website: "https://simplex.chat",
logo: "icon-transparent"
logo: "icon-transparent",
largeLogo: "logo"
),
.xyz: ServerOperatorInfo(
description: "XYZ servers",
website: "XYZ website",
logo: "shield"
logo: "shield",
largeLogo: "logo"
),
.demo: ServerOperatorInfo(
description: "Demo operator",
website: "Demo website",
logo: "icon-transparent"
logo: "icon-transparent",
largeLogo: "logo"
)
]
@@ -1257,7 +1261,7 @@ public struct ServerOperator: Identifiable, Decodable {
public var id: Int64 { operatorId }
public var info: ServerOperatorInfo {
operatorsInfo[tag] ?? ServerOperatorInfo(description: "Default", website: "Default", logo: "icon-transparent")
operatorsInfo[tag] ?? ServerOperatorInfo(description: "Default", website: "Default", logo: "icon-transparent", largeLogo: "logo")
}
public static var sampleData1 = ServerOperator(