бургер меню

This commit is contained in:
cheykrym 2025-08-13 02:57:40 +03:00
parent fc214ed696
commit c8d71996d9
2 changed files with 25 additions and 12 deletions

View File

@ -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)) {

View File

@ -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) // Убедимся, что меню поверх всего
}
}
}