mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-04-17 20:08:31 +00:00
Remove unnecessary menu
This commit is contained in:
parent
ca9f5ffe1f
commit
ef09f6c412
3 changed files with 71 additions and 74 deletions
|
|
@ -2,6 +2,6 @@ import Foundation
|
||||||
|
|
||||||
public enum AppGitInfo {
|
public enum AppGitInfo {
|
||||||
public static let branch = "master"
|
public static let branch = "master"
|
||||||
public static let commit = "5bbbbe5d7"
|
public static let commit = "ca9f5ffe1"
|
||||||
public static let tag = "6.1.0-alpha"
|
public static let tag = "6.1.0-alpha"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -598,65 +598,37 @@ struct ContentView: View {
|
||||||
}
|
}
|
||||||
.padding(.trailing, sharedMainViewModel.indexView == 2 ? 10 : 0)
|
.padding(.trailing, sharedMainViewModel.indexView == 2 ? 10 : 0)
|
||||||
|
|
||||||
if sharedMainViewModel.indexView == 3 {
|
if sharedMainViewModel.indexView == 0 {
|
||||||
Button {
|
|
||||||
NotificationCenter.default.post(name: MeetingsListViewModel.ScrollToTodayNotification, object: nil)
|
|
||||||
} label: {
|
|
||||||
Image("calendar")
|
|
||||||
.renderingMode(.template)
|
|
||||||
.resizable()
|
|
||||||
.foregroundStyle(.white)
|
|
||||||
.frame(width: 25, height: 25, alignment: .leading)
|
|
||||||
.padding(.all, 10)
|
|
||||||
}
|
|
||||||
.padding(.trailing, 10)
|
|
||||||
} else if sharedMainViewModel.indexView != 2 {
|
|
||||||
Menu {
|
Menu {
|
||||||
if sharedMainViewModel.indexView == 0 {
|
Button {
|
||||||
Button {
|
sharedMainViewModel.displayedFriend = nil
|
||||||
sharedMainViewModel.displayedFriend = nil
|
isMenuOpen = false
|
||||||
isMenuOpen = false
|
magicSearch.changeAllContact(allContactBool: true)
|
||||||
magicSearch.changeAllContact(allContactBool: true)
|
magicSearch.searchForContacts()
|
||||||
magicSearch.searchForContacts()
|
} label: {
|
||||||
} label: {
|
HStack {
|
||||||
HStack {
|
Text("contacts_list_filter_popup_see_all")
|
||||||
Text("contacts_list_filter_popup_see_all")
|
Spacer()
|
||||||
Spacer()
|
if magicSearch.allContact {
|
||||||
if magicSearch.allContact {
|
Image("green-check")
|
||||||
Image("green-check")
|
.resizable()
|
||||||
.resizable()
|
.frame(width: 25, height: 25, alignment: .leading)
|
||||||
.frame(width: 25, height: 25, alignment: .leading)
|
.padding(.all, 10)
|
||||||
.padding(.all, 10)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
Button {
|
|
||||||
sharedMainViewModel.displayedFriend = nil
|
Button {
|
||||||
isMenuOpen = false
|
sharedMainViewModel.displayedFriend = nil
|
||||||
magicSearch.changeAllContact(allContactBool: false)
|
isMenuOpen = false
|
||||||
magicSearch.searchForContacts()
|
magicSearch.changeAllContact(allContactBool: false)
|
||||||
} label: {
|
magicSearch.searchForContacts()
|
||||||
HStack {
|
} label: {
|
||||||
Text(!magicSearch.linphoneDomain ? String(localized: "contacts_list_filter_popup_see_sip_only") : String(format: String(localized: "contacts_list_filter_popup_see_linphone_only"), Bundle.main.displayName))
|
HStack {
|
||||||
Spacer()
|
Text(!magicSearch.linphoneDomain ? String(localized: "contacts_list_filter_popup_see_sip_only") : String(format: String(localized: "contacts_list_filter_popup_see_linphone_only"), Bundle.main.displayName))
|
||||||
if !magicSearch.allContact {
|
Spacer()
|
||||||
Image("green-check")
|
if !magicSearch.allContact {
|
||||||
.resizable()
|
Image("green-check")
|
||||||
.frame(width: 25, height: 25, alignment: .leading)
|
|
||||||
.padding(.all, 10)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Button(role: .destructive) {
|
|
||||||
isMenuOpen = false
|
|
||||||
isShowDeleteAllHistoryPopup.toggle()
|
|
||||||
} label: {
|
|
||||||
HStack {
|
|
||||||
Text("menu_delete_history")
|
|
||||||
Spacer()
|
|
||||||
Image("trash-simple-red")
|
|
||||||
.resizable()
|
.resizable()
|
||||||
.frame(width: 25, height: 25, alignment: .leading)
|
.frame(width: 25, height: 25, alignment: .leading)
|
||||||
.padding(.all, 10)
|
.padding(.all, 10)
|
||||||
|
|
@ -675,6 +647,30 @@ struct ContentView: View {
|
||||||
.onTapGesture {
|
.onTapGesture {
|
||||||
isMenuOpen = true
|
isMenuOpen = true
|
||||||
}
|
}
|
||||||
|
} else if sharedMainViewModel.indexView == 1 {
|
||||||
|
Button {
|
||||||
|
isShowDeleteAllHistoryPopup.toggle()
|
||||||
|
} label: {
|
||||||
|
Image("trash-simple")
|
||||||
|
.renderingMode(.template)
|
||||||
|
.resizable()
|
||||||
|
.foregroundStyle(.white)
|
||||||
|
.frame(width: 25, height: 25, alignment: .leading)
|
||||||
|
.padding(.all, 10)
|
||||||
|
}
|
||||||
|
.padding(.trailing, 10)
|
||||||
|
} else if sharedMainViewModel.indexView == 3 {
|
||||||
|
Button {
|
||||||
|
NotificationCenter.default.post(name: MeetingsListViewModel.ScrollToTodayNotification, object: nil)
|
||||||
|
} label: {
|
||||||
|
Image("calendar")
|
||||||
|
.renderingMode(.template)
|
||||||
|
.resizable()
|
||||||
|
.foregroundStyle(.white)
|
||||||
|
.frame(width: 25, height: 25, alignment: .leading)
|
||||||
|
.padding(.all, 10)
|
||||||
|
}
|
||||||
|
.padding(.trailing, 10)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.frame(maxWidth: .infinity)
|
.frame(maxWidth: .infinity)
|
||||||
|
|
|
||||||
|
|
@ -137,26 +137,27 @@ struct SideMenuAccountRow: View {
|
||||||
.padding(.trailing, -8)
|
.padding(.trailing, -8)
|
||||||
}
|
}
|
||||||
|
|
||||||
Menu {
|
Button {
|
||||||
Button {
|
accountProfileViewModel.accountModelIndex = CoreContext.shared.accounts.firstIndex(where: {$0.displayName == model.displayName})
|
||||||
accountProfileViewModel.accountModelIndex = CoreContext.shared.accounts.firstIndex(where: {$0.displayName == model.displayName})
|
withAnimation {
|
||||||
withAnimation {
|
isOpen = false
|
||||||
isOpen = false
|
isShowAccountProfileFragment = true
|
||||||
isShowAccountProfileFragment = true
|
|
||||||
}
|
|
||||||
} label: {
|
|
||||||
Label("drawer_menu_manage_account", systemImage: "arrow.right.circle")
|
|
||||||
}
|
}
|
||||||
} label: {
|
} label: {
|
||||||
VStack {
|
Image("user-circle-gear")
|
||||||
Image("dots-three-vertical")
|
.renderingMode(.template)
|
||||||
.renderingMode(.template)
|
.resizable()
|
||||||
.resizable()
|
.foregroundColor(Color.grayMain2c600)
|
||||||
.foregroundColor(Color.grayMain2c500)
|
.scaledToFit()
|
||||||
.scaledToFit()
|
.frame(height: 25)
|
||||||
.frame(height: 25)
|
}
|
||||||
|
.frame(width: 30, height: 30)
|
||||||
|
.onTapGesture {
|
||||||
|
accountProfileViewModel.accountModelIndex = CoreContext.shared.accounts.firstIndex(where: {$0.displayName == model.displayName})
|
||||||
|
withAnimation {
|
||||||
|
isOpen = false
|
||||||
|
isShowAccountProfileFragment = true
|
||||||
}
|
}
|
||||||
.frame(width: 30, height: 30)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.frame(alignment: .trailing)
|
.frame(alignment: .trailing)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue