Skip to content

Commit

Permalink
Style the empty lists drawer to match Figma
Browse files Browse the repository at this point in the history
  • Loading branch information
mplorentz committed Jan 31, 2025
1 parent f6168ef commit 2e29b50
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 18 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed: while searching for users to add to a list, NIP-05 searches dismiss the view. [#165](https://github.com/verse-pbc/issues/issues/165)
- Fixed a crash when processing a malformed delete (kind 5) event. [#170](https://github.com/verse-pbc/issues/issues/170)
- Fixed: tapping a user on a list causes a crash. [#172](https://github.com/verse-pbc/issues/issues/172)
- Removed link to Listr.lol when list is empty.

### Internal Changes
- Added function for creating a new list and a test verifying list editing. [#112](https://github.com/verse-pbc/issues/issues/112)
Expand Down
17 changes: 14 additions & 3 deletions Nos/Assets/Localization/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -4371,6 +4371,17 @@
}
}
},
"createYourFirstList" : {
"extractionState" : "manual",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Create your first list"
}
}
}
},
"dayAbbreviated" : {
"extractionState" : "manual",
"localizations" : {
Expand Down Expand Up @@ -12552,7 +12563,7 @@
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "It doesn’t look like you have created any lists."
"value" : "It doesn’t look like you have created any lists. Add lists to your feed to filter by topic."
}
}
}
Expand Down Expand Up @@ -14194,7 +14205,7 @@
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Your **@username** is your identity in the Nos community.\u2028\nChoose a name that reflects you or your organization. Make it memorable and distinct!"
"value" : "Your **@username** is your identity in the Nos community.\nChoose a name that reflects you or your organization. Make it memorable and distinct!"
}
},
"es" : {
Expand Down Expand Up @@ -19452,7 +19463,7 @@
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "Well done, you've successfully claimed your **@username**!\u2028\nYou can share this name with other people in the Nostr and Fediverse communities to make it easy to find you."
"value" : "Well done, you've successfully claimed your **@username**!\nYou can share this name with other people in the Nostr and Fediverse communities to make it easy to find you."
}
},
"es" : {
Expand Down
29 changes: 14 additions & 15 deletions Nos/Views/Home/FeedCustomizerView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,20 +56,7 @@ struct FeedCustomizerView: View {
items: feedController.listRowItems,
footer: {
Group {
if feedController.listRowItems.isEmpty {
Group {
Text("Create your own lists on ") +
Text("Listr ")
.foregroundStyle(Color.accent) +
Text(Image(systemName: "link"))
.foregroundStyle(Color.accent)
}
.onTapGesture {
if let url = URL(string: "https://listr.lol/feed") {
UIApplication.shared.open(url)
}
}
} else {
if !feedController.listRowItems.isEmpty {
SecondaryActionButton(
"manageYourLists",
font: .clarity(.semibold, textStyle: .footnote),
Expand All @@ -83,7 +70,19 @@ struct FeedCustomizerView: View {
.padding()
},
noContent: {
Text("noLists")
VStack(spacing: 28) {
Text("noLists")
.font(.clarity(.medium))
.multilineTextAlignment(.center)
SecondaryActionButton(
"createYourFirstList",
font: .clarity(.semibold, textStyle: .footnote)
) {
analytics.feedCustomizerClosed()
shouldNavigateToLists = true
}
}
.padding(24)
}
)
} else {
Expand Down

0 comments on commit 2e29b50

Please sign in to comment.