mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2025-02-17 02:05:13 +00:00
Accounts: Replace lock / robot emojis with SF Symbols
This commit is contained in:
parent
f01a742845
commit
3f17afa8ac
2 changed files with 36 additions and 23 deletions
|
@ -132,9 +132,19 @@ struct AccountDetailHeaderView: View {
|
||||||
accountAvatarView
|
accountAvatarView
|
||||||
HStack(alignment: .firstTextBaseline) {
|
HStack(alignment: .firstTextBaseline) {
|
||||||
VStack(alignment: .leading, spacing: 0) {
|
VStack(alignment: .leading, spacing: 0) {
|
||||||
EmojiTextApp(.init(stringValue: account.safeDisplayName), emojis: account.emojis)
|
HStack(alignment: .center, spacing: 2) {
|
||||||
.font(.scaledHeadline)
|
EmojiTextApp(.init(stringValue: account.safeDisplayName), emojis: account.emojis)
|
||||||
.emojiSize(Font.scaledHeadlinePointSize)
|
.font(.scaledHeadline)
|
||||||
|
.emojiSize(Font.scaledHeadlinePointSize)
|
||||||
|
if account.bot {
|
||||||
|
Text(Image(systemName: "gearshape.fill"))
|
||||||
|
.font(.footnote)
|
||||||
|
}
|
||||||
|
if account.locked {
|
||||||
|
Text(Image(systemName: "lock.fill"))
|
||||||
|
.font(.footnote)
|
||||||
|
}
|
||||||
|
}
|
||||||
Text("@\(account.acct)")
|
Text("@\(account.acct)")
|
||||||
.font(.scaledCallout)
|
.font(.scaledCallout)
|
||||||
.foregroundColor(.gray)
|
.foregroundColor(.gray)
|
||||||
|
@ -196,12 +206,6 @@ struct AccountDetailHeaderView: View {
|
||||||
private var joinedAtView: some View {
|
private var joinedAtView: some View {
|
||||||
if let joinedAt = viewModel.account?.createdAt.asDate {
|
if let joinedAt = viewModel.account?.createdAt.asDate {
|
||||||
HStack(spacing: 4) {
|
HStack(spacing: 4) {
|
||||||
if account.bot {
|
|
||||||
Text("🤖")
|
|
||||||
}
|
|
||||||
if account.locked {
|
|
||||||
Text("🔒")
|
|
||||||
}
|
|
||||||
Image(systemName: "calendar")
|
Image(systemName: "calendar")
|
||||||
Text("account.joined")
|
Text("account.joined")
|
||||||
Text(joinedAt, style: .date)
|
Text(joinedAt, style: .date)
|
||||||
|
|
|
@ -35,25 +35,27 @@ struct StatusRowHeaderView: View {
|
||||||
AvatarView(url: status.account.avatar, size: .status)
|
AvatarView(url: status.account.avatar, size: .status)
|
||||||
}
|
}
|
||||||
VStack(alignment: .leading, spacing: 2) {
|
VStack(alignment: .leading, spacing: 2) {
|
||||||
HStack(alignment: .center, spacing: 4) {
|
HStack(alignment: .firstTextBaseline, spacing: 2) {
|
||||||
EmojiTextApp(.init(stringValue: status.account.safeDisplayName), emojis: status.account.emojis)
|
Group {
|
||||||
.font(.scaledSubheadline)
|
EmojiTextApp(.init(stringValue: status.account.safeDisplayName), emojis: status.account.emojis)
|
||||||
.emojiSize(Font.scaledSubheadlinePointSize)
|
.font(.scaledSubheadline)
|
||||||
.fontWeight(.semibold)
|
.emojiSize(Font.scaledSubheadlinePointSize)
|
||||||
.lineLimit(1)
|
.fontWeight(.semibold)
|
||||||
.layoutPriority(1)
|
.lineLimit(1)
|
||||||
|
accountBadgeView
|
||||||
|
.font(.footnote)
|
||||||
|
}
|
||||||
|
.layoutPriority(1)
|
||||||
if theme.avatarPosition == .leading {
|
if theme.avatarPosition == .leading {
|
||||||
dateView
|
dateView
|
||||||
.font(.scaledFootnote)
|
.font(.scaledFootnote)
|
||||||
.foregroundColor(.gray)
|
.foregroundColor(.gray)
|
||||||
.lineLimit(1)
|
.lineLimit(1)
|
||||||
.offset(y: 1)
|
|
||||||
} else {
|
} else {
|
||||||
Text("@\(theme.displayFullUsername ? status.account.acct : status.account.username)")
|
Text("@\(theme.displayFullUsername ? status.account.acct : status.account.username)")
|
||||||
.font(.scaledFootnote)
|
.font(.scaledFootnote)
|
||||||
.foregroundColor(.gray)
|
.foregroundColor(.gray)
|
||||||
.lineLimit(1)
|
.lineLimit(1)
|
||||||
.offset(y: 1)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if theme.avatarPosition == .top {
|
if theme.avatarPosition == .top {
|
||||||
|
@ -71,13 +73,20 @@ struct StatusRowHeaderView: View {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private var accountBadgeView: Text {
|
||||||
|
if viewModel.status.account.bot {
|
||||||
|
return Text(Image(systemName: "gearshape.fill")) + Text(" ")
|
||||||
|
} else if viewModel.status.account.locked {
|
||||||
|
return Text(Image(systemName: "lock.fill")) + Text(" ")
|
||||||
|
}
|
||||||
|
return Text("")
|
||||||
|
}
|
||||||
|
|
||||||
private var dateView: Text {
|
private var dateView: Text {
|
||||||
Text(viewModel.status.account.bot ? "🤖 " : "") +
|
Text(status.createdAt.relativeFormatted) +
|
||||||
Text(viewModel.status.account.locked ? "🔒 " : "") +
|
Text(" ⸱ ") +
|
||||||
Text(status.createdAt.relativeFormatted) +
|
Text(Image(systemName: viewModel.status.visibility.iconName))
|
||||||
Text(" ⸱ ") +
|
|
||||||
Text(Image(systemName: viewModel.status.visibility.iconName))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ViewBuilder
|
@ViewBuilder
|
||||||
|
|
Loading…
Reference in a new issue