forked from mlemgroup/mlem
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update profile headers to be more readable (mlemgroup#590)
- Loading branch information
1 parent
05d2df3
commit 74a1b48
Showing
4 changed files
with
86 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -87,26 +87,59 @@ struct CommunitySidebarHeader: View { | |
|
||
struct SidebarHeaderPreview: PreviewProvider { | ||
static var previews: some View { | ||
VStack { | ||
CommunitySidebarHeader( | ||
title: "TestCommunityWithLongName", | ||
subtitle: "@[email protected]", | ||
avatarSubtext: .constant("Created 3 days ago"), | ||
bannerURL: URL(string: "https://vlemmy.net/pictrs/image/719b61b3-8d8e-4aec-9f15-17be4a081f97.jpeg?format=webp"), | ||
avatarUrl: URL(string: "https://vlemmy.net/pictrs/image/190f2d6a-ac38-448d-ae9b-f6d751eb6e69.png?format=webp"), | ||
label1: "Label 1", | ||
label2: "Label 2" | ||
) | ||
CommunitySidebarHeader( | ||
title: "Test", | ||
subtitle: "@[email protected]", | ||
avatarSubtext: .constant("Created 3 days ago"), | ||
bannerURL: URL(string: "https://vlemmy.net/pictrs/image/719b61b3-8d8e-4aec-9f15-17be4a081f97.jpeg?format=webp"), | ||
avatarUrl: URL(string: "https://vlemmy.net/pictrs/image/190f2d6a-ac38-448d-ae9b-f6d751eb6e69.png?format=webp"), | ||
label1: "Label 1", | ||
label2: "Label 2" | ||
) | ||
Spacer() | ||
ScrollView { | ||
VStack { | ||
CommunitySidebarHeader( | ||
title: "TestCommunityWithLongName", | ||
subtitle: "@[email protected]", | ||
avatarSubtext: .constant("Created 3 days ago"), | ||
bannerURL: URL(string: "https://picsum.photos/seed/mlem-banner/200/300"), | ||
avatarUrl: URL(string: "https://picsum.photos/seed/mlem-avatar/200"), | ||
label1: "Label 1", | ||
label2: "Label 2" | ||
) | ||
Divider() | ||
CommunitySidebarHeader( | ||
title: "Test", | ||
subtitle: "@[email protected]", | ||
avatarSubtext: .constant("Created 3 days ago"), | ||
bannerURL: URL(string: "https://picsum.photos/seed/mlem-banner/200/300"), | ||
avatarUrl: URL(string: "https://picsum.photos/seed/mlem-avatar/200"), | ||
label1: "Label 1", | ||
label2: "Label 2" | ||
) | ||
Divider() | ||
CommunitySidebarHeader( | ||
title: "Test With No Avatar", | ||
subtitle: "@[email protected]", | ||
avatarSubtext: .constant("Created 3 days ago"), | ||
bannerURL: URL(string: "https://picsum.photos/seed/mlem-banner/200/300"), | ||
avatarUrl: nil, | ||
label1: "Label 1", | ||
label2: "Label 2" | ||
) | ||
Divider() | ||
CommunitySidebarHeader( | ||
title: "Test With No Banner", | ||
subtitle: "@[email protected]", | ||
avatarSubtext: .constant("Created 3 days ago"), | ||
bannerURL: nil, | ||
avatarUrl: URL(string: "https://picsum.photos/seed/mlem-avatar/200"), | ||
label1: "Label 1", | ||
label2: "Label 2" | ||
) | ||
Divider() | ||
CommunitySidebarHeader( | ||
title: "Test With No Banner or Avatar", | ||
subtitle: "@[email protected]", | ||
avatarSubtext: .constant("Created 3 days ago"), | ||
bannerURL: nil, | ||
avatarUrl: nil, | ||
label1: "Label 1", | ||
label2: "Label 2" | ||
) | ||
Spacer() | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters