Explorar o código

add new mode fb and fix bugs fb

alqindiirsyam hai 1 ano
pai
achega
8f17a170ca
Modificáronse 50 ficheiros con 546 adicións e 103 borrados
  1. 94 38
      appbuilder-ios/AppBuilder/AppBuilder/SecondTabViewController.swift
  2. 1 1
      appbuilder-ios/AppBuilder/AppBuilder/ViewController.swift
  3. 21 0
      appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/nx_mic.imageset/Contents.json
  4. BIN=BIN
      appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/nx_mic.imageset/nx_mic.png
  5. 21 0
      appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/nx_search_bar.imageset/Contents.json
  6. BIN=BIN
      appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/nx_search_bar.imageset/nx_search_bar.png
  7. 21 0
      appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/nx_search_bar_dark.imageset/Contents.json
  8. BIN=BIN
      appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/nx_search_bar_dark.imageset/nx_search_bar_dark.png
  9. 21 0
      appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/nx_setting_sb.imageset/Contents.json
  10. BIN=BIN
      appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/nx_setting_sb.imageset/nx_setting_sb.png
  11. 21 0
      appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/pb_button_background_vtcst.imageset/Contents.json
  12. BIN=BIN
      appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/pb_button_background_vtcst.imageset/pb_button_background_vtcst.png
  13. 21 0
      appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/pb_button_background_vtcst_left.imageset/Contents.json
  14. BIN=BIN
      appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/pb_button_background_vtcst_left.imageset/pb_button_background_vtcst_left.png
  15. BIN=BIN
      appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/pb_button_hrz_anim_cc.imageset/pb_button_hrz_anim_cc.png
  16. BIN=BIN
      appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/pb_button_hrz_anim_chat.imageset/pb_button_hrz_anim_chat.png
  17. BIN=BIN
      appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/pb_button_hrz_anim_commerce.imageset/pb_button_hrz_anim_commerce.png
  18. BIN=BIN
      appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/pb_button_hrz_anim_conversation.imageset/pb_button_hrz_anim_conversation.png
  19. BIN=BIN
      appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/pb_button_hrz_anim_more.imageset/pb_button_hrz_anim_more.png
  20. BIN=BIN
      appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/pb_button_hrz_anim_news.imageset/pb_button_hrz_anim_news.png
  21. BIN=BIN
      appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/pb_button_hrz_anim_notif_center.imageset/pb_button_hrz_anim_notif_center.png
  22. BIN=BIN
      appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/pb_button_hrz_anim_post.imageset/pb_button_hrz_anim_post.png
  23. BIN=BIN
      appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/pb_button_hrz_anim_smart_features.imageset/pb_button_hrz_anim_smart_features.png
  24. BIN=BIN
      appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/pb_button_hrz_anim_stream.imageset/pb_button_hrz_anim_stream.png
  25. 21 0
      appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/pb_button_vtcst_cc.imageset/Contents.json
  26. BIN=BIN
      appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/pb_button_vtcst_cc.imageset/pb_button_vtcst_cc.png
  27. 21 0
      appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/pb_button_vtcst_chat.imageset/Contents.json
  28. BIN=BIN
      appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/pb_button_vtcst_chat.imageset/pb_button_vtcst_chat.png
  29. 21 0
      appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/pb_button_vtcst_commerce.imageset/Contents.json
  30. BIN=BIN
      appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/pb_button_vtcst_commerce.imageset/pb_button_vtcst_commerce.png
  31. 21 0
      appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/pb_button_vtcst_notif_center.imageset/Contents.json
  32. BIN=BIN
      appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/pb_button_vtcst_notif_center.imageset/pb_button_vtcst_notif_center.png
  33. 21 0
      appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/pb_button_vtcst_stream.imageset/Contents.json
  34. BIN=BIN
      appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/pb_button_vtcst_stream.imageset/pb_button_vtcst_stream.png
  35. 21 0
      appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/pb_side_tab_vtc.imageset/Contents.json
  36. BIN=BIN
      appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/pb_side_tab_vtc.imageset/pb_side_tab_vtc.png
  37. 21 0
      appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/pb_side_tab_vtc_left.imageset/Contents.json
  38. BIN=BIN
      appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/pb_side_tab_vtc_left.imageset/pb_side_tab_vtc_left.png
  39. 35 0
      appbuilder-ios/NexilisLite/NexilisLite/Source/Extension.swift
  40. 91 46
      appbuilder-ios/NexilisLite/NexilisLite/Source/FloatingButton/FloatingButton.swift
  41. 10 0
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/BNIView/BNIBookingWebView.swift
  42. 5 2
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Chat/ChatGPTBotView.swift
  43. 5 2
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Chat/EditorGroup.swift
  44. 5 2
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Chat/EditorPersonal.swift
  45. 5 2
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Contact/ContactCallViewController.swift
  46. 5 2
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/AddFriendTableViewController.swift
  47. 5 2
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/BroadcastMembersTableViewController.swift
  48. 2 2
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/ConfigureFloatingButton.swift
  49. 5 2
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/ContactChatViewController.swift
  50. 5 2
      appbuilder-ios/NexilisLite/NexilisLite/Source/View/Streaming/SeminarListViewController.swift

+ 94 - 38
appbuilder-ios/AppBuilder/AppBuilder/SecondTabViewController.swift

@@ -10,7 +10,7 @@ import FMDB
 import NexilisLite
 import Speech
 
-class SecondTabViewController: UIViewController, UIScrollViewDelegate, UIGestureRecognizerDelegate {
+class SecondTabViewController: UIViewController, UIScrollViewDelegate, UIGestureRecognizerDelegate, UITextFieldDelegate {
     
     var isChooser: ((String, String) -> ())?
     
@@ -34,6 +34,10 @@ class SecondTabViewController: UIViewController, UIScrollViewDelegate, UIGesture
     
     var noData = false
     
+    let textViewSearch = UITextField()
+    let imageVoiceSb = UIImageView()
+    let imageNewChatSb = UIImageView()
+    
     override var preferredStatusBarStyle: UIStatusBarStyle {
         return self.traitCollection.userInterfaceStyle == .dark ? .default : .lightContent // Change this to .default for black text color
     }
@@ -44,10 +48,13 @@ class SecondTabViewController: UIViewController, UIScrollViewDelegate, UIGesture
         searchController.searchResultsUpdater = self
         searchController.searchBar.autocapitalizationType = .none
         searchController.searchBar.delegate = self
-        searchController.searchBar.setMagnifyingGlassColorTo(color: self.traitCollection.userInterfaceStyle == .dark ? .white : .black)
-        searchController.searchBar.updateHeight(height: 36, radius: 18, borderColor: self.traitCollection.userInterfaceStyle == .dark ? UIColor.white.cgColor : UIColor.black.cgColor)
+//        searchController.searchBar.setMagnifyingGlassColorTo(color: self.traitCollection.userInterfaceStyle == .dark ? .white : .black)
+//        searchController.searchBar.updateHeight(height: 30, radius: 15, borderColor: UIColor.clear.cgColor)
+        searchController.searchBar.setImage(UIImage(), for: .search, state: .normal)
+        searchController.searchBar.setPositionAdjustment(UIOffset(horizontal: 10, vertical: 0), for: .search)
+        searchController.searchBar.setCustomBackgroundImage(image: UIImage(named: self.traitCollection.userInterfaceStyle == .dark ? "nx_search_bar_dark" : "nx_search_bar", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!)
         searchController.obscuresBackgroundDuringPresentation = false
-        searchController.searchBar.searchTextField.attributedPlaceholder = NSAttributedString(string: "Search chats & messages".localized(), attributes: [NSAttributedString.Key.foregroundColor: UIColor.gray, NSAttributedString.Key.font: UIFont.systemFont(ofSize: 16)])
+        searchController.searchBar.searchTextField.attributedPlaceholder = NSAttributedString(string: "Search...".localized(), attributes: [NSAttributedString.Key.foregroundColor: UIColor.gray, NSAttributedString.Key.font: UIFont.systemFont(ofSize: 11)])
         return searchController
     }()
     
@@ -99,30 +106,30 @@ class SecondTabViewController: UIViewController, UIScrollViewDelegate, UIGesture
             }
         })
         
