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