|
@@ -141,7 +141,7 @@ public class FloatingButton: UIView {
|
|
|
button_fb1.heightAnchor.constraint(equalToConstant: 40).isActive = true
|
|
|
button_fb1.translatesAutoresizingMaskIntoConstraints = false
|
|
|
DispatchQueue.global().async {
|
|
|
- let data = try? Data(contentsOf: URL(string: "https://qmera.io/filepalio/image/\(json["icon"]!!)")!) //make sure your image in this url does exist, otherwise unwrap in a if let check / try-catch
|
|
|
+ let data = try? Data(contentsOf: URL(string: "https://\(Nexilis.ADDRESS)/filepalio/image/\(json["icon"]!!)")!) //make sure your image in this url does exist, otherwise unwrap in a if let check / try-catch
|
|
|
DispatchQueue.main.async { [self] in
|
|
|
if data != nil {
|
|
|
button_fb1.setImage(UIImage(data: data!), for: .normal)
|
|
@@ -155,7 +155,7 @@ public class FloatingButton: UIView {
|
|
|
button_fb2.heightAnchor.constraint(equalToConstant: 40).isActive = true
|
|
|
button_fb2.translatesAutoresizingMaskIntoConstraints = false
|
|
|
DispatchQueue.global().async {
|
|
|
- let data = try? Data(contentsOf: URL(string: "https://qmera.io/filepalio/image/\(json["icon"]!!)")!) //make sure your image in this url does exist, otherwise unwrap in a if let check / try-catch
|
|
|
+ let data = try? Data(contentsOf: URL(string: "https://\(Nexilis.ADDRESS)/filepalio/image/\(json["icon"]!!)")!) //make sure your image in this url does exist, otherwise unwrap in a if let check / try-catch
|
|
|
DispatchQueue.main.async { [self] in
|
|
|
if data != nil {
|
|
|
button_fb2.setImage(UIImage(data: data!), for: .normal)
|
|
@@ -170,7 +170,7 @@ public class FloatingButton: UIView {
|
|
|
button_fb3.heightAnchor.constraint(equalToConstant: 40).isActive = true
|
|
|
button_fb3.translatesAutoresizingMaskIntoConstraints = false
|
|
|
DispatchQueue.global().async {
|
|
|
- let data = try? Data(contentsOf: URL(string: "https://qmera.io/filepalio/image/\(json["icon"]!!)")!) //make sure your image in this url does exist, otherwise unwrap in a if let check / try-catch
|
|
|
+ let data = try? Data(contentsOf: URL(string: "https://\(Nexilis.ADDRESS)/filepalio/image/\(json["icon"]!!)")!) //make sure your image in this url does exist, otherwise unwrap in a if let check / try-catch
|
|
|
DispatchQueue.main.async { [self] in
|
|
|
if data != nil {
|
|
|
button_fb3.setImage(UIImage(data: data!), for: .normal)
|
|
@@ -185,7 +185,7 @@ public class FloatingButton: UIView {
|
|
|
button_fb4.translatesAutoresizingMaskIntoConstraints = false
|
|
|
iconCC = json["icon"] as! String
|
|
|
DispatchQueue.global().async {
|
|
|
- let data = try? Data(contentsOf: URL(string: "https://qmera.io/filepalio/image/\(self.iconCC)")!) //make sure your image in this url does exist, otherwise unwrap in a if let check / try-catch
|
|
|
+ let data = try? Data(contentsOf: URL(string: "https://\(Nexilis.ADDRESS)/filepalio/image/\(self.iconCC)")!) //make sure your image in this url does exist, otherwise unwrap in a if let check / try-catch
|
|
|
DispatchQueue.main.async { [self] in
|
|
|
if data != nil {
|
|
|
button_fb4.setImage(UIImage(data: data!), for: .normal)
|
|
@@ -200,7 +200,7 @@ public class FloatingButton: UIView {
|
|
|
newButton.heightAnchor.constraint(equalToConstant: 40).isActive = true
|
|
|
newButton.translatesAutoresizingMaskIntoConstraints = false
|
|
|
DispatchQueue.global().async {
|
|
|
- let data = try? Data(contentsOf: URL(string: "https://qmera.io/filepalio/image/\(json["icon"]!!)")!) //make sure your image in this url does exist, otherwise unwrap in a if let check / try-catch
|
|
|
+ let data = try? Data(contentsOf: URL(string: "https://\(Nexilis.ADDRESS)/filepalio/image/\(json["icon"]!!)")!) //make sure your image in this url does exist, otherwise unwrap in a if let check / try-catch
|
|
|
DispatchQueue.main.async {
|
|
|
if data != nil {
|
|
|
newButton.setImage(UIImage(data: data!), for: .normal)
|
|
@@ -584,6 +584,89 @@ public class FloatingButton: UIView {
|
|
|
}
|
|
|
hideButton()
|
|
|
}
|
|
|
+
|
|
|
+ @objc func bniBookingTap() {
|
|
|
+ let isChangeProfile = UserDefaults.standard.bool(forKey: "is_change_profile")
|
|
|
+ if !isChangeProfile {
|
|
|
+ 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: "changeNS") as! ChangeNamePassswordViewController
|
|
|
+ let navigationController = UINavigationController(rootViewController: controller)
|
|
|
+ navigationController.modalPresentationStyle = .custom
|
|
|
+ navigationController.navigationBar.tintColor = .white
|
|
|
+ navigationController.navigationBar.barTintColor = .mainColor
|
|
|
+ navigationController.navigationBar.isTranslucent = false
|
|
|
+ let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
|
|
|
+ navigationController.navigationBar.titleTextAttributes = textAttributes
|
|
|
+ navigationController.view.backgroundColor = .mainColor
|
|
|
+ if UIApplication.shared.visibleViewController?.navigationController != nil {
|
|
|
+ UIApplication.shared.visibleViewController?.navigationController?.present(navigationController, animated: true, completion: nil)
|
|
|
+ } else {
|
|
|
+ UIApplication.shared.visibleViewController?.present(navigationController, animated: true, completion: nil)
|
|
|
+ }
|
|
|
+ }))
|
|
|
+ if UIApplication.shared.visibleViewController?.navigationController != nil {
|
|
|
+ UIApplication.shared.visibleViewController?.navigationController?.present(alert, animated: true, completion: nil)
|
|
|
+ } else {
|
|
|
+ UIApplication.shared.visibleViewController?.present(alert, animated: true, completion: nil)
|
|
|
+ }
|
|
|
+ hideButton()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ let controller = BNIBookingWebView()
|
|
|
+ controller.modalPresentationStyle = .custom
|
|
|
+ if UIApplication.shared.visibleViewController?.navigationController != nil {
|
|
|
+ UIApplication.shared.visibleViewController?.navigationController?.present(controller, animated: true, completion: nil)
|
|
|
+ } else {
|
|
|
+ UIApplication.shared.visibleViewController?.present(controller, animated: true, completion: nil)
|
|
|
+ }
|
|
|
+ hideButton()
|
|
|
+ }
|
|
|
+
|
|
|
+ @objc func historyBroadcastTap() {
|
|
|
+ let isChangeProfile = UserDefaults.standard.bool(forKey: "is_change_profile")
|
|
|
+ if !isChangeProfile {
|
|
|
+ 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: "changeNS") as! ChangeNamePassswordViewController
|
|
|
+ let navigationController = UINavigationController(rootViewController: controller)
|
|
|
+ navigationController.modalPresentationStyle = .custom
|
|
|
+ navigationController.navigationBar.tintColor = .white
|
|
|
+ navigationController.navigationBar.barTintColor = .mainColor
|
|
|
+ navigationController.navigationBar.isTranslucent = false
|
|
|
+ let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
|
|
|
+ navigationController.navigationBar.titleTextAttributes = textAttributes
|
|
|
+ navigationController.view.backgroundColor = .mainColor
|
|
|
+ if UIApplication.shared.visibleViewController?.navigationController != nil {
|
|
|
+ UIApplication.shared.visibleViewController?.navigationController?.present(navigationController, animated: true, completion: nil)
|
|
|
+ } else {
|
|
|
+ UIApplication.shared.visibleViewController?.present(navigationController, animated: true, completion: nil)
|
|
|
+ }
|
|
|
+ }))
|
|
|
+ if UIApplication.shared.visibleViewController?.navigationController != nil {
|
|
|
+ UIApplication.shared.visibleViewController?.navigationController?.present(alert, animated: true, completion: nil)
|
|
|
+ } else {
|
|
|
+ UIApplication.shared.visibleViewController?.present(alert, animated: true, completion: nil)
|
|
|
+ }
|
|
|
+ hideButton()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ let controller = HistoryBroadcastViewController()
|
|
|
+ let navigationController = UINavigationController(rootViewController: controller)
|
|
|
+ navigationController.modalPresentationStyle = .custom
|
|
|
+ navigationController.navigationBar.tintColor = .white
|
|
|
+ navigationController.navigationBar.barTintColor = .mainColor
|
|
|
+ navigationController.navigationBar.isTranslucent = false
|
|
|
+ let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
|
|
|
+ navigationController.navigationBar.titleTextAttributes = textAttributes
|
|
|
+ navigationController.view.backgroundColor = .mainColor
|
|
|
+ if UIApplication.shared.visibleViewController?.navigationController != nil {
|
|
|
+ UIApplication.shared.visibleViewController?.navigationController?.present(navigationController, animated: true, completion: nil)
|
|
|
+ } else {
|
|
|
+ UIApplication.shared.visibleViewController?.present(navigationController, animated: true, completion: nil)
|
|
|
+ }
|
|
|
+ hideButton()
|
|
|
+ }
|
|
|
|
|
|
@objc func qmeraLongPress() {
|
|
|
let navigationController = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "settingNav") as! UINavigationController
|