-        var childrenMenu : [UIAction] = []
-        
-        if(isAdmin){
-            childrenMenu.append(UIAction(title: "Broadcast Message".localized(), image: UIImage(systemName: "envelope.open"), handler: {[weak self](_) in
-                let controller = AppStoryBoard.Palio.instance.instantiateViewController(identifier: "broadcastNav")
-                self?.navigationController?.present(controller, animated: true, completion: nil)
-            }))
-        }
-        
-        let startConvIcon = resizeImage(image: self.traitCollection.userInterfaceStyle == .dark ?  UIImage(systemName: "square.and.pencil")!.withTintColor(.white) : UIImage(systemName: "square.and.pencil")!, targetSize: CGSize(width: 25, height: 25))
-        let viewStartConv = UIButton(frame: CGRect(x: 0, y: 0, width: startConvIcon.size.width, height: startConvIcon.size.height))
-        viewStartConv.setImage(startConvIcon, for: .normal)
-        viewStartConv.addTarget(self, action: #selector(startConversation), for: .touchUpInside)
-        let brodcastIcon = resizeImage(image: self.traitCollection.userInterfaceStyle == .dark ? UIImage(named: "ic_broadcast")!.withTintColor(.white) : UIImage(named: "ic_broadcast")!, targetSize: CGSize(width: 25, height: 25))
-        let viewbrodcast = UIButton(frame: CGRect(x: 0, y: 0, width: brodcastIcon.size.width, height: brodcastIcon.size.height))
-        viewbrodcast.setImage(brodcastIcon, for: .normal)
-        viewbrodcast.addTarget(self, action: #selector(openBroadcast), for: .touchUpInside)
+//        var childrenMenu : [UIAction] = []
+//        
+//        if(isAdmin){
+//            childrenMenu.append(UIAction(title: "Broadcast Message".localized(), image: UIImage(systemName: "envelope.open"), handler: {[weak self](_) in
+//                let controller = AppStoryBoard.Palio.instance.instantiateViewController(identifier: "broadcastNav")
+//                self?.navigationController?.present(controller, animated: true, completion: nil)
+//            }))
+//        }
         
-        menuItem = UIBarButtonItem(customView: viewStartConv)
-        menuBroadcast = UIBarButtonItem(customView: viewbrodcast)
+//        let startConvIcon = resizeImage(image: self.traitCollection.userInterfaceStyle == .dark ?  UIImage(systemName: "square.and.pencil")!.withTintColor(.white) : UIImage(systemName: "square.and.pencil")!, targetSize: CGSize(width: 25, height: 25))
+//        let viewStartConv = UIButton(frame: CGRect(x: 0, y: 0, width: startConvIcon.size.width, height: startConvIcon.size.height))
+//        viewStartConv.setImage(startConvIcon, for: .normal)
+//        viewStartConv.addTarget(self, action: #selector(startConversation), for: .touchUpInside)
+//        let brodcastIcon = resizeImage(image: self.traitCollection.userInterfaceStyle == .dark ? UIImage(named: "ic_broadcast")!.withTintColor(.white) : UIImage(named: "ic_broadcast")!, targetSize: CGSize(width: 25, height: 25))
+//        let viewbrodcast = UIButton(frame: CGRect(x: 0, y: 0, width: brodcastIcon.size.width, height: brodcastIcon.size.height))
+//        viewbrodcast.setImage(brodcastIcon, for: .normal)
+//        viewbrodcast.addTarget(self, action: #selector(openBroadcast), for: .touchUpInside)
+//        
+//        menuItem = UIBarButtonItem(customView: viewStartConv)
+//        menuBroadcast = UIBarButtonItem(customView: viewbrodcast)
         
 //        menuItem = UIBarButtonItem(image: UIImage(systemName: "square.and.pencil"), style: .plain, target: self, action: #selector(startConversation))
 //        menuBroadcast = UIBarButtonItem(image: UIImage(systemName: "info.bubble"), style: .plain, target: self, action: #selector(openBroadcast))
-        voiceItem = UIBarButtonItem(image: UIImage(systemName: "mic.fill"), style: .plain, target: self, action: #selector(recordAudio))
+//        voiceItem = UIBarButtonItem(image: UIImage(systemName: "mic.fill"), style: .plain, target: self, action: #selector(recordAudio))
         
         definesPresentationContext = true
         
@@ -157,6 +164,9 @@ class SecondTabViewController: UIViewController, UIScrollViewDelegate, UIGesture
         if ViewController.isExpandButton {
             ViewController.expandButton()
         }
+        if textViewSearch.isFirstResponder {
+            textViewSearch.resignFirstResponder()
+        }
     }
     
     @objc func openBroadcast() {
@@ -375,16 +385,57 @@ class SecondTabViewController: UIViewController, UIScrollViewDelegate, UIGesture
         navigationController?.navigationBar.tintColor = self.traitCollection.userInterfaceStyle == .dark ? .white : .black
         navigationController?.navigationBar.overrideUserInterfaceStyle = self.traitCollection.userInterfaceStyle == .dark ? .dark : .light
         navigationController?.navigationBar.barStyle = .default
-        tabBarController?.navigationItem.leftBarButtonItem = voiceItem
-        let myData = User.getData(pin: User.getMyPin())
-        if User.isOfficial(official_account: myData?.official ?? "") || User.isOfficialRegular(official_account: myData?.official ?? "") || User.isInternal(userType: myData?.userType ?? "") {
-            let fixedSpace = UIBarButtonItem(barButtonSystemItem: .fixedSpace, target: nil, action: nil)
-            fixedSpace.width = 15.0
-            tabBarController?.navigationItem.rightBarButtonItems = [menuBroadcast, fixedSpace, menuItem]
-        } else {
-            tabBarController?.navigationItem.rightBarButtonItem = menuItem
-        }
-        tabBarController?.navigationItem.searchController = searchController
+//        tabBarController?.navigationItem.leftBarButtonItem = voiceItem
+//        let myData = User.getData(pin: User.getMyPin())
+//        if User.isOfficial(official_account: myData?.official ?? "") || User.isOfficialRegular(official_account: myData?.official ?? "") || User.isInternal(userType: myData?.userType ?? "") {
+//            let fixedSpace = UIBarButtonItem(barButtonSystemItem: .fixedSpace, target: nil, action: nil)
+//            fixedSpace.width = 15.0
+//            tabBarController?.navigationItem.rightBarButtonItems = [menuBroadcast, fixedSpace, menuItem]
+//        } else {
+//            tabBarController?.navigationItem.rightBarButtonItem = menuItem
+//        }
+//        tabBarController?.navigationItem.searchController = searchController
+        let customView = UIView(frame: CGRect(x: 0, y: 0, width: self.view.bounds.width, height: 30))
+        customView.isUserInteractionEnabled = true
+        
+        let imageViewSearch = UIImageView(image: UIImage(named: self.traitCollection.userInterfaceStyle == .dark ? "nx_search_bar_dark" : "nx_search_bar", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!)
+        imageViewSearch.contentMode = .scaleToFill
+        customView.addSubview(imageViewSearch)
+        imageViewSearch.anchor(top: customView.topAnchor, left: customView.leftAnchor, bottom: customView.bottomAnchor, right: customView.rightAnchor, height: 30)
+        imageViewSearch.isUserInteractionEnabled = true
+        
+        let imageSetting = UIImageView(image: UIImage(named: "nx_setting_sb", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!)
+        imageSetting.contentMode = .scaleToFill
+        imageViewSearch.addSubview(imageSetting)
+        imageSetting.anchor(top: imageViewSearch.topAnchor, right: customView.rightAnchor, paddingTop: 5, paddingRight: 18, width: 20, height: 20)
+        imageSetting.isUserInteractionEnabled = true
+        imageSetting.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(settingTapped)))
+        
+        imageVoiceSb.image = UIImage(named: "nx_mic", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!
+        imageVoiceSb.contentMode = .scaleAspectFit
+        imageViewSearch.addSubview(imageVoiceSb)
+        imageVoiceSb.anchor(top: imageViewSearch.topAnchor, right: imageSetting.leftAnchor, paddingTop: 5, paddingRight: 15, width: 20, height: 20)
+        imageVoiceSb.isUserInteractionEnabled = true
+        imageVoiceSb.isHidden = true
+        imageVoiceSb.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(recordAudio)))
+        
+        imageNewChatSb.image = UIImage(systemName: "square.and.pencil")!
+        imageNewChatSb.tintColor = .nxColor
+        imageNewChatSb.contentMode = .scaleAspectFit
+        imageViewSearch.addSubview(imageNewChatSb)
+        imageNewChatSb.anchor(top: imageViewSearch.topAnchor, right: imageVoiceSb.leftAnchor, paddingTop: 5, paddingRight: 15, width: 20, height: 20)
+        imageNewChatSb.isUserInteractionEnabled = true
+        imageNewChatSb.isHidden = true
+        imageNewChatSb.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(startConversation)))
+        
+        textViewSearch.placeholder = "Search...".localized()
+        textViewSearch.isUserInteractionEnabled = true
+        imageViewSearch.addSubview(textViewSearch)
+        textViewSearch.font = .systemFont(ofSize: 11)
+        textViewSearch.anchor(top: imageViewSearch.topAnchor, left: imageViewSearch.leftAnchor, bottom: imageViewSearch.bottomAnchor, right: imageViewSearch.rightAnchor, paddingTop: 5, paddingLeft: 20, paddingBottom: 5, paddingRight: 120)
+        textViewSearch.delegate = self
+        
+        tabBarController?.navigationItem.titleView = customView
         let lang = UserDefaults.standard.string(forKey: "i18n_language")
         speechRecognizer = SFSpeechRecognizer(locale: Locale(identifier: lang ?? "en"))
         backgroundImage.backgroundColor = self.traitCollection.userInterfaceStyle == .dark ? .black : .white
