Add a burger button to open the side menu

This commit is contained in:
Benoit Martins 2025-09-15 11:08:56 +02:00
parent 42997d6891
commit c6291f61d6
3 changed files with 34 additions and 1 deletions

View file

@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "list.svg",
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" fill="#000000" viewBox="0 0 256 256"><path d="M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128ZM40,72H216a8,8,0,0,0,0-16H40a8,8,0,0,0,0,16ZM216,184H40a8,8,0,0,0,0,16H216a8,8,0,0,0,0-16Z"></path></svg>

After

Width:  |  Height:  |  Size: 277 B

View file

@ -405,6 +405,17 @@ struct ContentView: View {
VStack(spacing: 0) {
if searchIsActive == false {
HStack {
Button {
openMenu()
} label: {
Image("list")
.renderingMode(.template)
.resizable()
.foregroundStyle(.white)
.frame(width: 25, height: 25, alignment: .leading)
.padding(.all, 5)
}
if let index = accountProfileViewModel.defaultAccountModelIndex,
index < coreContext.accounts.count {
@ -473,7 +484,7 @@ struct ContentView: View {
Text(String(localized: sharedMainViewModel.indexView == 0 ? "bottom_navigation_contacts_label" : (sharedMainViewModel.indexView == 1 ? "bottom_navigation_calls_label" : (sharedMainViewModel.indexView == 2 ? "bottom_navigation_conversations_label" : "bottom_navigation_meetings_label"))))
.default_text_style_white_800(styleSize: 20)
.padding(.leading, 10)
.padding(.leading, 2)
Spacer()