ios: exact alignment and spacing (#7945)
* ios: exact alignment and spacing * ios: previews of the views changed for alignment and spacing * ci: iOS references of exact alignment and spacing * ios: single check and the time under a received emoji keep their places * ios: deleted text, link strip text, What's new, app version, QR cards and onion hosts keep master's layout; info headers get more space above the avatar; chat row preview with contact requests * ci: iOS references of the review round and of chat rows with contact requests * ios: keep master's tags, requests, group icon, footers, compose strips * ci: iOS references of the views back on master's layout * ios: the pull request holds only the agreed changes, without previews of reverted ones * ios: contact request view as on master
No files matched your search
@@ -370,7 +370,8 @@ struct ChatInfoView: View {
|
||||
VStack(spacing: 8) {
|
||||
let cInfo = chat.chatInfo
|
||||
ChatInfoImage(chat: chat, size: 192, color: Color(uiColor: .tertiarySystemFill))
|
||||
.padding(.vertical, 12)
|
||||
.padding(.top, 20)
|
||||
.padding(.bottom, 12)
|
||||
// show actual display name, alias can be edited in this view
|
||||
let displayName = contact.profile.displayName.trimmingCharacters(in: .whitespacesAndNewlines)
|
||||
let fullName = cInfo.fullName.trimmingCharacters(in: .whitespacesAndNewlines)
|
||||
|
||||
@@ -100,7 +100,7 @@ struct CIChatFeatureView: View {
|
||||
.foregroundColor(iconColor)
|
||||
.scaleEffect(feature.iconScale)
|
||||
.if(terminal) { $0.frame(height: 0) }
|
||||
chatEventText(chatItem, theme.colors.secondary, ts: ts)
|
||||
chatEventText(chatItem, theme.colors.secondary, ts: terminal ? ts : textSpace + ts)
|
||||
.if(terminal) { $0.modifier(terminalLineBox(UIFont.preferredFont(forTextStyle: .caption1), theme.colors.secondary, theme)) }
|
||||
}
|
||||
.padding(terminal ? terminalEventPadding : EdgeInsets(top: 4, leading: 6, bottom: 4, trailing: 6))
|
||||
|
||||
@@ -31,7 +31,7 @@ struct CIGroupInvitationView: View {
|
||||
let v = ItemWithMeta {
|
||||
CIMetaView(chat: chat, chatItem: chatItem, metaColor: theme.colors.secondary, showStatus: false, showEdited: false)
|
||||
} content: { inlineMeta in
|
||||
ZStack(alignment: .bottomTrailing) {
|
||||
ZStack(alignment: Alignment(horizontal: .trailing, vertical: .lastTextBaseline)) {
|
||||
ZStack {
|
||||
VStack(alignment: .leading) {
|
||||
groupInfoView(action)
|
||||
|
||||
@@ -20,7 +20,7 @@ struct DeletedItemView: View {
|
||||
ItemWithMeta {
|
||||
CIMetaView(chat: chat, chatItem: chatItem, metaColor: theme.colors.secondary)
|
||||
} content: { inlineMeta in
|
||||
HStack(alignment: .bottom, spacing: 0) {
|
||||
HStack(alignment: .lastTextBaseline, spacing: 0) {
|
||||
Text(chatItem.content.text)
|
||||
.foregroundColor(theme.colors.secondary)
|
||||
.italic()
|
||||
|
||||
@@ -48,7 +48,7 @@ struct FramedItemView: View {
|
||||
invertedMaterial: useWhiteMetaColor && !terminal
|
||||
)
|
||||
} content: { inlineMeta in
|
||||
ZStack(alignment: .bottomTrailing) {
|
||||
ZStack(alignment: metaPlacement.reserved ? Alignment(horizontal: .trailing, vertical: .lastTextBaseline) : .bottomTrailing) {
|
||||
VStack(alignment: .leading, spacing: 0) {
|
||||
if chatItem.isReport {
|
||||
if chatItem.meta.itemDeleted == nil {
|
||||
@@ -164,9 +164,9 @@ struct FramedItemView: View {
|
||||
.modifier(MessageLastLine())
|
||||
.padding(EdgeInsets(top: terminalEmojiTopGap, leading: chatItemTextPadding, bottom: terminalEmojiBottomGap, trailing: chatItemTextPadding))
|
||||
} else {
|
||||
VStack {
|
||||
VStack(spacing: 4) {
|
||||
emojiText(chatItem.content.text)
|
||||
Text("")
|
||||
Text("").font(.caption)
|
||||
}
|
||||
.padding(.vertical, 6)
|
||||
.padding(.horizontal, 12)
|
||||
|
||||
@@ -129,6 +129,7 @@ struct ChatItemContentView<Content: View>: View {
|
||||
@EnvironmentObject var chatModel: ChatModel
|
||||
@EnvironmentObject var theme: AppTheme
|
||||
@Environment(\.revealed) var revealed: Bool
|
||||
@Environment(\.terminalLayout) private var terminal
|
||||
@ObservedObject var chat: Chat
|
||||
@ObservedObject var im: ItemsModel
|
||||
var chatItem: ChatItem
|
||||
@@ -197,7 +198,7 @@ struct ChatItemContentView<Content: View>: View {
|
||||
|
||||
private func eventItemView() -> some View {
|
||||
ChatEventWithMeta(chatItem: chatItem) { ts in
|
||||
CIEventView(eventText: eventItemViewText(theme.colors.secondary, ts))
|
||||
CIEventView(eventText: eventItemViewText(theme.colors.secondary, terminal ? ts : textSpace + ts))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -154,8 +154,6 @@ struct GroupChatInfoView: View {
|
||||
if showUserSupportChat {
|
||||
UserSupportChatNavLink(chat: chat, groupInfo: groupInfo, scrollToItemId: $scrollToItemId)
|
||||
}
|
||||
} header: {
|
||||
Text("")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -314,14 +312,14 @@ struct GroupChatInfoView: View {
|
||||
}
|
||||
|
||||
private func groupInfoHeader() -> some View {
|
||||
VStack {
|
||||
VStack(spacing: 8) {
|
||||
let cInfo = chat.chatInfo
|
||||
// show actual display name, alias can be edited in this view
|
||||
let displayName = (cInfo.groupInfo?.groupProfile.displayName ?? cInfo.displayName).trimmingCharacters(in: .whitespacesAndNewlines)
|
||||
let fullName = cInfo.fullName.trimmingCharacters(in: .whitespacesAndNewlines)
|
||||
ChatInfoImage(chat: chat, size: 192, color: Color(uiColor: .tertiarySystemFill))
|
||||
.padding(.top, 12)
|
||||
.padding()
|
||||
.padding(.top, 20)
|
||||
.padding(.bottom, 12)
|
||||
Text(displayName)
|
||||
.font(.largeTitle)
|
||||
.multilineTextAlignment(.center)
|
||||
|
||||
@@ -515,10 +515,10 @@ struct GroupMemberInfoView: View {
|
||||
}
|
||||
|
||||
private func groupMemberInfoHeader(_ mem: GroupMember) -> some View {
|
||||
VStack {
|
||||
VStack(spacing: 8) {
|
||||
MemberProfileImage(mem, size: 192, color: Color(uiColor: .tertiarySystemFill))
|
||||
.padding(.top, 12)
|
||||
.padding()
|
||||
.padding(.top, 20)
|
||||
.padding(.bottom, 12)
|
||||
// show alias if set, alias cannot be edited in this view
|
||||
let displayName = mem.displayName.trimmingCharacters(in: .whitespacesAndNewlines)
|
||||
let fullName = mem.fullName.trimmingCharacters(in: .whitespacesAndNewlines)
|
||||
|
||||
@@ -51,6 +51,12 @@ struct ChatItemClipped: ViewModifier {
|
||||
tailVisible: tail
|
||||
)
|
||||
: .roundRect(radius: msgRectMaxRadius)
|
||||
case .sndDeleted, .rcvDeleted, .sndModerated, .rcvModerated, .rcvBlocked:
|
||||
return terminal
|
||||
? .roundRect(radius: 8)
|
||||
: tailEnabled
|
||||
? .bubble(padding: ci.chatDir.sent ? .trailing : .leading, tailVisible: false)
|
||||
: .roundRect(radius: msgRectMaxRadius)
|
||||
case .rcvGroupInvitation, .sndGroupInvitation:
|
||||
return .roundRect(radius: msgRectMaxRadius)
|
||||
default: return .roundRect(radius: 8)
|
||||
|
||||
@@ -73,6 +73,7 @@ struct NtfModeSelector: View {
|
||||
.resizable()
|
||||
.scaledToFill()
|
||||
.frame(width: mode.icon == "bolt" ? 14 : 18, height: 18)
|
||||
.frame(width: 18)
|
||||
.foregroundColor(selection == mode ? theme.colors.primary : theme.colors.secondary)
|
||||
VStack(alignment: .leading, spacing: 4) {
|
||||
Text(mode.label)
|
||||
|
||||
@@ -395,10 +395,8 @@ struct SettingsView: View {
|
||||
.navigationTitle("Notifications")
|
||||
.modifier(ThemedBackground(grouped: true))
|
||||
} label: {
|
||||
HStack {
|
||||
notificationsIcon()
|
||||
Text("Notifications")
|
||||
}
|
||||
let (icon, color) = notificationsIcon()
|
||||
settingsRow(icon, color: color) { Text("Notifications") }
|
||||
}
|
||||
.disabled(chatModel.chatRunning != true)
|
||||
|
||||
@@ -555,7 +553,7 @@ struct SettingsView: View {
|
||||
case error(LocalizedStringKey, String)
|
||||
}
|
||||
|
||||
private func notificationsIcon() -> some View {
|
||||
private func notificationsIcon() -> (String, Color) {
|
||||
let icon: String
|
||||
let color: Color
|
||||
switch (chatModel.tokenStatus) {
|
||||
@@ -585,9 +583,7 @@ struct SettingsView: View {
|
||||
icon = "bolt"
|
||||
color = theme.colors.secondary
|
||||
}
|
||||
return Image(systemName: icon)
|
||||
.padding(.trailing, 9)
|
||||
.foregroundColor(color)
|
||||
return (icon, color)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 7.0 KiB |
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 200 KiB After Width: | Height: | Size: 200 KiB |
|
Before Width: | Height: | Size: 161 KiB After Width: | Height: | Size: 161 KiB |
|
Before Width: | Height: | Size: 115 KiB After Width: | Height: | Size: 115 KiB |
|
Before Width: | Height: | Size: 198 KiB After Width: | Height: | Size: 198 KiB |
|
Before Width: | Height: | Size: 160 KiB After Width: | Height: | Size: 160 KiB |
|
Before Width: | Height: | Size: 115 KiB After Width: | Height: | Size: 115 KiB |
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 52 KiB |
|
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 76 KiB |
|
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 63 KiB |
|
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 76 KiB |
|
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 63 KiB |
|
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 64 KiB |
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
|
Before Width: | Height: | Size: 253 KiB After Width: | Height: | Size: 253 KiB |
|
Before Width: | Height: | Size: 255 KiB After Width: | Height: | Size: 255 KiB |
|
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 58 KiB |
|
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 57 KiB |
|
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 66 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 9.4 KiB |
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 9.3 KiB |
|
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 162 KiB After Width: | Height: | Size: 163 KiB |
|
Before Width: | Height: | Size: 129 KiB After Width: | Height: | Size: 129 KiB |
|
Before Width: | Height: | Size: 93 KiB After Width: | Height: | Size: 93 KiB |
|
Before Width: | Height: | Size: 163 KiB After Width: | Height: | Size: 163 KiB |
|
Before Width: | Height: | Size: 131 KiB After Width: | Height: | Size: 131 KiB |
|
Before Width: | Height: | Size: 94 KiB After Width: | Height: | Size: 94 KiB |
|
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 82 KiB |
|
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 68 KiB |
|
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 81 KiB After Width: | Height: | Size: 81 KiB |
|
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 67 KiB |
|
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 175 KiB After Width: | Height: | Size: 175 KiB |
|
Before Width: | Height: | Size: 148 KiB After Width: | Height: | Size: 148 KiB |
|
Before Width: | Height: | Size: 111 KiB After Width: | Height: | Size: 111 KiB |
|
Before Width: | Height: | Size: 177 KiB After Width: | Height: | Size: 177 KiB |
|
Before Width: | Height: | Size: 149 KiB After Width: | Height: | Size: 150 KiB |
|
Before Width: | Height: | Size: 111 KiB After Width: | Height: | Size: 111 KiB |
|
Before Width: | Height: | Size: 134 KiB After Width: | Height: | Size: 134 KiB |
|
Before Width: | Height: | Size: 113 KiB After Width: | Height: | Size: 114 KiB |
|
Before Width: | Height: | Size: 88 KiB After Width: | Height: | Size: 88 KiB |
|
Before Width: | Height: | Size: 133 KiB After Width: | Height: | Size: 132 KiB |
|
Before Width: | Height: | Size: 113 KiB After Width: | Height: | Size: 114 KiB |
|
Before Width: | Height: | Size: 88 KiB After Width: | Height: | Size: 88 KiB |
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
|
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 49 KiB |
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 43 KiB |