mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-07-09 10:11:42 +00:00
large titles
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user