бургер меню
This commit is contained in:
parent
fc214ed696
commit
c8d71996d9
@ -62,13 +62,23 @@ struct TopBarView: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if isHomeTab{
|
if isHomeTab{
|
||||||
// Заглушка кнопки
|
HStack(spacing: 20) {
|
||||||
Button(action: {
|
// Кнопка поиска
|
||||||
// пока ничего не делаем
|
Button(action: {
|
||||||
}) {
|
// пока ничего не делаем
|
||||||
Image(systemName: "magnifyingglass")
|
}) {
|
||||||
.imageScale(.large)
|
Image(systemName: "magnifyingglass")
|
||||||
.foregroundColor(.primary)
|
.imageScale(.large)
|
||||||
|
.foregroundColor(.primary)
|
||||||
|
}
|
||||||
|
// Кнопка уведомлений
|
||||||
|
Button(action: {
|
||||||
|
// пока ничего не делаем
|
||||||
|
}) {
|
||||||
|
Image(systemName: "bell")
|
||||||
|
.imageScale(.large)
|
||||||
|
.foregroundColor(.primary)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else if isProfileTab {
|
} else if isProfileTab {
|
||||||
NavigationLink(destination: SettingsView(viewModel: viewModel)) {
|
NavigationLink(destination: SettingsView(viewModel: viewModel)) {
|
||||||
|
|||||||
@ -69,11 +69,14 @@ struct MainView: View {
|
|||||||
|
|
||||||
// Боковое меню
|
// Боковое меню
|
||||||
if isSideMenuPresented {
|
if isSideMenuPresented {
|
||||||
SideMenuView(isPresented: $isSideMenuPresented)
|
HStack {
|
||||||
.frame(width: UIScreen.main.bounds.width * 0.8)
|
SideMenuView(isPresented: $isSideMenuPresented)
|
||||||
.offset(x: isSideMenuPresented ? 0 : -UIScreen.main.bounds.width)
|
.frame(width: UIScreen.main.bounds.width * 0.8)
|
||||||
.transition(.move(edge: .leading))
|
Spacer()
|
||||||
.zIndex(1) // Убедимся, что меню поверх всего
|
}
|
||||||
|
.ignoresSafeArea(edges: .vertical) // Игнорируем safe area
|
||||||
|
.transition(.move(edge: .leading))
|
||||||
|
.zIndex(1) // Убедимся, что меню поверх всего
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user