Pārlūkot izejas kodu

fix ui and bugs

kevin 3 gadi atpakaļ
vecāks
revīzija
d457c29b64

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

@@ -141,7 +141,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
         let tabBarAppearance: UITabBarAppearance = UITabBarAppearance()
         tabBarAppearance.configureWithDefaultBackground()
         if Bundle.main.displayName == "DigiNetS" {
-            tabBarAppearance.backgroundColor = .darkGray
+            tabBarAppearance.backgroundColor = .black.withAlphaComponent(0.7)
         }
         if #available(iOS 13.0, *) {
             UITabBar.appearance().standardAppearance = tabBarAppearance

+ 6 - 5
appbuilder-ios/AppBuilder/AppBuilder/FirstTabViewController.swift

@@ -28,6 +28,7 @@ class FirstTabViewController: UIViewController, WKUIDelegate, UIScrollViewDelega
         refreshControl.addTarget(self, action: #selector(reloadWebView(_:)), for: .valueChanged)
         webView.scrollView.addSubview(refreshControl)
         webView.scrollView.delegate = self
+        webView.allowsBackForwardNavigationGestures = true
     }
     
     override func viewWillAppear(_ animated: Bool) {
@@ -36,20 +37,20 @@ class FirstTabViewController: UIViewController, WKUIDelegate, UIScrollViewDelega
         var myURL : URL?
         switch(ViewController.sURL){
         case "0":
-            address = "https://qmera.io/nexilis/pages/tab1-main-only?f_pin=\(me ?? "")"
+            address = "\(PrefsUtil.getURLBase() ?? "https://qmera.io/")nexilis/pages/tab1-main-only?f_pin=\(me ?? "")"
             myURL = URL(string: address)
         case "1":
-            address = "https://qmera.io/nexilis/pages/tab3-main-only?f_pin=\(me ?? "")"
+            address = "\(PrefsUtil.getURLBase() ?? "https://qmera.io/")nexilis/pages/tab3-main-only?f_pin=\(me ?? "")"
             myURL = URL(string: address)
         case "2":
-            address = "https://qmera.io/nexilis/pages/tab1-main?f_pin=\(me ?? "")"
+            address = "\(PrefsUtil.getURLBase() ?? "https://qmera.io/")nexilis/pages/tab1-main?f_pin=\(me ?? "")"
             myURL = URL(string: address)
         case "3":
-            address = "https://qmera.io/nexilis/pages/tab3-commerce?f_pin=\(me ?? "")"
+            address = "\(PrefsUtil.getURLBase() ?? "https://qmera.io/")nexilis/pages/tab3-commerce?f_pin=\(me ?? "")"
             myURL = URL(string: address)
         default:
             if(!ViewController.sURL.isEmpty){
-                if(ViewController.sURL.lowercased().contains("https://")){
+                if(ViewController.sURL.lowercased().contains("https://") || ViewController.sURL.lowercased().contains("http://")){
                     address = ViewController.sURL
                     myURL = URL(string: address)
                 }

+ 220 - 159
appbuilder-ios/AppBuilder/AppBuilder/FourthTabViewController.swift

@@ -9,29 +9,55 @@ import UIKit
 import NotificationBannerSwift
 import nuSDKService
 import NexilisLite
+import Photos
 
 public class FourthTabViewController: UIViewController, UITableViewDelegate, UITableViewDataSource, UIScrollViewDelegate {
     
-    var language: [[String: String]] = [["English": "en"],["Indonesia": "id"]]
+    var language: [[String: String]] = [["Indonesia": "id"],["English": "en"]]
     var alert: UIAlertController?
     var textFields = [UITextField]()
     
+    var switchVibrateMode = UISwitch()
+    var switchSaveToGallery = UISwitch()
+    var switchAutoDownload = UISwitch()
+    
     @IBOutlet weak var tableView: UITableView!
     @IBOutlet weak var backgroundImage: UIImageView!
     
     public override func viewDidLoad() {
         super.viewDidLoad()
         
-        var isNCNil = navigationController == nil
-        print("isNCNil: \(isNCNil)")
-        
         tableView.delegate = self
         tableView.dataSource = self
+        tableView.layoutMargins = .init(top: 0, left: 5, bottom: 0, right: 5)
+        tableView.separatorStyle = .none
         
         self.navigationController?.navigationBar.topItem?.title = "Settings".localized();
         
         makeMenu()
         
+        switchVibrateMode.tintColor = .gray
+        switchSaveToGallery.tintColor = .gray
+        switchAutoDownload.tintColor = .gray
+        switchVibrateMode.onTintColor = .mainColor
+        switchSaveToGallery.onTintColor = .mainColor
+        switchAutoDownload.onTintColor = .mainColor
+        let vibrateMode = UserDefaults.standard.bool(forKey: "vibrateMode")
+        let saveGallery = UserDefaults.standard.bool(forKey: "saveToGallery")
+        let autoDownload = UserDefaults.standard.bool(forKey: "autoDownload")
+        if vibrateMode {
+            switchVibrateMode.setOn(true, animated: false)
+        }
+        if saveGallery {
+            switchSaveToGallery.setOn(true, animated: false)
+        }
+        if autoDownload {
+            switchAutoDownload.setOn(true, animated: false)
+        }
+        switchVibrateMode.addTarget(self, action: #selector(vibrateModeSwitch), for: .valueChanged)
+        switchSaveToGallery.addTarget(self, action: #selector(saveToGallerySwitch), for: .valueChanged)
+        switchAutoDownload.addTarget(self, action: #selector(autoDownloadSwitch), for: .valueChanged)
+        
 //        navigationItem.leftBarButtonItem = UIBarButtonItem(barButtonSystemItem: .cancel, target: self, action: #selector(didTapCancel))
     }
 
@@ -41,7 +67,31 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
         }
     }
     
-    func makeMenu(){
+    @objc func vibrateModeSwitch() {
+        UserDefaults.standard.set(switchVibrateMode.isOn, forKey: "vibrateMode")
+    }
+    
+    @objc func saveToGallerySwitch() {
+        if switchSaveToGallery.isOn {
+            PHPhotoLibrary.requestAuthorization({status in
+                DispatchQueue.main.async {
+                    if status == .authorized {
+                        UserDefaults.standard.set(self.switchSaveToGallery.isOn, forKey: "saveToGallery")
+                    } else {
+                        self.switchSaveToGallery.setOn(false, animated: true)
+                    }
+                }
+            })
+        } else {
+            UserDefaults.standard.set(self.switchSaveToGallery.isOn, forKey: "saveToGallery")
+        }
+    }
+    
+    @objc func autoDownloadSwitch() {
+        UserDefaults.standard.set(switchAutoDownload.isOn, forKey: "autoDownload")
+    }
+    
+    func makeMenu(imageSignIn: String = ""){
         let isChangeProfile = UserDefaults.standard.bool(forKey: "is_change_profile")
         Database.shared.database?.inTransaction({ fmdb, rollback in
             let idMe = UserDefaults.standard.string(forKey: "me") as String?
@@ -59,51 +109,100 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
                 if cursorUser.string(forColumnIndex: 0) == "23" && position == "1" {
                     Item.menus["Personal"] = [
                         Item(icon: UIImage(systemName: "person.fill"), title: "Personal Information".localized()),
-                        Item(icon: UIImage(systemName: "person.crop.rectangle"), title: "Change Admin / Internal Password".localized()),
-                        Item(icon: UIImage(systemName: "laptopcomputer.and.iphone"), title: "Login to Nexilis Web".localized()),
                         Item(icon: UIImage(systemName: "textformat.abc"), title: "Change Language".localized()),
+                        Item(icon: UIImage(systemName: "person.crop.rectangle"), title: "Change Admin / Internal Password".localized()),
+//                        Item(icon: UIImage(systemName: "laptopcomputer.and.iphone"), title: "Login to Nexilis Web".localized()),
                     ]
                 } else if cursorUser.string(forColumnIndex: 0) == "23" || cursorUser.string(forColumnIndex: 0) == "24" {
                     Item.menus["Personal"] = [
                         Item(icon: UIImage(systemName: "person.fill"), title: "Personal Information".localized()),
-                        Item(icon: UIImage(systemName: "laptopcomputer.and.iphone"), title: "Login to Nexilis Web".localized()),
-                            Item(icon: UIImage(systemName: "textformat.abc"), title: "Change Language".localized()),
+                        Item(icon: UIImage(systemName: "textformat.abc"), title: "Change Language".localized()),
+//                        Item(icon: UIImage(systemName: "laptopcomputer.and.iphone"), title: "Login to Nexilis Web".localized()),
                     ]
                 } else {
                     Item.menus["Personal"] = [
                         Item(icon: UIImage(systemName: "person.fill"), title: "Personal Information".localized()),
-                        Item(icon: UIImage(systemName: "person.crop.rectangle"), title: "Sign In Admin / Internal".localized()),
-                        Item(icon: UIImage(systemName: "laptopcomputer.and.iphone"), title: "Login to Nexilis Web".localized()),
+//                        Item(icon: UIImage(systemName: "laptopcomputer.and.iphone"), title: "Login to Nexilis Web".localized()),
                             Item(icon: UIImage(systemName: "textformat.abc"), title: "Change Language".localized()),
+                        Item(icon: UIImage(systemName: "person.crop.rectangle"), title: "Login as Admin / Internal".localized()),
                     ]
                 }
-                let image = cursorUser.string(forColumnIndex: 1) ?? ""
-                if !image.isEmpty {
+                if !isChangeProfile {
+                    Item.menus["Personal"]?.append(Item(icon: UIImage(systemName: "arrow.up.and.person.rectangle.portrait"), title: "Change Device".localized()))
+                } else if isChangeProfile {
+                    Item.menus["Personal"]?.append(Item(icon: UIImage(systemName: "rectangle.portrait.and.arrow.right"), title: "Logout".localized()))
+                }
+                let image = cursorUser.string(forColumnIndex: 1)
+                if image != nil {
+                    if !image!.isEmpty {
+                        do {
+                            let documentDir = try FileManager.default.url(for: .documentDirectory, in: .userDomainMask, appropriateFor: nil, create: true)
+                            let file = documentDir.appendingPathComponent(image!)
+                            if FileManager().fileExists(atPath: file.path) {
+                                let image = UIImage(contentsOfFile: file.path)
+                                Item.menus["Personal"]?[0].icon = image?.circleMasked
+                                if !imageSignIn.isEmpty {
+                                    var dataImage: [AnyHashable : Any] = [:]
+                                    dataImage["name"] = imageSignIn
+                                    NotificationCenter.default.post(name: NSNotification.Name(rawValue: "imageFBUpdate"), object: nil, userInfo: dataImage)
+                                }
+                            } else {
+                                Download().start(forKey: image!) { (name, progress) in
+                                    guard progress == 100 else {
+                                        return
+                                    }
+
+                                    DispatchQueue.main.async {
+                                        let image = UIImage(contentsOfFile: file.path)
+                                        Item.menus["Personal"]?[0].icon = image?.circleMasked
+                                        self.tableView.reloadData()
+                                        if !imageSignIn.isEmpty {
+                                            var dataImage: [AnyHashable : Any] = [:]
+                                            dataImage["name"] = imageSignIn
+                                            NotificationCenter.default.post(name: NSNotification.Name(rawValue: "imageFBUpdate"), object: nil, userInfo: dataImage)
+                                        }
+                                    }
+                                }
+                            }
+                        } catch {}
+                    }
+                }
+                cursorUser.close()
+            } else {
+                Item.menus["Personal"] = [
+                    Item(icon: UIImage(systemName: "person.fill"), title: "Personal Information".localized()),
+//                        Item(icon: UIImage(systemName: "laptopcomputer.and.iphone"), title: "Login to Nexilis Web".localized()),
+                        Item(icon: UIImage(systemName: "textformat.abc"), title: "Change Language".localized()),
+                    Item(icon: UIImage(systemName: "person.crop.rectangle"), title: "Login as Admin / Internal".localized()),
+                    Item(icon: UIImage(systemName: "arrow.up.and.person.rectangle.portrait"), title: "Change Device".localized())
+                ]
+                if !imageSignIn.isEmpty {
                     do {
                         let documentDir = try FileManager.default.url(for: .documentDirectory, in: .userDomainMask, appropriateFor: nil, create: true)
-                        let file = documentDir.appendingPathComponent(image)
+                        let file = documentDir.appendingPathComponent(imageSignIn)
                         if FileManager().fileExists(atPath: file.path) {
                             let image = UIImage(contentsOfFile: file.path)
                             Item.menus["Personal"]?[0].icon = image?.circleMasked
+                            var dataImage: [AnyHashable : Any] = [:]
+                            dataImage["name"] = imageSignIn
+                            NotificationCenter.default.post(name: NSNotification.Name(rawValue: "imageFBUpdate"), object: nil, userInfo: dataImage)
                         } else {
-                            Download().start(forKey: image) { (name, progress) in
+                            Download().start(forKey: imageSignIn) { (name, progress) in
                                 guard progress == 100 else {
                                     return
                                 }
-
                                 DispatchQueue.main.async {
                                     let image = UIImage(contentsOfFile: file.path)
                                     Item.menus["Personal"]?[0].icon = image?.circleMasked
                                     self.tableView.reloadData()
+                                    var dataImage: [AnyHashable : Any] = [:]
+                                    dataImage["name"] = imageSignIn
+                                    NotificationCenter.default.post(name: NSNotification.Name(rawValue: "imageFBUpdate"), object: nil, userInfo: dataImage)
                                 }
                             }
                         }
                     } catch {}
                 }
-                cursorUser.close()
-            }
-            if !isChangeProfile {
-                Item.menus["Personal"]?.append(Item(icon: UIImage(systemName: "arrow.up.and.person.rectangle.portrait"), title: "Change Device".localized()))
             }
         })
         
@@ -111,29 +210,19 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
             Item(icon: UIImage(systemName: "message"), title: "Incoming Message(s)".localized()),
             Item(icon: UIImage(systemName: "phone"), title: "Incoming Call(s)".localized()),
             Item(icon: UIImage(systemName: "iphone.homebutton.radiowaves.left.and.right"), title: "Vibrate Mode".localized()),
-        ]
-        Item.menus["Etc"] = [
             Item(icon: UIImage(systemName: "photo.on.rectangle.angled"), title: "Save to Gallery".localized()),
             Item(icon: UIImage(systemName: "arrow.down.square"), title: "Auto Download".localized()),
-//            Item(icon: UIImage(systemName: "mail"), title: "Email".localized()),
         ]
         Item.menus["Version"] = [
             Item(icon: UIImage(systemName: "gear"), title: "Version".localized()),
-        ]
-        if isChangeProfile {
-            Item.menus["Version"]?.append(Item(icon: UIImage(systemName: "rectangle.portrait.and.arrow.right"), title: "Logout".localized()))
-        }
-        Item.menus["Powered"] = [
-            Item(icon: UIImage(named: "pb_powered_button"), title: "Powered by Nexilis".localized()),
+            Item(icon: UIImage(named: "pb_powered_button", in: Bundle.resourceBundle(for: Nexilis.self), with: nil), title: "Powered by Nexilis".localized()),
         ]
     }
     
     override public func viewWillAppear(_ animated: Bool) {
-        let randomInt = Int.random(in: 1..<2)
+        let randomInt = Int.random(in: 1..<10)
         backgroundImage.image = UIImage(named: "pb_lbackground_\(randomInt)")
         self.navigationController?.navigationBar.topItem?.title = "Settings".localized();
-        let cpaasMode = PrefsUtil.getCpaasMode()
-        let isBurger = cpaasMode == PrefsUtil.CPAAS_MODE_BURGER
         navigationController?.setNavigationBarHidden(false, animated: false)
         navigationController?.navigationBar.backgroundColor = .clear
         navigationController?.navigationBar.setBackgroundImage(UIImage(), for: .default)
@@ -141,10 +230,6 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
         navigationController?.navigationBar.isTranslucent = true
     }
     
-//    @objc func didTapCancel(sender: AnyObject) {
-//        navigationController?.dismiss(animated: true, completion: nil)
-//    }
-    
     // MARK: - Table view data source
     
     public func numberOfSections(in tableView: UITableView) -> Int {
@@ -152,8 +237,8 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
     }
     
     public func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
-            return 1
-        }
+        return 1
+    }
     
     public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
         return Item.menuFor(section: section).count
@@ -162,7 +247,6 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
     public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
         let cell = tableView.dequeueReusableCell(withIdentifier: "reuseIdentifier", for: indexPath)
         cell.accessoryType = .none
-        cell.separatorInset = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: .greatestFiniteMagnitude)
         cell.indentationLevel = 0
         var content = cell.defaultContentConfiguration()
         content.textProperties.font = UIFont.systemFont(ofSize: 14)
@@ -176,21 +260,29 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
             content.imageProperties.tintColor = .mainColor
             content.imageProperties.maximumSize = CGSize(width: 24, height: 24)
             content.text = menu.title
+            cell.accessoryView = nil
             switch menu.title {
             case "Personal Information".localized():
                 cell.accessoryType = .disclosureIndicator
-            case "Sign In Admin / Internal".localized():
+            case "Login as Admin / Internal".localized():
                 cell.accessoryType = .disclosureIndicator
             case "Login to Nexilis Web".localized():
                 cell.accessoryType = .disclosureIndicator
             case "Change Device".localized():
                 cell.accessoryType = .disclosureIndicator
+//            case "Logout".localized():
             case "Change Admin / Internal Password".localized():
                 cell.accessoryType = .disclosureIndicator
             case "Change Language".localized():
                 cell.accessoryType = .disclosureIndicator
             case "Version".localized():
                 content.secondaryText = UIApplication.appVersion
+            case "Vibrate Mode".localized():
+                cell.accessoryView = switchVibrateMode
+            case "Save to Gallery".localized():
+                cell.accessoryView = switchSaveToGallery
+            case "Auto Download".localized():
+                cell.accessoryView = switchAutoDownload
             default:
                 content.secondaryText = nil
             }
@@ -207,58 +299,43 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
                 controller.data = UserDefaults.standard.string(forKey: "me")!
                 controller.flag = .me
                 controller.dismissImage = { image, imageName in
-                    if !imageName.isEmpty {
-                        Item.menus["Personal"]?[0].icon = image.circleMasked
-                    } else {
-                        Item.menus["Personal"]?[0].icon = UIImage(systemName: "person.fill")
-                    }
+                    var dataImage: [AnyHashable : Any] = [:]
+                    dataImage["name"] = imageName
+                    NotificationCenter.default.post(name: NSNotification.Name(rawValue: "imageFBUpdate"), object: nil, userInfo: dataImage)
+                    self.makeMenu()
                     self.tableView.reloadData()
                 }
                 navigationController?.show(controller, sender: nil)
             }
-        } else if item.title == "Sign In Admin / Internal".localized() || item.title == "Change Admin / Internal Password".localized() {
-            Database.shared.database?.inTransaction({ (fmdb, rollback) in
-                if let cursorData = Database.shared.getRecords(fmdb: fmdb, query: "SELECT first_name, last_name FROM BUDDY where f_pin = '\(UserDefaults.standard.string(forKey: "me")!)'"), cursorData.next() {
-                    if (cursorData.string(forColumnIndex: 0)! + " " + cursorData.string(forColumnIndex: 1)!).trimmingCharacters(in: .whitespaces) == "USR\(UserDefaults.standard.string(forKey: "me")!)" {
-                        let alert = UIAlertController(title: "Change Profile".localized(), message: "You must change your name to use this feature".localized(), preferredStyle: .alert)
-                        alert.addAction(UIAlertAction(title: "Ok".localized(), style: UIAlertAction.Style.default, handler: {(_) in
-                            let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "profileView") as! ProfileViewController
-                            controller.data = UserDefaults.standard.string(forKey: "me")!
-                            controller.flag = .me
-                            self.navigationController?.show(controller, sender: nil)
-                        }))
-                        self.present(alert, animated: true, completion: nil)
-                    }
-                    cursorData.close()
+        } else if item.title == "Login as Admin / Internal".localized() || item.title == "Change Admin / Internal Password".localized() {
+            if(ViewController.checkIsChangePerson()){
+                if !CheckConnection.isConnectedToNetwork()  || API.nGetCLXConnState() == 0 {
+                    let imageView = UIImageView(image: UIImage(systemName: "xmark.circle.fill"))
+                    imageView.tintColor = .white
+                    let banner = FloatingNotificationBanner(title: "Check your connection".localized(), subtitle: nil, titleFont: UIFont.systemFont(ofSize: 16), titleColor: nil, titleTextAlign: .left, subtitleFont: nil, subtitleColor: nil, subtitleTextAlign: nil, leftView: imageView, rightView: nil, style: .danger, colors: nil, iconPosition: .center)
+                    banner.show()
                     return
                 }
-            })
-            if !CheckConnection.isConnectedToNetwork()  || API.nGetCLXConnState() == 0 {
-                let imageView = UIImageView(image: UIImage(systemName: "xmark.circle.fill"))
-                imageView.tintColor = .white
-                let banner = FloatingNotificationBanner(title: "Check your connection".localized(), subtitle: nil, titleFont: UIFont.systemFont(ofSize: 16), titleColor: nil, titleTextAlign: .left, subtitleFont: nil, subtitleColor: nil, subtitleTextAlign: nil, leftView: imageView, rightView: nil, style: .danger, colors: nil, iconPosition: .top)
-                banner.show()
-                return
-            }
-            let alertController = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet)
-            if(item.title.contains("Change")){
-                if let action = self.actionChangePassword(for: "admin", title: "Change Admin Password".localized()) {
-                    alertController.addAction(action)
-                }
-                if let action = self.actionChangePassword(for: "internal", title: "Change Internal Password".localized()) {
-                    alertController.addAction(action)
-                }
-            }
-            else {
-                if let action = self.actionLogin(for: "admin", title: "Login as Admin".localized()) {
-                    alertController.addAction(action)
+                let alertController = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet)
+                if(item.title.contains("Change")){
+                    if let action = self.actionChangePassword(for: "admin", title: "Change Admin Password".localized()) {
+                        alertController.addAction(action)
+                    }
+                    if let action = self.actionChangePassword(for: "internal", title: "Change Internal Password".localized()) {
+                        alertController.addAction(action)
+                    }
                 }
-                if let action = self.actionLogin(for: "internal", title: "Login as Internal Team".localized()) {
-                    alertController.addAction(action)
+                else {
+                    if let action = self.actionLogin(for: "admin", title: "Login as Admin".localized()) {
+                        alertController.addAction(action)
+                    }
+                    if let action = self.actionLogin(for: "internal", title: "Login as Internal Team".localized()) {
+                        alertController.addAction(action)
+                    }
                 }
+                alertController.addAction(UIAlertAction(title: "Cancel".localized(), style: .cancel, handler: nil))
+                self.present(alertController, animated: true)
             }
-            alertController.addAction(UIAlertAction(title: "Cancel".localized(), style: .cancel, handler: nil))
-            self.present(alertController, animated: true)
         } else if item.title == "Change Language".localized() {
             let vc = UIViewController()
             vc.preferredContentSize = CGSize(width: UIScreen.main.bounds.width - 10, height: 150)
@@ -267,9 +344,9 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
             pickerView.delegate = self
             
             let lang = UserDefaults.standard.string(forKey: "i18n_language")
-            var index = 0
+            var index = 1
             if lang == "id" {
-                index = 1
+                index = 0
             }
             pickerView.selectRow(index, inComponent: 0, animated: false)
             
@@ -281,7 +358,7 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
             let alert = UIAlertController(title: "Select Language".localized(), message: "", preferredStyle: .actionSheet)
             
             alert.setValue(vc, forKey: "contentViewController")
-            alert.addAction(UIAlertAction(title: "Cancel", style: .cancel, handler: { (UIAlertAction) in
+            alert.addAction(UIAlertAction(title: "Cancel".localized(), style: .cancel, handler: { (UIAlertAction) in
             }))
             
             alert.addAction(UIAlertAction(title: "Select", style: .default, handler: { (UIAlertAction) in
@@ -289,79 +366,30 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
                 let lang = self.language[selectedIndex].values.first
                 UserDefaults.standard.set(lang, forKey: "i18n_language")
                 self.viewDidLoad()
-                self.tableView.reloadData()
             }))
             self.present(alert, animated: true, completion: nil)
         } else if item.title == "Change Device".localized() {
             let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "changeDevice") as! ChangeDeviceViewController
             controller.isDismiss = { newThumb in
-                if Item.menus["Personal"]?[2].title == "Login to Nexilis Web".localized() {
-                    Item.menus["Personal"]?.remove(at: 3)
-                } else {
-                    Item.menus["Personal"]?.remove(at: 2)
-                }
-                if !newThumb.isEmpty {
-                    do {
-                        let documentDir = try FileManager.default.url(for: .documentDirectory, in: .userDomainMask, appropriateFor: nil, create: true)
-                        let file = documentDir.appendingPathComponent(newThumb)
-                        if FileManager().fileExists(atPath: file.path) {
-                            let image = UIImage(contentsOfFile: file.path)
-                            Item.menus["Personal"]?[0].icon = image?.circleMasked
-                        } else {
-                            Download().start(forKey: newThumb) { (name, progress) in
-                                guard progress == 100 else {
-                                    return
-                                }
-
-                                DispatchQueue.main.async {
-                                    let image = UIImage(contentsOfFile: file.path)
-                                    Item.menus["Personal"]?[0].icon = image?.circleMasked
-                                    self.tableView.reloadData()
-                                }
-                            }
-                        }
-                    } catch {}
-                }
-                Item.menus["Version"]?.append(Item(icon: UIImage(systemName: "rectangle.portrait.and.arrow.right"), title: "Logout".localized()))
-                Database.shared.database?.inTransaction({ fmdb, rollback in
-                    let idMe = UserDefaults.standard.string(forKey: "me") as String?
-                    if let cursorUser = Database.shared.getRecords(fmdb: fmdb, query: "SELECT user_type FROM BUDDY where f_pin='\(idMe!)'"), cursorUser.next() {
-                        var groupId = ""
-                        if let cursorGroup = Database.shared.getRecords(fmdb: fmdb, query: "SELECT group_id FROM GROUPZ where group_type = 1 AND official = 1"), cursorGroup.next() {
-                            groupId = cursorGroup.string(forColumnIndex: 0) ?? ""
-                            cursorGroup.close()
-                        }
-                        var position = ""
-                        if let cursorIsAdmin = Database.shared.getRecords(fmdb: fmdb, query: "SELECT position FROM GROUPZ_MEMBER where group_id = '\(groupId)' AND f_pin = '\(idMe!)'"), cursorIsAdmin.next() {
-                            position = cursorIsAdmin.string(forColumnIndex: 0) ?? ""
-                            cursorIsAdmin.close()
-                        }
-                        if cursorUser.string(forColumnIndex: 0) == "23" && position == "1" {
-                            let itemCP = Item(icon: UIImage(systemName: "person.crop.rectangle"), title: "Change Admin / Internal Password".localized())
-                            Item.menus["Personal"]?[1] = itemCP
-                        } else if cursorUser.string(forColumnIndex: 0) == "23" || cursorUser.string(forColumnIndex: 0) == "24" {
-                            Item.menus["Personal"]?.remove(at: 1)
-                        }
-                        cursorUser.close()
-                    }
-                })
+                self.makeMenu(imageSignIn: newThumb)
                 self.tableView.reloadData()
             }
             navigationController?.show(controller, sender: nil)
         } else if item.title == "Logout".localized() {
-            let alert = UIAlertController(title: "Logout", message: "Are you sure want to logout?".localized(), preferredStyle: .alert)
+            let alert = UIAlertController(title: "Logout".localized(), message: "Are you sure want to logout?".localized(), preferredStyle: .alert)
             alert.addAction(UIAlertAction(title: "Cancel".localized(), style: UIAlertAction.Style.default, handler: nil))
             alert.addAction(UIAlertAction(title: "Yes".localized(), style: .destructive, handler: {(_) in
                 if !CheckConnection.isConnectedToNetwork()  || API.nGetCLXConnState() == 0 {
                     let imageView = UIImageView(image: UIImage(systemName: "xmark.circle.fill"))
                     imageView.tintColor = .white
-                    let banner = FloatingNotificationBanner(title: "Check your connection".localized(), subtitle: nil, titleFont: UIFont.systemFont(ofSize: 16), titleColor: nil, titleTextAlign: .left, subtitleFont: nil, subtitleColor: nil, subtitleTextAlign: nil, leftView: imageView, rightView: nil, style: .danger, colors: nil, iconPosition: .top)
+                    let banner = FloatingNotificationBanner(title: "Check your connection".localized(), subtitle: nil, titleFont: UIFont.systemFont(ofSize: 16), titleColor: nil, titleTextAlign: .left, subtitleFont: nil, subtitleColor: nil, subtitleTextAlign: nil, leftView: imageView, rightView: nil, style: .danger, colors: nil, iconPosition: .center)
                     banner.show()
                     return
                 }
                 DispatchQueue.global().async {
                     self.deleteAllRecordDatabase()
-                    let apiKey = UserDefaults.standard.string(forKey: "apiKey")!
+                    Nexilis.destroyAll()
+                    let apiKey = Nexilis.sAPIKey
                     var id = UIDevice.current.identifierForVendor?.uuidString ?? "UNK-DEVICE"
                     if let response = Nexilis.writeSync(message: CoreMessage_TMessageBank.getSignUpApi(api: apiKey, p_pin: id), timeout: 30 * 1000) {
                         id = response.getBody(key: CoreMessage_TMessageKey.F_PIN, default_value: "")
@@ -376,18 +404,12 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
                             DispatchQueue.main.async {
                                 let imageView = UIImageView(image: UIImage(systemName: "checkmark.circle.fill"))
                                 imageView.tintColor = .white
-                                let banner = FloatingNotificationBanner(title: "Successfully Logout".localized(), subtitle: nil, titleFont: UIFont.systemFont(ofSize: 16), titleColor: nil, titleTextAlign: .left, subtitleFont: nil, subtitleColor: nil, subtitleTextAlign: nil, leftView: imageView, rightView: nil, style: .success, colors: nil, iconPosition: .top)
+                                let banner = FloatingNotificationBanner(title: "Successfully Logout".localized(), subtitle: nil, titleFont: UIFont.systemFont(ofSize: 16), titleColor: nil, titleTextAlign: .left, subtitleFont: nil, subtitleColor: nil, subtitleTextAlign: nil, leftView: imageView, rightView: nil, style: .success, colors: nil, iconPosition: .center)
                                 banner.show()
-                                Item.menus["Personal"]?[0].icon = UIImage(systemName: "person.fill")
-                                Item.menus["Personal"]?.append(Item(icon: UIImage(systemName: "arrow.up.and.person.rectangle.portrait"), title: "Change Device".localized()))
-                                Item.menus["Version"]?.remove(at: 1)
-                                if Item.menus["Personal"]?[1].title != "Sign In Admin / Internal".localized() {
-                                    if Item.menus["Personal"]?[1].title == "Change Admin / Internal Password".localized() {
-                                        Item.menus["Personal"]?[1] = Item(icon: UIImage(systemName: "person.crop.rectangle"), title: "Sign In Admin / Internal".localized())
-                                    } else {
-                                        Item.menus["Personal"]?.insert(Item(icon: UIImage(systemName: "person.crop.rectangle"), title: "Sign In Admin / Internal".localized()), at: 1)
-                                    }
-                                }
+                                var dataImage: [AnyHashable : Any] = [:]
+                                dataImage["name"] = ""
+                                NotificationCenter.default.post(name: NSNotification.Name(rawValue: "imageFBUpdate"), object: nil, userInfo: dataImage)
+                                self.makeMenu()
                                 self.tableView.reloadData()
                             }
                         }
@@ -395,7 +417,7 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
                         DispatchQueue.main.async {
                             let imageView = UIImageView(image: UIImage(systemName: "xmark.circle.fill"))
                             imageView.tintColor = .white
-                            let banner = FloatingNotificationBanner(title: "Unable to access servers. Try again later".localized(), subtitle: nil, titleFont: UIFont.systemFont(ofSize: 16), titleColor: nil, titleTextAlign: .left, subtitleFont: nil, subtitleColor: nil, subtitleTextAlign: nil, leftView: imageView, rightView: nil, style: .danger, colors: nil, iconPosition: .top)
+                            let banner = FloatingNotificationBanner(title: "Unable to access servers. Try again later".localized(), subtitle: nil, titleFont: UIFont.systemFont(ofSize: 16), titleColor: nil, titleTextAlign: .left, subtitleFont: nil, subtitleColor: nil, subtitleTextAlign: nil, leftView: imageView, rightView: nil, style: .danger, colors: nil, iconPosition: .center)
                             banner.show()
                         }
                     }
@@ -415,14 +437,23 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
             self.alert?.addTextField{ (texfield) in
                 texfield.placeholder = "Password"
                 texfield.isSecureTextEntry = true
+                texfield.addPadding(.right(40))
                 texfield.addTarget(self, action: #selector(self.alertTextFieldDidChange(_:)), for: UIControl.Event.editingChanged)
+                
+                let buttonHideUnhide = UIButton()
+                buttonHideUnhide.tag = 0
+                texfield.addSubview(buttonHideUnhide)
+                buttonHideUnhide.anchor(top: texfield.topAnchor, right: texfield.rightAnchor, paddingTop: -7, width: 30, height: 30)
+                buttonHideUnhide.setImage(UIImage(systemName: "eye.slash.fill"), for: .normal)
+                buttonHideUnhide.tintColor = .black
+                buttonHideUnhide.addTarget(self, action: #selector(self.showPassword), for: .touchUpInside)
             }
             let submitAction = UIAlertAction(title: "Sign In".localized(), style: .default, handler: { (action) -> Void in
                 let textField = self.alert?.textFields![0]
                 if !CheckConnection.isConnectedToNetwork()  || API.nGetCLXConnState() == 0 {
                     let imageView = UIImageView(image: UIImage(systemName: "xmark.circle.fill"))
                     imageView.tintColor = .white
-                    let banner = FloatingNotificationBanner(title: "Check your connection".localized(), subtitle: nil, titleFont: UIFont.systemFont(ofSize: 16), titleColor: nil, titleTextAlign: .left, subtitleFont: nil, subtitleColor: nil, subtitleTextAlign: nil, leftView: imageView, rightView: nil, style: .danger, colors: nil, iconPosition: .top)
+                    let banner = FloatingNotificationBanner(title: "Check your connection".localized(), subtitle: nil, titleFont: UIFont.systemFont(ofSize: 16), titleColor: nil, titleTextAlign: .left, subtitleFont: nil, subtitleColor: nil, subtitleTextAlign: nil, leftView: imageView, rightView: nil, style: .danger, colors: nil, iconPosition: .center)
                     banner.show()
                     return
                 }
@@ -432,7 +463,7 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
                             DispatchQueue.main.async {
                                 let imageView = UIImageView(image: UIImage(systemName: "checkmark.circle.fill"))
                                 imageView.tintColor = .white
-                                let banner = FloatingNotificationBanner(title: "Successfully login Admin".localized(), subtitle: nil, titleFont: UIFont.systemFont(ofSize: 16), titleColor: nil, titleTextAlign: .left, subtitleFont: nil, subtitleColor: nil, subtitleTextAlign: nil, leftView: imageView, rightView: nil, style: .success, colors: nil, iconPosition: .top)
+                                let banner = FloatingNotificationBanner(title: "Successfully login Admin".localized(), subtitle: nil, titleFont: UIFont.systemFont(ofSize: 16), titleColor: nil, titleTextAlign: .left, subtitleFont: nil, subtitleColor: nil, subtitleTextAlign: nil, leftView: imageView, rightView: nil, style: .success, colors: nil, iconPosition: .center)
                                 banner.show()
                                 let itemCP = Item(icon: UIImage(systemName: "person.crop.rectangle"), title: "Change Admin / Internal Password".localized())
                                 Item.menus["Personal"]?[1] = itemCP
@@ -446,7 +477,7 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
                             DispatchQueue.main.async {
                                 let imageView = UIImageView(image: UIImage(systemName: "checkmark.circle.fill"))
                                 imageView.tintColor = .white
-                                let banner = FloatingNotificationBanner(title: "Successfully login Internal Team".localized(), subtitle: nil, titleFont: UIFont.systemFont(ofSize: 16), titleColor: nil, titleTextAlign: .left, subtitleFont: nil, subtitleColor: nil, subtitleTextAlign: nil, leftView: imageView, rightView: nil, style: .success, colors: nil, iconPosition: .top)
+                                let banner = FloatingNotificationBanner(title: "Successfully login Internal Team".localized(), subtitle: nil, titleFont: UIFont.systemFont(ofSize: 16), titleColor: nil, titleTextAlign: .left, subtitleFont: nil, subtitleColor: nil, subtitleTextAlign: nil, leftView: imageView, rightView: nil, style: .success, colors: nil, iconPosition: .center)
                                 banner.show()
                                 Item.menus["Personal"]?.remove(at: 1)
                                 self.tableView.reloadData()
@@ -473,14 +504,32 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
             self.alert?.addTextField{ (texfield) in
                 texfield.placeholder = "Old Password"
                 texfield.isSecureTextEntry = true
+                texfield.addPadding(.right(40))
                 texfield.addTarget(self, action: #selector(self.alertTextFieldDidChange(_:)), for: UIControl.Event.editingChanged)
                 self.textFields.append(texfield)
+                
+                let buttonHideUnhide = UIButton()
+                buttonHideUnhide.tag = 0
+                texfield.addSubview(buttonHideUnhide)
+                buttonHideUnhide.anchor(top: texfield.topAnchor, right: texfield.rightAnchor, paddingTop: -7, width: 30, height: 30)
+                buttonHideUnhide.setImage(UIImage(systemName: "eye.slash.fill"), for: .normal)
+                buttonHideUnhide.tintColor = .black
+                buttonHideUnhide.addTarget(self, action: #selector(self.showPassword), for: .touchUpInside)
             }
             self.alert?.addTextField{ (texfield) in
                 texfield.placeholder = "New Password"
                 texfield.isSecureTextEntry = true
+                texfield.addPadding(.right(40))
                 texfield.addTarget(self, action: #selector(self.alertTextFieldDidChange(_:)), for: UIControl.Event.editingChanged)
                 self.textFields.append(texfield)
+                
+                let buttonHideUnhide = UIButton()
+                buttonHideUnhide.tag = 1
+                texfield.addSubview(buttonHideUnhide)
+                buttonHideUnhide.anchor(top: texfield.topAnchor, right: texfield.rightAnchor, paddingTop: -7, width: 30, height: 30)
+                buttonHideUnhide.setImage(UIImage(systemName: "eye.slash.fill"), for: .normal)
+                buttonHideUnhide.tintColor = .black
+                buttonHideUnhide.addTarget(self, action: #selector(self.showPassword), for: .touchUpInside)
             }
             let submitAction = UIAlertAction(title: "Change Password".localized(), style: .default, handler: { (action) -> Void in
                 let textFieldOld = self.alert?.textFields![0]
@@ -488,7 +537,7 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
                 if !CheckConnection.isConnectedToNetwork()  || API.nGetCLXConnState() == 0 {
                     let imageView = UIImageView(image: UIImage(systemName: "xmark.circle.fill"))
                     imageView.tintColor = .white
-                    let banner = FloatingNotificationBanner(title: "Check your connection".localized(), subtitle: nil, titleFont: UIFont.systemFont(ofSize: 16), titleColor: nil, titleTextAlign: .left, subtitleFont: nil, subtitleColor: nil, subtitleTextAlign: nil, leftView: imageView, rightView: nil, style: .danger, colors: nil, iconPosition: .top)
+                    let banner = FloatingNotificationBanner(title: "Check your connection".localized(), subtitle: nil, titleFont: UIFont.systemFont(ofSize: 16), titleColor: nil, titleTextAlign: .left, subtitleFont: nil, subtitleColor: nil, subtitleTextAlign: nil, leftView: imageView, rightView: nil, style: .danger, colors: nil, iconPosition: .center)
                     banner.show()
                     return
                 }
@@ -498,7 +547,7 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
                             DispatchQueue.main.async {
                                 let imageView = UIImageView(image: UIImage(systemName: "checkmark.circle.fill"))
                                 imageView.tintColor = .white
-                                let banner = FloatingNotificationBanner(title: "Admin password changed successfully".localized(), subtitle: nil, titleFont: UIFont.systemFont(ofSize: 16), titleColor: nil, titleTextAlign: .left, subtitleFont: nil, subtitleColor: nil, subtitleTextAlign: nil, leftView: imageView, rightView: nil, style: .success, colors: nil, iconPosition: .top)
+                                let banner = FloatingNotificationBanner(title: "Admin password changed successfully".localized(), subtitle: nil, titleFont: UIFont.systemFont(ofSize: 16), titleColor: nil, titleTextAlign: .left, subtitleFont: nil, subtitleColor: nil, subtitleTextAlign: nil, leftView: imageView, rightView: nil, style: .success, colors: nil, iconPosition: .center)
                                 banner.show()
                             }
                         }
@@ -509,7 +558,7 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
                             DispatchQueue.main.async {
                                 let imageView = UIImageView(image: UIImage(systemName: "checkmark.circle.fill"))
                                 imageView.tintColor = .white
-                                let banner = FloatingNotificationBanner(title: "Internal password changed successfully".localized(), subtitle: nil, titleFont: UIFont.systemFont(ofSize: 16), titleColor: nil, titleTextAlign: .left, subtitleFont: nil, subtitleColor: nil, subtitleTextAlign: nil, leftView: imageView, rightView: nil, style: .success, colors: nil, iconPosition: .top)
+                                let banner = FloatingNotificationBanner(title: "Internal password changed successfully".localized(), subtitle: nil, titleFont: UIFont.systemFont(ofSize: 16), titleColor: nil, titleTextAlign: .left, subtitleFont: nil, subtitleColor: nil, subtitleTextAlign: nil, leftView: imageView, rightView: nil, style: .success, colors: nil, iconPosition: .center)
                                 banner.show()
                             }
                         }
@@ -524,6 +573,18 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
         }
     }
     
+    @objc func showPassword(_ sender:UIButton) {
+        if alert!.textFields![sender.tag].isSecureTextEntry {
+            alert!.textFields![sender.tag].isSecureTextEntry = false
+            let buttonImage = alert!.textFields![sender.tag].subviews[0] as! UIButton
+            buttonImage.setImage(UIImage(systemName: "eye.fill"), for: .normal)
+        } else {
+            alert!.textFields![sender.tag].isSecureTextEntry = true
+            let buttonImage = alert!.textFields![sender.tag].subviews[0] as! UIButton
+            buttonImage.setImage(UIImage(systemName: "eye.slash.fill"), for: .normal)
+        }
+    }
+    
     @objc func alertTextFieldDidChange(_ sender: UITextField) {
         if(!textFields.isEmpty){
             print("text count 0: \(textFields[0].text!.count)")
@@ -692,7 +753,7 @@ struct Item: Hashable {
     var title = ""
     
     static var sections: [String] {
-        return ["Personal", "Call", "Etc", "Version", "Powered"]
+        return ["Personal", "Call", "Version"]
     }
     
     static var menus: [String: [Item]] = [:]

+ 1 - 0
appbuilder-ios/AppBuilder/AppBuilder/SecondTabViewController.swift

@@ -883,6 +883,7 @@ extension SecondTabViewController: UITableViewDelegate, UITableViewDataSource {
             content.text = ""
             cell.contentConfiguration = content
         }
+        cell.backgroundColor = .clear
         return cell
     }
     

+ 6 - 5
appbuilder-ios/AppBuilder/AppBuilder/ThirdTabViewController.swift

@@ -25,6 +25,7 @@ class ThirdTabViewController: UIViewController, UIScrollViewDelegate, UIGestureR
         webView.scrollView.addSubview(refreshControl)
         webView.scrollView.delegate = self
         webView.navigationDelegate = self
+        webView.allowsBackForwardNavigationGestures = true
         // Do any additional setup after loading the view.
     }
     
@@ -34,20 +35,20 @@ class ThirdTabViewController: UIViewController, UIScrollViewDelegate, UIGestureR
         var myURL : URL?
         switch(ViewController.tab3){
         case "0":
-            address = "https://qmera.io/nexilis/pages/tab1-main-only?f_pin=\(me ?? "")"
+            address = "\(PrefsUtil.getURLBase() ?? "https://qmera.io/")nexilis/pages/tab1-main-only?f_pin=\(me ?? "")"
             myURL = URL(string: address)
         case "1":
-            address = "https://qmera.io/nexilis/pages/tab3-main-only?f_pin=\(me ?? "")"
+            address = "\(PrefsUtil.getURLBase() ?? "https://qmera.io/")nexilis/pages/tab3-main-only?f_pin=\(me ?? "")"
             myURL = URL(string: address)
         case "2":
-            address = "https://qmera.io/nexilis/pages/tab1-main?f_pin=\(me ?? "")"
+            address = "\(PrefsUtil.getURLBase() ?? "https://qmera.io/")nexilis/pages/tab1-main?f_pin=\(me ?? "")"
             myURL = URL(string: address)
         case "3":
-            address = "https://qmera.io/nexilis/pages/tab3-commerce?f_pin=\(me ?? "")"
+            address = "\(PrefsUtil.getURLBase() ?? "https://qmera.io/")nexilis/pages/tab3-commerce?f_pin=\(me ?? "")"
             myURL = URL(string: address)
         default:
             if(!ViewController.tab3.isEmpty){
-                if(ViewController.tab3.lowercased().contains("https://")){
+                if(ViewController.tab3.lowercased().contains("https://") || ViewController.sURL.lowercased().contains("http://")){
                     address = ViewController.tab3
                     myURL = URL(string: address)
                 }

+ 3 - 4
appbuilder-ios/AppBuilder/AppBuilder/ViewController.swift

@@ -168,14 +168,13 @@ class ViewController: UITabBarController, UITabBarControllerDelegate {
                 let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "changeNS") as! ChangeNamePassswordViewController
                 let navigationController = UINavigationController(rootViewController: controller)
                 navigationController.modalPresentationStyle = .custom
-//                navigationController.navigationBar.tintColor = .white
+                navigationController.navigationBar.tintColor = .white
                 navigationController.navigationBar.barTintColor = .mainColor
                 navigationController.navigationBar.isTranslucent = false
-//                let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
-//                navigationController.navigationBar.titleTextAttributes = textAttributes
+                let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
+                navigationController.navigationBar.titleTextAttributes = textAttributes
                 navigationController.view.backgroundColor = .mainColor
                 ViewController.def?.show(b: false)
-                UIApplication.shared.windows.filter {$0.isKeyWindow}.first?.rootViewController?.dismiss(animated: true, completion: nil)
                 UIApplication.shared.windows.filter {$0.isKeyWindow}.first?.rootViewController?.present(navigationController, animated: true, completion: nil)
                 }))
             UIApplication.shared.windows.filter {$0.isKeyWindow}.first?.rootViewController?.present(alert, animated: true, completion: nil)

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

@@ -19,8 +19,8 @@ public class ChangeDeviceViewController: UIViewController {
     public override func viewDidLoad() {
         super.viewDidLoad()
         
-        let randomInt = Int.random(in: 5..<11)
-        let image = UIImage(named: "lbackground_\(randomInt)")
+        let randomInt = 1
+        let image = UIImage(named: "pb_lbackground_\(randomInt)")
         if image != nil {
             self.view.backgroundColor = UIColor.init(patternImage: image!)
         }

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

@@ -24,8 +24,8 @@ public class ChangeNamePassswordViewController: UIViewController {
     public override func viewDidLoad() {
         super.viewDidLoad()
         
-        let randomInt = Int.random(in: 5..<11)
-        let image = UIImage(named: "lbackground_\(randomInt)")
+        let randomInt = 1
+        let image = UIImage(named: "pb_lbackground_\(randomInt)")
         if image != nil {
             self.view.backgroundColor = UIColor.init(patternImage: image!)
         }

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

@@ -151,8 +151,8 @@ public class ProfileViewController: UITableViewController {
         profile.isUserInteractionEnabled = true
         profile.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(profileTapped)))
         
-        let randomInt = Int.random(in: 5..<11)
-        let image = UIImage(named: "lbackground_\(randomInt)")
+        let randomInt = 1
+        let image = UIImage(named: "pb_lbackground_\(randomInt)")
         if image != nil {
             self.view.backgroundColor = UIColor.init(patternImage: image!)
         }

+ 6 - 6
src/mainIOS.py

@@ -11,15 +11,15 @@ from zipfile import ZipFile
 ImageFile.SAFEBLOCK = 2048 * 2048
 
 app = Flask(__name__)
-app.base_project = "/Users/maronakins/Documents/AppBuilder/appbuilder-ios/AppBuilder"
-app.nexilis_lite = "/Users/maronakins/Documents/AppBuilder/appbuilder-ios/NexilisLite"
-app.temp_folder = "/Users/maronakins/BuildIos"
-app.app_folder = "/Users/maronakins/"
-app.asset_folder = "/Users/maronakins/BuildIosAssets"
+app.base_project = "/Users/easysoft/Documents/AppBuilder/appbuilder-ios/AppBuilder"
+app.nexilis_lite = "/Users/easysoft/Documents/AppBuilder/appbuilder-ios/NexilisLite"
+app.temp_folder = "/Users/easysoft/Documents/BuildIos"
+app.app_folder = "/Users/easysoft/Documents"
+app.asset_folder = "/Users/easysoft/Documents/BuildIosAssets"
 app.verbose = True
 app.ssl = None
 app.keytool = '/usr/bin/keytool'
-app.username = "maronakins"
+app.username = "easysoft"
 # app.ios_platform_ids = ["bb8f256703e8fbe84da414cee20cb4d0eca3388d"]
 app.ios_platform_ids = []
 app.app_name = "AppBuilder"