mirror of
https://github.com/writeas/writefreely-swiftui-multiplatform.git
synced 2024-11-15 01:11:02 +00:00
Hide everything but "All Posts" in CollectionListView if logged out
This commit is contained in:
parent
83acb6e832
commit
8695a8fe4a
@ -14,15 +14,17 @@ struct CollectionListView: View {
|
||||
NavigationLink(destination: PostListView(selectedCollection: nil, showAllPosts: true)) {
|
||||
Text("All Posts")
|
||||
}
|
||||
NavigationLink(destination: PostListView(selectedCollection: nil, showAllPosts: false)) {
|
||||
Text(model.account.server == "https://write.as" ? "Anonymous" : "Drafts")
|
||||
}
|
||||
Section(header: Text("Your Blogs")) {
|
||||
ForEach(collections, id: \.alias) { collection in
|
||||
NavigationLink(
|
||||
destination: PostListView(selectedCollection: collection, showAllPosts: false)
|
||||
) {
|
||||
Text(collection.title)
|
||||
if model.account.isLoggedIn {
|
||||
NavigationLink(destination: PostListView(selectedCollection: nil, showAllPosts: false)) {
|
||||
Text(model.account.server == "https://write.as" ? "Anonymous" : "Drafts")
|
||||
}
|
||||
Section(header: Text("Your Blogs")) {
|
||||
ForEach(collections, id: \.alias) { collection in
|
||||
NavigationLink(
|
||||
destination: PostListView(selectedCollection: collection, showAllPosts: false)
|
||||
) {
|
||||
Text(collection.title)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user