FAB add post
This commit is contained in:
parent
0cd38f3922
commit
9ad744f3f1
@ -43,15 +43,7 @@ struct ProfileContentTabbedGrid: View {
|
|||||||
.cornerRadius(8)
|
.cornerRadius(8)
|
||||||
.font(.subheadline)
|
.font(.subheadline)
|
||||||
|
|
||||||
Button {
|
|
||||||
// Создать пост
|
|
||||||
} label: {
|
|
||||||
Label("Создать", systemImage: "plus")
|
|
||||||
.font(.subheadline)
|
|
||||||
.padding(8)
|
|
||||||
.background(Color.blue.opacity(0.2))
|
|
||||||
.cornerRadius(8)
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
TextField("Поиск", text: $searchQuery)
|
TextField("Поиск", text: $searchQuery)
|
||||||
.padding(.horizontal, 10)
|
.padding(.horizontal, 10)
|
||||||
|
|||||||
@ -30,6 +30,7 @@ struct ProfileTab: View {
|
|||||||
if !isContentLoaded {
|
if !isContentLoaded {
|
||||||
SplashScreenView()
|
SplashScreenView()
|
||||||
} else {
|
} else {
|
||||||
|
ZStack(alignment: .bottomTrailing) {
|
||||||
VStack(spacing: 0) {
|
VStack(spacing: 0) {
|
||||||
// Скрытые NavigationLink для программного перехода
|
// Скрытые NavigationLink для программного перехода
|
||||||
NavigationLink(destination: FollowersView(followers: followers), isActive: $isShowingFollowers) { EmptyView() }
|
NavigationLink(destination: FollowersView(followers: followers), isActive: $isShowingFollowers) { EmptyView() }
|
||||||
@ -51,7 +52,7 @@ struct ProfileTab: View {
|
|||||||
}) {
|
}) {
|
||||||
VStack(spacing: 12) {
|
VStack(spacing: 12) {
|
||||||
header
|
header
|
||||||
// .frame(minHeight: 300)
|
// .frame(minHeight: 300)
|
||||||
.frame(maxWidth: .infinity)
|
.frame(maxWidth: .infinity)
|
||||||
.background(Color(.systemBackground))
|
.background(Color(.systemBackground))
|
||||||
|
|
||||||
@ -66,6 +67,21 @@ struct ProfileTab: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FAB
|
||||||
|
Button(action: {
|
||||||
|
// TODO: Действие для создания поста
|
||||||
|
}) {
|
||||||
|
Image(systemName: "plus")
|
||||||
|
.font(.system(size: 24, weight: .bold))
|
||||||
|
.foregroundColor(.white)
|
||||||
|
.padding()
|
||||||
|
.background(Color.blue)
|
||||||
|
.clipShape(Circle())
|
||||||
|
.shadow(radius: 5)
|
||||||
|
}
|
||||||
|
.padding()
|
||||||
|
}
|
||||||
.navigationBarTitleDisplayMode(.inline)
|
.navigationBarTitleDisplayMode(.inline)
|
||||||
.toolbar {
|
.toolbar {
|
||||||
ToolbarItem(placement: .principal) {
|
ToolbarItem(placement: .principal) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user