@@ -424,10 +475,10 @@ class SecondTabViewController: UIViewController, UIScrollViewDelegate, UIGesture
         if segment.selectedSegmentIndex == 0 {
             Utils.inTabChats = true
 //            searchController.searchBar.placeholder = "Search chats & messages".localized()
-            searchController.searchBar.searchTextField.attributedPlaceholder = NSAttributedString(string: "Search chats & messages".localized(), attributes: [NSAttributedString.Key.foregroundColor: UIColor.gray, NSAttributedString.Key.font: UIFont.systemFont(ofSize: 16)])
+//            searchController.searchBar.searchTextField.attributedPlaceholder = NSAttributedString(string: "Search chats & messages".localized(), attributes: [NSAttributedString.Key.foregroundColor: UIColor.gray, NSAttributedString.Key.font: UIFont.systemFont(ofSize: 16)])
         } else {
 //            searchController.searchBar.placeholder = "Search groups name".localized()
-            searchController.searchBar.searchTextField.attributedPlaceholder = NSAttributedString(string: "Search groups name".localized(), attributes: [NSAttributedString.Key.foregroundColor: UIColor.gray, NSAttributedString.Key.font: UIFont.systemFont(ofSize: 16)])
+//            searchController.searchBar.searchTextField.attributedPlaceholder = NSAttributedString(string: "Search groups name".localized(), attributes: [NSAttributedString.Key.foregroundColor: UIColor.gray, NSAttributedString.Key.font: UIFont.systemFont(ofSize: 16)])
         }
 //        removeAllData()
 //        getData()
@@ -451,6 +502,11 @@ class SecondTabViewController: UIViewController, UIScrollViewDelegate, UIGesture
         }
     }
     
+    @objc func settingTapped() {
+        imageVoiceSb.isHidden = !imageVoiceSb.isHidden
+        imageNewChatSb.isHidden = !imageNewChatSb.isHidden
+    }
+    
     @objc func onReloadTab(notification: NSNotification) {
         DispatchQueue.main.async {
             self.getData()
@@ -532,11 +588,11 @@ class SecondTabViewController: UIViewController, UIScrollViewDelegate, UIGesture
         case 1:
             Utils.inTabChats = false
 //            searchController.searchBar.placeholder = "Search groups name".localized()
-            searchController.searchBar.searchTextField.attributedPlaceholder = NSAttributedString(string: "Search groups name".localized(), attributes: [NSAttributedString.Key.foregroundColor: UIColor.gray, NSAttributedString.Key.font: UIFont.systemFont(ofSize: 16)])
+//            searchController.searchBar.searchTextField.attributedPlaceholder = NSAttributedString(string: "Search groups name".localized(), attributes: [NSAttributedString.Key.foregroundColor: UIColor.gray, NSAttributedString.Key.font: UIFont.systemFont(ofSize: 16)])
         default:
             Utils.inTabChats = true
 //            searchController.searchBar.placeholder = "Search chats & messages".localized()
-            searchController.searchBar.searchTextField.attributedPlaceholder = NSAttributedString(string: "Search chats & messages".localized(), attributes: [NSAttributedString.Key.foregroundColor: UIColor.gray, NSAttributedString.Key.font: UIFont.systemFont(ofSize: 16)])
+//            searchController.searchBar.searchTextField.attributedPlaceholder = NSAttributedString(string: "Search chats & messages".localized(), attributes: [NSAttributedString.Key.foregroundColor: UIColor.gray, NSAttributedString.Key.font: UIFont.systemFont(ofSize: 16)])
         }
         filterContentForSearchText(searchController.searchBar.text!)
     }

+ 1 - 1
appbuilder-ios/AppBuilder/AppBuilder/ViewController.swift

@@ -74,7 +74,7 @@ class ViewController: UITabBarController, UITabBarControllerDelegate, SettingMAB
         navigationController?.view.backgroundColor = self.traitCollection.userInterfaceStyle == .dark ? .black : .white
         Utils.addBackground(view: self.navigationController?.view)
         let topBorder = CALayer()
-        topBorder.backgroundColor = UIColor.gray.withAlphaComponent(0.5).cgColor
+        topBorder.backgroundColor = UIColor.borderTabColor.cgColor
         topBorder.frame = CGRect(x: 0, y: 0, width: tabBar.frame.size.width, height: 1)
         tabBar.layer.addSublayer(topBorder)
         

+ 21 - 0
appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/nx_mic.imageset/Contents.json

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

BIN=BIN
appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/nx_mic.imageset/nx_mic.png


+ 21 - 0
appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/nx_search_bar.imageset/Contents.json

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

BIN=BIN
appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/nx_search_bar.imageset/nx_search_bar.png


+ 21 - 0
appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/nx_search_bar_dark.imageset/Contents.json

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

BIN=BIN
appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/nx_search_bar_dark.imageset/nx_search_bar_dark.png


+ 21 - 0
appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/nx_setting_sb.imageset/Contents.json

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

BIN=BIN
appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/nx_setting_sb.imageset/nx_setting_sb.png


+ 21 - 0
appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/pb_button_background_vtcst.imageset/Contents.json

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

BIN=BIN
appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/pb_button_background_vtcst.imageset/pb_button_background_vtcst.png


+ 21 - 0
appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/pb_button_background_vtcst_left.imageset/Contents.json

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

BIN=BIN
appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/pb_button_background_vtcst_left.imageset/pb_button_background_vtcst_left.png


BIN=BIN
appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/pb_button_hrz_anim_cc.imageset/pb_button_hrz_anim_cc.png


BIN=BIN
appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/pb_button_hrz_anim_chat.imageset/pb_button_hrz_anim_chat.png


BIN=BIN
appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/pb_button_hrz_anim_commerce.imageset/pb_button_hrz_anim_commerce.png


BIN=BIN
appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/pb_button_hrz_anim_conversation.imageset/pb_button_hrz_anim_conversation.png


BIN=BIN
appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/pb_button_hrz_anim_more.imageset/pb_button_hrz_anim_more.png


BIN=BIN
appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/pb_button_hrz_anim_news.imageset/pb_button_hrz_anim_news.png


BIN=BIN
appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/pb_button_hrz_anim_notif_center.imageset/pb_button_hrz_anim_notif_center.png


BIN=BIN
appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/pb_button_hrz_anim_post.imageset/pb_button_hrz_anim_post.png


BIN=BIN
appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/pb_button_hrz_anim_smart_features.imageset/pb_button_hrz_anim_smart_features.png


BIN=BIN
appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/pb_button_hrz_anim_stream.imageset/pb_button_hrz_anim_stream.png


+ 21 - 0
appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/pb_button_vtcst_cc.imageset/Contents.json

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

BIN=BIN
appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/pb_button_vtcst_cc.imageset/pb_button_vtcst_cc.png


+ 21 - 0
appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/pb_button_vtcst_chat.imageset/Contents.json

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

BIN=BIN
appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/pb_button_vtcst_chat.imageset/pb_button_vtcst_chat.png


+ 21 - 0
appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/pb_button_vtcst_commerce.imageset/Contents.json

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

BIN=BIN
appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/pb_button_vtcst_commerce.imageset/pb_button_vtcst_commerce.png


+ 21 - 0
appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/pb_button_vtcst_notif_center.imageset/Contents.json

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

BIN=BIN
appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/pb_button_vtcst_notif_center.imageset/pb_button_vtcst_notif_center.png


+ 21 - 0
appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/pb_button_vtcst_stream.imageset/Contents.json

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

BIN=BIN
appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/pb_button_vtcst_stream.imageset/pb_button_vtcst_stream.png


+ 21 - 0
appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/pb_side_tab_vtc.imageset/Contents.json

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

BIN=BIN
appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/pb_side_tab_vtc.imageset/pb_side_tab_vtc.png


+ 21 - 0
appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/pb_side_tab_vtc_left.imageset/Contents.json

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

BIN=BIN
appbuilder-ios/NexilisLite/NexilisLite/Resource/Assets.xcassets/pb_side_tab_vtc_left.imageset/pb_side_tab_vtc_left.png


+ 35 - 0
appbuilder-ios/NexilisLite/NexilisLite/Source/Extension.swift

@@ -202,6 +202,14 @@ extension UIView {
         addSubview(border)
     }
     
+    public func resizeImage(image: UIImage, targetSize: CGSize) -> UIImage {
+        UIGraphicsBeginImageContextWithOptions(targetSize, false, 0.0);
+        image.draw(in: CGRect(x: 0, y: 0, width: targetSize.width, height: targetSize.height))
+        let newImage:UIImage = UIGraphicsGetImageFromCurrentImageContext()!
+        UIGraphicsEndImageContext()
+        return newImage
+    }
+    
 }
 
 extension UIViewController {
@@ -368,6 +376,14 @@ extension UIColor {
         return renderColor(hex: "#3669ad")
     }
     
+    public static var borderTabColor: UIColor {
+        return renderColor(hex: "#c4e4f4")
+    }
+    
+    public static var nxColor: UIColor {
+        return renderColor(hex: "#04ecfc")
+    }
+    
     public static var secondaryColor: UIColor {
         return renderColor(hex: "#FAFAFF")
     }
@@ -1291,6 +1307,25 @@ extension UISearchBar
         textFieldInsideSearchBarLabel?.textColor = color
     }
     
