Compare commits
1 Commits
tyiu/profi
...
tyiu/navba
| Author | SHA1 | Date | |
|---|---|---|---|
|
5bf5402919
|
@@ -43,9 +43,7 @@ struct UserView: View {
|
||||
let profile = damus_state.profiles.lookup(id: pubkey)
|
||||
ProfileName(pubkey: pubkey, profile: profile, damus: damus_state, show_nip5_domain: false)
|
||||
if let about = profile?.about {
|
||||
let blocks = parse_mentions(content: about, tags: [])
|
||||
let about_string = render_blocks(blocks: blocks, profiles: damus_state.profiles).content.attributed
|
||||
Text(about_string)
|
||||
Text(about)
|
||||
.lineLimit(3)
|
||||
.font(.footnote)
|
||||
}
|
||||
|
||||
@@ -12,7 +12,6 @@ enum EventViewKind {
|
||||
case small
|
||||
case normal
|
||||
case selected
|
||||
case subheadline
|
||||
}
|
||||
|
||||
struct EventView: View {
|
||||
@@ -107,8 +106,6 @@ func eventviewsize_to_font(_ size: EventViewKind) -> Font {
|
||||
return .body
|
||||
case .selected:
|
||||
return .custom("selected", size: 21.0)
|
||||
case .subheadline:
|
||||
return .subheadline
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,8 +117,6 @@ func eventviewsize_to_uifont(_ size: EventViewKind) -> UIFont {
|
||||
return .preferredFont(forTextStyle: .body)
|
||||
case .selected:
|
||||
return .preferredFont(forTextStyle: .title2)
|
||||
case .subheadline:
|
||||
return .preferredFont(forTextStyle: .subheadline)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,8 +15,6 @@ func eventview_pfp_size(_ size: EventViewKind) -> CGFloat {
|
||||
return PFP_SIZE
|
||||
case .selected:
|
||||
return PFP_SIZE
|
||||
case .subheadline:
|
||||
return PFP_SIZE * 0.5
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -57,9 +57,7 @@ struct ParticipantsView: View {
|
||||
let profile = damus_state.profiles.lookup(id: pubkey)
|
||||
ProfileName(pubkey: pubkey, profile: profile, damus: damus_state, show_nip5_domain: false)
|
||||
if let about = profile?.about {
|
||||
let blocks = parse_mentions(content: about, tags: [])
|
||||
let about_string = render_blocks(blocks: blocks, profiles: damus_state.profiles).content.attributed
|
||||
Text(about_string)
|
||||
Text(FollowUserView.markdown.process(about))
|
||||
.lineLimit(3)
|
||||
.font(.footnote)
|
||||
}
|
||||
|
||||
@@ -370,15 +370,9 @@ struct ProfileView: View {
|
||||
let profile_data = damus_state.profiles.lookup(id: profile.pubkey)
|
||||
|
||||
nameSection(profile_data: profile_data)
|
||||
|
||||
if let about = profile_data?.about {
|
||||
let blocks = parse_mentions(content: about, tags: [])
|
||||
let about_string = render_blocks(blocks: blocks, profiles: damus_state.profiles).content.attributed
|
||||
SelectableText(attributedString: about_string, size: .subheadline)
|
||||
} else {
|
||||
Text(verbatim: "")
|
||||
.font(.subheadline)
|
||||
}
|
||||
|
||||
Text(ProfileView.markdown.process(profile_data?.about ?? ""))
|
||||
.font(.subheadline).textSelection(.enabled)
|
||||
|
||||
if let url = profile_data?.website_url {
|
||||
WebsiteLink(url: url)
|
||||
|
||||
@@ -57,6 +57,7 @@ struct SideMenuView: View {
|
||||
.font(.title2)
|
||||
.foregroundColor(textColor())
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
.dynamicTypeSize(.xSmall)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -144,6 +145,7 @@ struct SideMenuView: View {
|
||||
.font(.title3)
|
||||
.foregroundColor(textColor())
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
.dynamicTypeSize(.xSmall)
|
||||
})
|
||||
|
||||
Spacer()
|
||||
@@ -154,6 +156,7 @@ struct SideMenuView: View {
|
||||
Label("", systemImage: "qrcode")
|
||||
.font(.title)
|
||||
.foregroundColor(textColor())
|
||||
.dynamicTypeSize(.xSmall)
|
||||
}).fullScreenCover(isPresented: $showQRCode) {
|
||||
QRCodeView(damus_state: damus_state, pubkey: damus_state.pubkey)
|
||||
}
|
||||
@@ -188,6 +191,7 @@ struct SideMenuView: View {
|
||||
.font(.title2)
|
||||
.foregroundColor(textColor())
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
.dynamicTypeSize(.xSmall)
|
||||
}
|
||||
|
||||
struct SideMenuLabelStyle: LabelStyle {
|
||||
|
||||
Reference in New Issue
Block a user