+    public func setCustomBackgroundImage(image: UIImage)
+    {
+        setSearchFieldBackgroundImage(resizeImage(image: image, targetHeight: 30), for: .normal)
+    }
+    
+    func resizeImage(image: UIImage, targetHeight: CGFloat) -> UIImage? {
+        let scaleFactor = targetHeight / image.size.height
+        let targetWidth = image.size.width * scaleFactor
+        let newSize = CGSize(width: targetWidth, height: targetHeight)
+        
+        UIGraphicsBeginImageContextWithOptions(newSize, false, 0.0)
+        defer { UIGraphicsEndImageContext() }
+        
+        image.draw(in: CGRect(origin: .zero, size: newSize))
+        guard let newImage = UIGraphicsGetImageFromCurrentImageContext() else { return nil }
+        
+        return newImage
+    }
+    
     public func updateHeight(height: CGFloat, radius: CGFloat = 8.0, borderColor: CGColor = UIColor.white.cgColor) {
             let image: UIImage? = UIImage.imageWithColor(color: UIColor.clear, size: CGSize(width: 1, height: height))
             setSearchFieldBackgroundImage(image, for: .normal)

+ 91 - 46
appbuilder-ios/NexilisLite/NexilisLite/Source/FloatingButton/FloatingButton.swift

@@ -14,6 +14,7 @@ public class FloatingButton: UIView {
     
     var groupView: UIStackView!
     var scrollView: UIScrollView!
+    var imageScrollView: UIImageView!
     var button_fb1: UIButton!
     var button_fb2: UIButton!
     var button_fb3: UIButton!
@@ -47,13 +48,16 @@ public class FloatingButton: UIView {
     let heightFBAnim = (UIScreen.main.bounds.height * 1) / 7.5
     let heightFBSideTab = (UIScreen.main.bounds.height * 1.05) / 7.5
     let widthFBSideTab: CGFloat = 18
+    let widthVerticalSideTab: CGFloat = 50
+    let heightVerticalSideTab: CGFloat = 220
     
     final let MODE_VERTICAL_FLOATING_BUTTON = "1"
     final let MODE_VERTICAL_ANIMATION = "2"
     final let MODE_HORIZONTAL_ANIMATION = "3"
     final let MODE_HORIZONTAL_SIDE_TAB = "4"
+    final let MODE_VERTICAL_SIDE_TAB = "5"
     
-    var countMenuFB: CGFloat = 5 {
+    var countMenuFB: CGFloat = 6 {
         didSet {
             if isShow {
                 show(isShow: isShow)
@@ -85,7 +89,11 @@ public class FloatingButton: UIView {
         var dataImage: Data?
         if Utils.getConfigModeFB() == MODE_VERTICAL_ANIMATION || Utils.getConfigModeFB() == MODE_HORIZONTAL_ANIMATION {
             defaultWidthFB = widthFBAnim
-            defaultHeightFB = heightFBAnim
+            if Utils.getConfigModeFB() == MODE_HORIZONTAL_ANIMATION {
+                defaultHeightFB = heightFBAnim + 30
+            } else {
+                defaultHeightFB = heightFBAnim
+            }
             var urlGif = URL(string: Utils.getConfigModeFB() == MODE_VERTICAL_ANIMATION ? Utils.getIconCenterAnim2() : Utils.getIconCenterAnim4())
             if (urlGif == nil) {
                 urlGif = Bundle.resourceBundle(for: Nexilis.self).url(forResource: Utils.getConfigModeFB() == MODE_VERTICAL_ANIMATION ? "pb_def_icon_mode2" : "pb_def_icon_mode4", withExtension: "gif")! //resourcesMediaBundle
@@ -111,16 +119,16 @@ public class FloatingButton: UIView {
                     nexilis_button.image = UIImage(named: Utils.getFBIconBg() == "1" ? "pb_button" : "pb_ball", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)
                 }
             } else {
-                if Utils.getConfigModeFB() == MODE_HORIZONTAL_SIDE_TAB {
+                if Utils.getConfigModeFB() == MODE_HORIZONTAL_SIDE_TAB || Utils.getConfigModeFB() == MODE_VERTICAL_SIDE_TAB {
                     defaultWidthFB = widthFBSideTab
                     defaultHeightFB = heightFBSideTab
                 }
-                nexilis_button.image = UIImage(named: Utils.getConfigModeFB() != MODE_HORIZONTAL_SIDE_TAB ? "pb_button" : "pb_side_tab", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)
+                nexilis_button.image = UIImage(named: Utils.getConfigModeFB() == MODE_VERTICAL_SIDE_TAB ? "pb_side_tab_vtc" : Utils.getConfigModeFB() == MODE_HORIZONTAL_SIDE_TAB ? "pb_side_tab" : "pb_button", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)
             }
         }
         
         backgroundColor = .clear
-        frame = CGRect(x: UIScreen.main.bounds.width - defaultWidthFB, y: (UIScreen.main.bounds.height / 2) - defaultHeightFB, width: Utils.getConfigModeFB() == MODE_HORIZONTAL_SIDE_TAB ? UIScreen.main.bounds.width - defaultWidthFB : defaultWidthFB, height: defaultHeightFB)
+        frame = CGRect(x: UIScreen.main.bounds.width - defaultWidthFB, y: (UIScreen.main.bounds.height / 2) - defaultHeightFB, width: Utils.getConfigModeFB() == MODE_VERTICAL_SIDE_TAB ? 50 + defaultWidthFB : Utils.getConfigModeFB() == MODE_HORIZONTAL_SIDE_TAB ? UIScreen.main.bounds.width - defaultWidthFB : defaultWidthFB, height: Utils.getConfigModeFB() == MODE_VERTICAL_SIDE_TAB ? heightVerticalSideTab : defaultHeightFB)
         
         if Utils.getConfigModeFB() == MODE_VERTICAL_ANIMATION || Utils.getConfigModeFB() == MODE_HORIZONTAL_ANIMATION {
             if configAnim == 0 { //left to right
@@ -149,7 +157,11 @@ public class FloatingButton: UIView {
         nexilis_button.widthAnchor.constraint(equalToConstant: defaultWidthFB).isActive = true
         nexilis_button.heightAnchor.constraint(equalToConstant: defaultHeightFB).isActive = true
         nexilis_button.leftAnchor.constraint(equalTo: leftAnchor).isActive = true
-        nexilis_button.bottomAnchor.constraint(equalTo: bottomAnchor).isActive = true
+        if Utils.getConfigModeFB() == MODE_VERTICAL_SIDE_TAB {
+            nexilis_button.centerYAnchor.constraint(equalTo: centerYAnchor).isActive = true
+        } else {
+            nexilis_button.bottomAnchor.constraint(equalTo: bottomAnchor).isActive = true
+        }
         
         scrollView = UIScrollView()
         scrollView.translatesAutoresizingMaskIntoConstraints = false
@@ -162,7 +174,15 @@ public class FloatingButton: UIView {
         }
         addSubview(scrollView)
         
-        if Utils.getConfigModeFB() != MODE_HORIZONTAL_SIDE_TAB {
+        if Utils.getConfigModeFB() == MODE_VERTICAL_SIDE_TAB {
+            let bgImage = resizeImage(image: UIImage(named: "pb_button_background_vtcst", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!, targetSize: CGSize(width: widthVerticalSideTab, height: heightVerticalSideTab))
+            scrollView.backgroundColor = UIColor.init(patternImage: bgImage)
+            
+            scrollView.leftAnchor.constraint(equalTo: nexilis_button.rightAnchor).isActive = true
+            scrollView.centerYAnchor.constraint(equalTo: nexilis_button.centerYAnchor).isActive = true
+            scrollView.widthAnchor.constraint(equalToConstant: widthVerticalSideTab).isActive = true
+            scrollView.heightAnchor.constraint(equalToConstant: heightVerticalSideTab).isActive = true
+        } else if Utils.getConfigModeFB() != MODE_HORIZONTAL_SIDE_TAB {
             scrollView.topAnchor.constraint(equalTo: topAnchor).isActive = true
             if Utils.getConfigModeFB() == MODE_VERTICAL_ANIMATION {
                 scrollView.bottomAnchor.constraint(equalTo: bottomAnchor).isActive = true
@@ -195,7 +215,13 @@ public class FloatingButton: UIView {
 
         scrollView.addSubview(groupView)
 
-        if Utils.getConfigModeFB() == MODE_HORIZONTAL_SIDE_TAB {
+        if Utils.getConfigModeFB() == MODE_VERTICAL_SIDE_TAB {
+            groupView.spacing = 10.0
+            groupView.centerYAnchor.constraint(equalTo: scrollView.centerYAnchor).isActive = true
+            groupView.centerXAnchor.constraint(equalTo: scrollView.centerXAnchor).isActive = true
+            groupView.heightAnchor.constraint(equalToConstant: heightVerticalSideTab - 20).isActive = true
+            groupView.widthAnchor.constraint(equalToConstant: 30).isActive = true
+        } else if Utils.getConfigModeFB() == MODE_HORIZONTAL_SIDE_TAB {
             groupView.leftAnchor.constraint(equalTo: scrollView.leftAnchor).isActive = true
             groupView.rightAnchor.constraint(equalTo: scrollView.rightAnchor).isActive = true
             groupView.centerYAnchor.constraint(equalTo: scrollView.centerYAnchor).isActive = true
@@ -282,7 +308,7 @@ public class FloatingButton: UIView {
             getDefaultButton()
         }
         DispatchQueue.global().async { [self] in
-            if !Utils.getCustomButtons().isEmpty && Utils.getConfigModeFB() != MODE_HORIZONTAL_SIDE_TAB && Utils.getConfigModeFB() != MODE_HORIZONTAL_ANIMATION {
+            if !Utils.getCustomButtons().isEmpty && Utils.getConfigModeFB() != MODE_HORIZONTAL_SIDE_TAB && Utils.getConfigModeFB() != MODE_HORIZONTAL_ANIMATION && Utils.getConfigModeFB() != MODE_VERTICAL_SIDE_TAB {
                 DispatchQueue.main.async { [self] in
                     groupView.subviews.forEach({ $0.removeFromSuperview() })
                     let customButtons = Utils.getCustomButtons().components(separatedBy: ",")
@@ -319,21 +345,15 @@ public class FloatingButton: UIView {
                     if !data.isEmpty {
                         if let jsonArray = try! JSONSerialization.jsonObject(with: data.data(using: String.Encoding.utf8)!, options: JSONSerialization.ReadingOptions()) as? [AnyObject] {
                             DispatchQueue.main.async { [self] in
-                                groupView.subviews.forEach({ $0.removeFromSuperview() })
-                                if jsonArray.count == 0 {
-                                    countMenuFB = CGFloat(4)
-                                    getDefaultButton()
-                                } else {
-                                    if Utils.getConfigModeFB() != MODE_HORIZONTAL_ANIMATION {
-                                        countMenuFB = CGFloat(jsonArray.count > 5 ? 5 : jsonArray.count)
-                                    } else {
-                                        countMenuFB = CGFloat(jsonArray.filter({ $0["mode"] as? Int == Int(MODE_HORIZONTAL_ANIMATION) }).count)
-                                    }
-                                    for json in jsonArray {
+                                let filteredData = jsonArray.filter({ $0["mode"] as? Int == Int(Utils.getConfigModeFB()) })
+                                if filteredData.count != 0 {
+                                    groupView.subviews.forEach({ $0.removeFromSuperview() })
+                                    countMenuFB = CGFloat(filteredData.count > 5 ? 5 : filteredData.count)
+                                    for json in filteredData {
                                         let package_id = json["package_id"] as! String
                                         let app_id = (json["app_id"] as? String) ?? ""
                                         let icon = (json["icon"] as? String) ?? ""
-                                        let mode = "\((json["mode"] as? Int) ?? 1)" 
+                                        let mode = "\((json["mode"] as? Int) ?? 1)"
                                         let newButton = UIButton()
                                         if mode != Utils.getConfigModeFB() {
                                             continue
@@ -344,33 +364,36 @@ public class FloatingButton: UIView {
                                         } else if mode == MODE_HORIZONTAL_ANIMATION {
                                             newButton.widthAnchor.constraint(equalToConstant: defaultWidthHeightMenuFB).isActive = true
                                             newButton.heightAnchor.constraint(equalToConstant: defaultWidthHeightMenuFB).isActive = true
+                                        } else if mode == MODE_VERTICAL_SIDE_TAB {
+                                            newButton.imageView?.contentMode = .scaleAspectFit
                                         } else {
                                             newButton.heightAnchor.constraint(equalToConstant: defaultWidthHeightMenuFB).isActive = true
                                         }
                                         newButton.translatesAutoresizingMaskIntoConstraints = false
                                         var indexTap = 0
                                         if package_id.contains("_fb"){
-                                            let numIdx = package_id.split(separator: "_")[1]
+                                            let listSplit = package_id.split(separator: "_", maxSplits: 1)
+                                            let numIdx = listSplit[listSplit.firstIndex(where: { $0.contains("fb") }) ?? 0]
                                             indexTap = Int(String(numIdx).substring(from: 2, to: numIdx.count))!
                                         }
                                         if indexTap == Nexilis.IDX_CHAT {
-                                            newButton.setImage(UIImage(named: mode == MODE_HORIZONTAL_SIDE_TAB ? "pb_button_hrz_chat" : mode == MODE_HORIZONTAL_ANIMATION ? "pb_button_hrz_anim_chat" : "pb_button_chat", in: Bundle.resourceBundle(for: Nexilis.self), with: nil), for: .normal)
+                                            newButton.setImage(UIImage(named: mode == MODE_HORIZONTAL_SIDE_TAB ? "pb_button_hrz_chat" : mode == MODE_HORIZONTAL_SIDE_TAB ? "pb_button_hrz_chat" : mode == MODE_HORIZONTAL_ANIMATION ? "pb_button_hrz_anim_chat" : "pb_button_chat", in: Bundle.resourceBundle(for: Nexilis.self), with: nil), for: .normal)
                                         } else if indexTap == Nexilis.IDX_CONVERSATION {
-                                            newButton.setImage(UIImage(named: mode == MODE_HORIZONTAL_SIDE_TAB ? "pb_button_hrz_conversation" : mode == MODE_HORIZONTAL_ANIMATION ? "pb_button_hrz_anim_conversation" : "pb_button_chat", in: Bundle.resourceBundle(for: Nexilis.self), with: nil), for: .normal)
+                                            newButton.setImage(UIImage(named: mode == MODE_VERTICAL_SIDE_TAB ? "pb_button_vtcst_chat" : mode == MODE_HORIZONTAL_SIDE_TAB ? "pb_button_hrz_conversation" : mode == MODE_HORIZONTAL_ANIMATION ? "pb_button_hrz_anim_conversation" : "pb_button_chat", in: Bundle.resourceBundle(for: Nexilis.self), with: nil), for: .normal)
                                         } else if indexTap == Nexilis.IDX_CALL {
                                             newButton.setImage(UIImage(named: mode == MODE_HORIZONTAL_SIDE_TAB ? "pb_button_hrz_call" : mode == MODE_HORIZONTAL_ANIMATION ? "pb_button_hrz_anim_call" : "pb_button_call", in: Bundle.resourceBundle(for: Nexilis.self), with: nil), for: .normal)
                                         } else if indexTap == Nexilis.IDX_CC {
-                                            newButton.setImage(UIImage(named: mode == MODE_HORIZONTAL_SIDE_TAB ? "pb_button_hrz_cc" : mode == MODE_HORIZONTAL_ANIMATION ? "pb_button_hrz_anim_cc" : "pb_button_cc", in: Bundle.resourceBundle(for: Nexilis.self), with: nil), for: .normal)
+                                            newButton.setImage(UIImage(named: mode == MODE_VERTICAL_SIDE_TAB ? "pb_button_vtcst_cc" : mode == MODE_HORIZONTAL_SIDE_TAB ? "pb_button_hrz_cc" : mode == MODE_HORIZONTAL_ANIMATION ? "pb_button_hrz_anim_cc" : "pb_button_cc", in: Bundle.resourceBundle(for: Nexilis.self), with: nil), for: .normal)
                                         } else if indexTap == Nexilis.IDX_STREAM {
-                                            newButton.setImage(UIImage(named: mode == MODE_HORIZONTAL_SIDE_TAB ? "pb_button_hrz_stream" : mode == MODE_HORIZONTAL_ANIMATION ? "pb_button_hrz_anim_stream" : "pb_button_stream", in: Bundle.resourceBundle(for: Nexilis.self), with: nil), for: .normal)
+                                            newButton.setImage(UIImage(named: mode == MODE_VERTICAL_SIDE_TAB ? "pb_button_vtcst_stream" : mode == MODE_HORIZONTAL_SIDE_TAB ? "pb_button_hrz_stream" : mode == MODE_HORIZONTAL_ANIMATION ? "pb_button_hrz_anim_stream" : "pb_button_stream", in: Bundle.resourceBundle(for: Nexilis.self), with: nil), for: .normal)
                                         } else if indexTap == Nexilis.IDX_SOCIAL_COMMERCE {
-                                            newButton.setImage(UIImage(named: mode == MODE_HORIZONTAL_SIDE_TAB ? "pb_button_hrz_social_commerce" : mode == MODE_HORIZONTAL_ANIMATION ? "pb_button_hrz_anim_commerce" : "pb_button_commerce", in: Bundle.resourceBundle(for: Nexilis.self), with: nil), for: .normal)
+                                            newButton.setImage(UIImage(named: mode == MODE_VERTICAL_SIDE_TAB ? "pb_button_vtcst_commerce" : mode == MODE_HORIZONTAL_SIDE_TAB ? "pb_button_hrz_social_commerce" : mode == MODE_HORIZONTAL_ANIMATION ? "pb_button_hrz_anim_commerce" : "pb_button_commerce", in: Bundle.resourceBundle(for: Nexilis.self), with: nil), for: .normal)
                                         } else if indexTap == Nexilis.IDX_NEWS {
                                             newButton.setImage(UIImage(named: mode == MODE_HORIZONTAL_SIDE_TAB ? "pb_button_hrz_news" : mode == MODE_HORIZONTAL_ANIMATION ? "pb_button_hrz_anim_news" : "pb_button_news", in: Bundle.resourceBundle(for: Nexilis.self), with: nil), for: .normal)
                                         } else if indexTap == Nexilis.IDX_POST {
                                             newButton.setImage(UIImage(named: mode == MODE_HORIZONTAL_SIDE_TAB ? "pb_button_hrz_post" : mode == MODE_HORIZONTAL_ANIMATION ? "pb_button_hrz_anim_post" : "pb_button_post", in: Bundle.resourceBundle(for: Nexilis.self), with: nil), for: .normal)
                                         } else if indexTap == Nexilis.IDX_NOTIF_CENTER {
-                                            newButton.setImage(UIImage(named: mode == MODE_HORIZONTAL_SIDE_TAB ? "pb_button_hrz_notif_center" : mode == MODE_HORIZONTAL_ANIMATION ? "pb_button_hrz_anim_notif_center" : "pb_button_notification", in: Bundle.resourceBundle(for: Nexilis.self), with: nil), for: .normal)
+                                            newButton.setImage(UIImage(named: mode == MODE_VERTICAL_SIDE_TAB ? "pb_button_vtcst_notif_center" : mode == MODE_HORIZONTAL_SIDE_TAB ? "pb_button_hrz_notif_center" : mode == MODE_HORIZONTAL_ANIMATION ? "pb_button_hrz_anim_notif_center" : "pb_button_notification", in: Bundle.resourceBundle(for: Nexilis.self), with: nil), for: .normal)
                                         } else {
                                             newButton.setImage(UIImage(named: mode == MODE_HORIZONTAL_SIDE_TAB ? "pb_button_hrz_more" : mode == MODE_HORIZONTAL_ANIMATION ? "pb_button_hrz_anim_more" : "pb_button_others", in: Bundle.resourceBundle(for: Nexilis.self), with: nil), for: .normal)
                                         }
@@ -412,16 +435,23 @@ public class FloatingButton: UIView {
     }
     
     func getDefaultButton() {
-        let data = [Nexilis.IDX_NOTIF_CENTER, Nexilis.IDX_CC, Nexilis.IDX_CONVERSATION, Nexilis.IDX_CALL, Nexilis.IDX_STREAM]
+        let mode = Utils.getConfigModeFB()
+        var data = [Nexilis.IDX_NOTIF_CENTER, Nexilis.IDX_CC, Nexilis.IDX_CONVERSATION, Nexilis.IDX_CALL, Nexilis.IDX_STREAM]
+        if mode == MODE_VERTICAL_SIDE_TAB {
+            data = [Nexilis.IDX_NOTIF_CENTER, Nexilis.IDX_CC, Nexilis.IDX_CONVERSATION, Nexilis.IDX_STREAM, Nexilis.IDX_SOCIAL_COMMERCE]
+        } else if mode == MODE_HORIZONTAL_ANIMATION {
+            data = [Nexilis.IDX_NOTIF_CENTER, Nexilis.IDX_CC, Nexilis.IDX_CONVERSATION, Nexilis.IDX_SOCIAL_COMMERCE, Nexilis.IDX_STREAM]
+        }
         for i in 0..<data.count {
             let newButton = UIButton()
-            let mode = Utils.getConfigModeFB()
             if mode == MODE_HORIZONTAL_SIDE_TAB {
                 newButton.widthAnchor.constraint(equalToConstant: defaultHeightFB - 10).isActive = true
                 newButton.heightAnchor.constraint(equalToConstant: defaultHeightFB - 10).isActive = true
             } else if mode == MODE_HORIZONTAL_ANIMATION {
                 newButton.widthAnchor.constraint(equalToConstant: defaultWidthHeightMenuFB).isActive = true
                 newButton.heightAnchor.constraint(equalToConstant: defaultWidthHeightMenuFB).isActive = true
+            } else if mode == MODE_VERTICAL_SIDE_TAB {
+                newButton.imageView?.contentMode = .scaleAspectFit
             } else {
                 newButton.heightAnchor.constraint(equalToConstant: defaultWidthHeightMenuFB).isActive = true
             }
@@ -430,21 +460,24 @@ public class FloatingButton: UIView {
             if indexTap == Nexilis.IDX_CHAT {
                 newButton.setImage(UIImage(named: mode == MODE_HORIZONTAL_SIDE_TAB ? "pb_button_hrz_chat" : mode == MODE_HORIZONTAL_ANIMATION ? "pb_button_hrz_anim_chat" : "pb_button_chat", in: Bundle.resourceBundle(for: Nexilis.self), with: nil), for: .normal)
             } else if indexTap == Nexilis.IDX_CONVERSATION {
-                newButton.setImage(UIImage(named: mode == MODE_HORIZONTAL_SIDE_TAB ? "pb_button_hrz_conversation" : mode == MODE_HORIZONTAL_ANIMATION ? "pb_button_hrz_anim_conversation" : "pb_button_chat", in: Bundle.resourceBundle(for: Nexilis.self), with: nil), for: .normal)
+                newButton.setImage(UIImage(named: mode == MODE_VERTICAL_SIDE_TAB ? "pb_button_vtcst_chat" : mode == MODE_HORIZONTAL_SIDE_TAB ? "pb_button_hrz_conversation" : mode == MODE_HORIZONTAL_ANIMATION ? "pb_button_hrz_anim_conversation" : "pb_button_chat", in: Bundle.resourceBundle(for: Nexilis.self), with: nil), for: .normal)
             } else if indexTap == Nexilis.IDX_CALL {
                 newButton.setImage(UIImage(named: mode == MODE_HORIZONTAL_SIDE_TAB ? "pb_button_hrz_call" : mode == MODE_HORIZONTAL_ANIMATION ? "pb_button_hrz_anim_call" : "pb_button_call", in: Bundle.resourceBundle(for: Nexilis.self), with: nil), for: .normal)
             } else if indexTap == Nexilis.IDX_CC {
-                newButton.setImage(UIImage(named: mode == MODE_HORIZONTAL_SIDE_TAB ? "pb_button_hrz_cc" : mode == MODE_HORIZONTAL_ANIMATION ? "pb_button_hrz_anim_cc" : "pb_button_cc", in: Bundle.resourceBundle(for: Nexilis.self), with: nil), for: .normal)
+                newButton.setImage(UIImage(named: mode == MODE_VERTICAL_SIDE_TAB ? "pb_button_vtcst_cc" : mode == MODE_HORIZONTAL_SIDE_TAB ? "pb_button_hrz_cc" : mode == MODE_HORIZONTAL_ANIMATION ? "pb_button_hrz_anim_cc" : "pb_button_cc", in: Bundle.resourceBundle(for: Nexilis.self), with: nil), for: .normal)
             } else if indexTap == Nexilis.IDX_STREAM {
-                newButton.setImage(UIImage(named: mode == MODE_HORIZONTAL_SIDE_TAB ? "pb_button_hrz_stream" : mode == MODE_HORIZONTAL_ANIMATION ? "pb_button_hrz_anim_stream" : "pb_button_stream", in: Bundle.resourceBundle(for: Nexilis.self), with: nil), for: .normal)
+                newButton.setImage(UIImage(named: mode == MODE_VERTICAL_SIDE_TAB ? "pb_button_vtcst_stream" : mode == MODE_HORIZONTAL_SIDE_TAB ? "pb_button_hrz_stream" : mode == MODE_HORIZONTAL_ANIMATION ? "pb_button_hrz_anim_stream" : "pb_button_stream", in: Bundle.resourceBundle(for: Nexilis.self), with: nil), for: .normal)
             } else if indexTap == Nexilis.IDX_SOCIAL_COMMERCE {
-                newButton.setImage(UIImage(named: mode == MODE_HORIZONTAL_SIDE_TAB ? "pb_button_hrz_social_commerce" : mode == MODE_HORIZONTAL_ANIMATION ? "pb_button_hrz_anim_commerce" : "pb_button_commerce", in: Bundle.resourceBundle(for: Nexilis.self), with: nil), for: .normal)
+                newButton.setImage(UIImage(named: mode == MODE_VERTICAL_SIDE_TAB ? "pb_button_vtcst_commerce" : mode == MODE_HORIZONTAL_SIDE_TAB ? "pb_button_hrz_social_commerce" : mode == MODE_HORIZONTAL_ANIMATION ? "pb_button_hrz_anim_commerce" : "pb_button_commerce", in: Bundle.resourceBundle(for: Nexilis.self), with: nil), for: .normal)
             } else if indexTap == Nexilis.IDX_NEWS {
                 newButton.setImage(UIImage(named: mode == MODE_HORIZONTAL_SIDE_TAB ? "pb_button_hrz_news" : mode == MODE_HORIZONTAL_ANIMATION ? "pb_button_hrz_anim_news" : "pb_button_news", in: Bundle.resourceBundle(for: Nexilis.self), with: nil), for: .normal)
             } else if indexTap == Nexilis.IDX_POST {
                 newButton.setImage(UIImage(named: mode == MODE_HORIZONTAL_SIDE_TAB ? "pb_button_hrz_post" : mode == MODE_HORIZONTAL_ANIMATION ? "pb_button_hrz_anim_post" : "pb_button_post", in: Bundle.resourceBundle(for: Nexilis.self), with: nil), for: .normal)
             } else if indexTap == Nexilis.IDX_NOTIF_CENTER {
-                newButton.setImage(UIImage(named: mode == MODE_HORIZONTAL_SIDE_TAB ? "pb_button_hrz_notif_center" : mode == MODE_HORIZONTAL_ANIMATION ? "pb_button_hrz_anim_notif_center" : "pb_button_notification", in: Bundle.resourceBundle(for: Nexilis.self), with: nil), for: .normal)
+                newButton.setImage(UIImage(named: mode == MODE_VERTICAL_SIDE_TAB ? "pb_button_vtcst_notif_center" : mode == MODE_HORIZONTAL_SIDE_TAB ? "pb_button_hrz_notif_center" : mode == MODE_HORIZONTAL_ANIMATION ? "pb_button_hrz_anim_notif_center" : "pb_button_notification", in: Bundle.resourceBundle(for: Nexilis.self), with: nil), for: .normal)
+                if mode == MODE_VERTICAL_SIDE_TAB {
+                    newButton.imageView?.contentMode = .scaleAspectFit
+                }
             } else {
                 newButton.setImage(UIImage(named: mode == MODE_HORIZONTAL_SIDE_TAB ? "pb_button_hrz_more" : mode == MODE_HORIZONTAL_ANIMATION ? "pb_button_hrz_anim_more" : "pb_button_others", in: Bundle.resourceBundle(for: Nexilis.self), with: nil), for: .normal)
             }
@@ -459,14 +492,14 @@ public class FloatingButton: UIView {
         let size = UIScreen.main.bounds
         let widthScreen = size.width
         let heightScreen = size.height
-        let minimumx: CGFloat = Utils.getConfigModeFB() == MODE_HORIZONTAL_ANIMATION && isShow ? 80 : Utils.getConfigModeFB() == MODE_VERTICAL_ANIMATION && isShow ? 60 : 40
-        let maximumx = Utils.getConfigModeFB() == MODE_HORIZONTAL_ANIMATION && isShow ? widthScreen - frame.width + 20 : Utils.getConfigModeFB() == MODE_VERTICAL_ANIMATION && isShow ? widthScreen - 10 - defaultWidthHeightMenuFB : widthScreen - 40
+        let minimumx: CGFloat = Utils.getConfigModeFB() == MODE_HORIZONTAL_ANIMATION && isShow ? widthFBAnim + defaultWidthHeightMenuFB : Utils.getConfigModeFB() == MODE_VERTICAL_ANIMATION && isShow ? 60 : 40
+        let maximumx = Utils.getConfigModeFB() == MODE_HORIZONTAL_ANIMATION && isShow ? widthScreen - widthFBAnim - defaultWidthHeightMenuFB : Utils.getConfigModeFB() == MODE_VERTICAL_ANIMATION && isShow ? widthScreen - 10 - defaultWidthHeightMenuFB : widthScreen - 40
         let maxMinXSideTab = isShow ? center.x : widthScreen + (center.x - widthScreen)
         let translation = sender.translation(in: self)
         var xPos = center.x + translation.x
         var yPos = center.y + translation.y
         bringSubviewToFront(self)
-        if Utils.getConfigModeFB() == MODE_HORIZONTAL_SIDE_TAB {
+        if Utils.getConfigModeFB() == MODE_HORIZONTAL_SIDE_TAB || Utils.getConfigModeFB() == MODE_VERTICAL_SIDE_TAB {
             xPos = maxMinXSideTab
         } else {
             if (xPos < minimumx) {
@@ -477,8 +510,8 @@ public class FloatingButton: UIView {
             }
         }
         if(isShow) {
-            let minimumy = Utils.getConfigModeFB() == MODE_HORIZONTAL_SIDE_TAB ? 50 : (defaultWidthHeightMenuFB * countMenuFB) - defaultHeightFB - 10
-            let maximumy = Utils.getConfigModeFB() == MODE_HORIZONTAL_SIDE_TAB ? heightScreen - 50 : heightScreen - defaultHeightFB - 10
+            let minimumy = Utils.getConfigModeFB() == MODE_VERTICAL_SIDE_TAB ? heightVerticalSideTab - 100 : Utils.getConfigModeFB() == MODE_HORIZONTAL_SIDE_TAB ? 50 : Utils.getConfigModeFB() == MODE_HORIZONTAL_ANIMATION ? defaultWidthHeightMenuFB * 2 + 10 : Utils.getConfigModeFB() == MODE_VERTICAL_ANIMATION ? defaultHeightFB + defaultWidthHeightMenuFB : defaultHeightFB * 3 + 20
+            let maximumy = Utils.getConfigModeFB() == MODE_VERTICAL_SIDE_TAB ? heightScreen - (heightVerticalSideTab - 100) : Utils.getConfigModeFB() == MODE_HORIZONTAL_SIDE_TAB ? heightScreen - 50 : Utils.getConfigModeFB() == MODE_HORIZONTAL_ANIMATION ? heightScreen - defaultWidthHeightMenuFB - 30 : Utils.getConfigModeFB() == MODE_VERTICAL_ANIMATION ? heightScreen - defaultHeightFB - 30 : heightScreen - defaultHeightFB * 3 - 20
             if(yPos < minimumy) {
                 yPos = minimumy
             }
@@ -561,6 +594,7 @@ public class FloatingButton: UIView {
     }
     
     @objc func fbTap(_ sender: UIButton) {
+        print("LOHE")
         let package_id = sender.restorationIdentifier!
         var app_id = sender.accessibilityIdentifier!
         var indexTap = 0
@@ -632,8 +666,8 @@ public class FloatingButton: UIView {
             } else if Utils.getConfigModeFB() == MODE_HORIZONTAL_ANIMATION {
                 height = defaultHeightFB + defaultWidthHeightMenuFB
                 width = defaultWidthHeightMenuFB * (countMenuFB - 1)
-                if xPosition > UIScreen.main.bounds.width - defaultWidthHeightMenuFB * (countMenuFB) {
-                    xPosition = UIScreen.main.bounds.width - defaultWidthHeightMenuFB * (countMenuFB)
+                if xPosition > UIScreen.main.bounds.width - width {
+                    xPosition = UIScreen.main.bounds.width - width
                 }
             }
             var yPosition = frame.origin.y - height + defaultHeightFB
@@ -641,11 +675,22 @@ public class FloatingButton: UIView {
                 lastPosY = frame.origin.y
                 yPosition = 25
             }
-            if Utils.getConfigModeFB() != MODE_HORIZONTAL_SIDE_TAB {
+            if Utils.getConfigModeFB() != MODE_HORIZONTAL_SIDE_TAB &&  Utils.getConfigModeFB() != MODE_VERTICAL_SIDE_TAB {
                 frame = CGRect(x: xPosition, y: yPosition, width: width, height: height)
             } else {
-                UIView.animate(withDuration: 0.5, animations: {
-                    self.frame.origin.x = 0
+                UIView.animate(withDuration: 0.5, animations: { [self] in
+                    var vst: CGFloat = 0.0
+                    if Utils.getConfigModeFB() == MODE_VERTICAL_SIDE_TAB {
+                        vst = UIScreen.main.bounds.width - defaultWidthFB - widthVerticalSideTab
+                        let size = UIScreen.main.bounds
+                        let heightScreen = size.height
+                        if frame.origin.y < 20 {
+                            frame.origin.y = 20
+                        } else if frame.origin.y > heightScreen - heightVerticalSideTab {
+                            frame.origin.y = heightScreen - heightVerticalSideTab
+                        }
+                    }
+                    frame.origin.x = 0 + vst
                 })
             }
             DispatchQueue.main.asyncAfter(deadline: .now() + 0.5, execute: { [self] in
@@ -673,7 +718,7 @@ public class FloatingButton: UIView {
             if lastPosY != nil {
                 yPosition = lastPosY!
             }
-            if Utils.getConfigModeFB() != MODE_HORIZONTAL_SIDE_TAB {
+            if Utils.getConfigModeFB() != MODE_HORIZONTAL_SIDE_TAB && Utils.getConfigModeFB() != MODE_VERTICAL_SIDE_TAB {
                 frame = CGRect(x: frame.origin.x, y: yPosition, width: width, height: defaultHeightFB)
             } else {
                 UIView.animate(withDuration: 0.5, animations: { [self] in

+ 10 - 0
appbuilder-ios/NexilisLite/NexilisLite/Source/View/BNIView/BNIBookingWebView.swift

@@ -509,4 +509,14 @@ public class BNIBookingWebView: UIViewController, WKNavigationDelegate, UIScroll
         webView.reload()
         sender.endRefreshing()
     }
+    
+    public func webView(_ webView: WKWebView, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {
+        if challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust {
+            let credential = URLCredential(trust: challenge.protectionSpace.serverTrust!)
+            completionHandler(.useCredential, credential)
+        }
+        else {
+            completionHandler(.cancelAuthenticationChallenge, nil)
+        }
+    }
 }

+ 5 - 2
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Chat/ChatGPTBotView.swift

@@ -498,9 +498,12 @@ class ChatGPTBotView: UIViewController, UIGestureRecognizerDelegate {
             searchBar.delegate = self
             searchBar.searchTextField.tintColor = .mainColor
             searchBar.searchTextField.textColor = .mainColor
-            searchBar.updateHeight(height: 36, radius: 18)
+//            searchBar.updateHeight(height: 36, radius: 18)
             searchBar.showsCancelButton = false
-            searchBar.setMagnifyingGlassColorTo(color: .white)
+//            searchBar.setMagnifyingGlassColorTo(color: .white)
+            searchBar.setImage(UIImage(), for: .search, state: .normal)
+            searchBar.setPositionAdjustment(UIOffset(horizontal: 10, vertical: 0), for: .search)
+            searchBar.setCustomBackgroundImage(image: UIImage(named: self.traitCollection.userInterfaceStyle == .dark ? "nx_search_bar_dark" : "nx_search_bar", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!)
             navigationItem.titleView = searchBar
             self.definesPresentationContext = true
         }

+ 5 - 2
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Chat/EditorGroup.swift

@@ -765,9 +765,12 @@ public class EditorGroup: UIViewController {
             searchBar.delegate = self
             searchBar.searchTextField.tintColor = .mainColor
             searchBar.searchTextField.textColor = .mainColor
-            searchBar.updateHeight(height: 36, radius: 18)
+//            searchBar.updateHeight(height: 36, radius: 18)
             searchBar.showsCancelButton = false
-            searchBar.setMagnifyingGlassColorTo(color: .white)
+//            searchBar.setMagnifyingGlassColorTo(color: .white)
+            searchBar.setImage(UIImage(), for: .search, state: .normal)
+            searchBar.setPositionAdjustment(UIOffset(horizontal: 10, vertical: 0), for: .search)
+            searchBar.setCustomBackgroundImage(image: UIImage(named: self.traitCollection.userInterfaceStyle == .dark ? "nx_search_bar_dark" : "nx_search_bar", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!)
             navigationItem.titleView = searchBar
             self.definesPresentationContext = true
         }

+ 5 - 2
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Chat/EditorPersonal.swift

@@ -753,8 +753,11 @@ public class EditorPersonal: UIViewController, ImageVideoPickerDelegate, UIGestu
             searchBar.searchTextField.tintColor = .mainColor
             searchBar.searchTextField.textColor = .mainColor
             searchBar.showsCancelButton = false
-            searchBar.setMagnifyingGlassColorTo(color: .white)
-            searchBar.updateHeight(height: 36, radius: 18)
+//            searchBar.setMagnifyingGlassColorTo(color: .white)
+//            searchBar.updateHeight(height: 36, radius: 18)
+            searchBar.setImage(UIImage(), for: .search, state: .normal)
+            searchBar.setPositionAdjustment(UIOffset(horizontal: 10, vertical: 0), for: .search)
+            searchBar.setCustomBackgroundImage(image: UIImage(named: self.traitCollection.userInterfaceStyle == .dark ? "nx_search_bar_dark" : "nx_search_bar", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!)
             navigationItem.titleView = searchBar
             self.definesPresentationContext = true
         }

+ 5 - 2
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Contact/ContactCallViewController.swift

@@ -85,8 +85,11 @@ class ContactCallViewController: UIViewController {
         searchController.searchBar.delegate = self
         searchController.obscuresBackgroundDuringPresentation = false
         searchController.searchBar.searchTextField.attributedPlaceholder = NSAttributedString(string: "Search".localized(), attributes: [NSAttributedString.Key.foregroundColor: UIColor.gray, NSAttributedString.Key.font: UIFont.systemFont(ofSize: 16)])
-        searchController.searchBar.updateHeight(height: 36, radius: 18)
-        searchController.searchBar.setMagnifyingGlassColorTo(color: .white)
+//        searchController.searchBar.updateHeight(height: 36, radius: 18)
+//        searchController.searchBar.setMagnifyingGlassColorTo(color: .white)
+        searchController.searchBar.setImage(UIImage(), for: .search, state: .normal)
+        searchController.searchBar.setPositionAdjustment(UIOffset(horizontal: 10, vertical: 0), for: .search)
+        searchController.searchBar.setCustomBackgroundImage(image: UIImage(named: self.traitCollection.userInterfaceStyle == .dark ? "nx_search_bar_dark" : "nx_search_bar", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!)
         searchController.searchBar.tintColor = .mainColor
         
         navigationItem.searchController = searchController

+ 5 - 2
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/AddFriendTableViewController.swift

@@ -65,8 +65,11 @@ class AddFriendTableViewController: UITableViewController {
         searchController.searchBar.delegate = self
         searchController.obscuresBackgroundDuringPresentation = false
         searchController.searchBar.searchTextField.attributedPlaceholder = NSAttributedString(string: "Search".localized(), attributes: [NSAttributedString.Key.foregroundColor: UIColor.gray, NSAttributedString.Key.font: UIFont.systemFont(ofSize: 16)])
-        searchController.searchBar.updateHeight(height: 36, radius: 18)
-        searchController.searchBar.setMagnifyingGlassColorTo(color: .white)
+//        searchController.searchBar.updateHeight(height: 36, radius: 18)
+//        searchController.searchBar.setMagnifyingGlassColorTo(color: .white)
+        searchController.searchBar.setImage(UIImage(), for: .search, state: .normal)
+        searchController.searchBar.setPositionAdjustment(UIOffset(horizontal: 10, vertical: 0), for: .search)
+        searchController.searchBar.setCustomBackgroundImage(image: UIImage(named: self.traitCollection.userInterfaceStyle == .dark ? "nx_search_bar_dark" : "nx_search_bar", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!)
         searchController.searchBar.tintColor = .mainColor
         
         definesPresentationContext = true

+ 5 - 2
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/BroadcastMembersTableViewController.swift

@@ -80,8 +80,11 @@ class BroadcastMembersTableViewController: UITableViewController, UISearchContro
         searchController.searchBar.delegate = self
         searchController.obscuresBackgroundDuringPresentation = false
         searchController.searchBar.searchTextField.attributedPlaceholder = NSAttributedString(string: "Search".localized(), attributes: [NSAttributedString.Key.foregroundColor: UIColor.gray, NSAttributedString.Key.font: UIFont.systemFont(ofSize: 16)])
-        searchController.searchBar.updateHeight(height: 36, radius: 18)
-        searchController.searchBar.setMagnifyingGlassColorTo(color: .white)
+//        searchController.searchBar.updateHeight(height: 36, radius: 18)
+//        searchController.searchBar.setMagnifyingGlassColorTo(color: .white)
+        searchController.searchBar.setImage(UIImage(), for: .search, state: .normal)
+        searchController.searchBar.setPositionAdjustment(UIOffset(horizontal: 10, vertical: 0), for: .search)
+        searchController.searchBar.setCustomBackgroundImage(image: UIImage(named: self.traitCollection.userInterfaceStyle == .dark ? "nx_search_bar_dark" : "nx_search_bar", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!)
         searchController.searchBar.tintColor = .mainColor
         UIBarButtonItem.appearance(whenContainedInInstancesOf: [UISearchBar.self]).setTitleTextAttributes([NSAttributedString.Key.foregroundColor: UIColor.white], for: .normal)
         

+ 2 - 2
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/ConfigureFloatingButton.swift

@@ -11,8 +11,8 @@ public class ConfigureFloatingButton: UIViewController {
     let subContainerView = UIView()
     let titleConfigureFB = UILabel()
     var chosenMode: String = "1"
-    var fullMode: [String] = ["1", "2", "3", "4"]
-    var dataMode: [String] = ["1. Floating Button (Vertical Mode)".localized(),"2. Animation (Vertical Mode)".localized(),"3. Animation (Horizontal Mode)".localized(),"4. Side-Tab (Horizontal Mode)".localized()]
+    var fullMode: [String] = ["1", "2", "3", "4", "5"]
+    var dataMode: [String] = ["1. Floating Button (Vertical Mode)".localized(),"2. Animation (Vertical Mode)".localized(),"3. Animation (Horizontal Mode)".localized(),"4. Side-Tab (Horizontal Mode)".localized(), "5. Side-Tab (Vertical Mode)".localized()]
     var paddingTopFinishButton = NSLayoutConstraint()
     let buttonSet = UIButton()
     let modeButton = UIView()

+ 5 - 2
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/ContactChatViewController.swift

@@ -158,8 +158,11 @@ class ContactChatViewController: UITableViewController {
         searchController.searchBar.autocapitalizationType = .none
         searchController.searchBar.delegate = self
         searchController.obscuresBackgroundDuringPresentation = false
-        searchController.searchBar.setMagnifyingGlassColorTo(color: .white)
-        searchController.searchBar.updateHeight(height: 36, radius: 18)
+//        searchController.searchBar.setMagnifyingGlassColorTo(color: .white)
+//        searchController.searchBar.updateHeight(height: 36, radius: 18)
+        searchController.searchBar.setImage(UIImage(), for: .search, state: .normal)
+        searchController.searchBar.setPositionAdjustment(UIOffset(horizontal: 10, vertical: 0), for: .search)
+        searchController.searchBar.setCustomBackgroundImage(image: UIImage(named: self.traitCollection.userInterfaceStyle == .dark ? "nx_search_bar_dark" : "nx_search_bar", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!)
         searchController.searchBar.tintColor = .mainColor
         searchController.searchBar.searchTextField.attributedPlaceholder = NSAttributedString(string: "Search".localized(), attributes: [NSAttributedString.Key.foregroundColor: UIColor.gray, NSAttributedString.Key.font: UIFont.systemFont(ofSize: 16)])
         

+ 5 - 2
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Streaming/SeminarListViewController.swift

@@ -58,9 +58,12 @@ class SeminarListViewController: UIViewController {
         searchController.searchBar.autocapitalizationType = .none
         searchController.searchBar.delegate = self
         searchController.obscuresBackgroundDuringPresentation = false
-        searchController.searchBar.updateHeight(height: 36, radius: 18)
+//        searchController.searchBar.updateHeight(height: 36, radius: 18)
         searchController.searchBar.searchTextField.attributedPlaceholder = NSAttributedString(string: "Search".localized(), attributes: [NSAttributedString.Key.foregroundColor: UIColor.gray, NSAttributedString.Key.font: UIFont.systemFont(ofSize: 16)])
-        searchController.searchBar.setMagnifyingGlassColorTo(color: .white)
+//        searchController.searchBar.setMagnifyingGlassColorTo(color: .white)
+        searchController.searchBar.setImage(UIImage(), for: .search, state: .normal)
+        searchController.searchBar.setPositionAdjustment(UIOffset(horizontal: 10, vertical: 0), for: .search)
+        searchController.searchBar.setCustomBackgroundImage(image: UIImage(named: self.traitCollection.userInterfaceStyle == .dark ? "nx_search_bar_dark" : "nx_search_bar", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!)
         searchController.searchBar.tintColor = .mainColor
         
         tableView.delegate = self