瀏覽代碼

fix force login style

alqindiirsyam 8 月之前
父節點
當前提交
e67ba130a0

+ 9 - 9
appbuilder-ios/NexilisLite/NexilisLite/Resource/Palio.storyboard

@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
     <device id="retina6_1" orientation="portrait" appearance="light"/>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23506"/>
         <capability name="Image references" minToolsVersion="12.0"/>
         <capability name="Safe area layout guides" minToolsVersion="9.0"/>
         <capability name="System colors in document resources" minToolsVersion="11.0"/>
@@ -921,7 +921,7 @@
                                 <textInputTraits key="textInputTraits"/>
                             </textField>
                             <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ytt-6A-LrS">
-                                <rect key="frame" x="357" y="168" width="27" height="22"/>
+                                <rect key="frame" x="358" y="168" width="26" height="22"/>
                                 <color key="tintColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                 <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                                 <state key="normal" image="eye.fill" catalog="system"/>
@@ -1018,7 +1018,7 @@
                                 <textInputTraits key="textInputTraits"/>
                             </textField>
                             <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="X96-Lm-m7m">
-                                <rect key="frame" x="356" y="341.5" width="27" height="22"/>
+                                <rect key="frame" x="357" y="341.5" width="26" height="22"/>
                                 <color key="tintColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                 <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                                 <state key="normal" image="eye.fill" catalog="system"/>
@@ -1032,7 +1032,7 @@
                             </label>
                         </subviews>
                         <viewLayoutGuide key="safeArea" id="RPn-R1-EZG"/>
-                        <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                        <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                         <constraints>
                             <constraint firstItem="X96-Lm-m7m" firstAttribute="top" secondItem="1fG-j6-8fG" secondAttribute="bottom" constant="16" id="3eH-AY-dnA"/>
                             <constraint firstItem="rgo-tO-vXt" firstAttribute="top" secondItem="kTB-1V-x5Q" secondAttribute="bottom" constant="20" id="5mN-Lm-La3"/>
@@ -1085,7 +1085,7 @@
                                 <textInputTraits key="textInputTraits"/>
                             </textField>
                             <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="C5k-R9-1NU">
-                                <rect key="frame" x="356" y="131" width="27" height="22"/>
+                                <rect key="frame" x="357" y="131" width="26" height="22"/>
                                 <color key="tintColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                 <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                                 <state key="normal" image="eye.fill" catalog="system"/>
@@ -1097,7 +1097,7 @@
                                 <textInputTraits key="textInputTraits"/>
                             </textField>
                             <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ZZQ-tO-BPg">
-                                <rect key="frame" x="356" y="175" width="27" height="22"/>
+                                <rect key="frame" x="357" y="175" width="26" height="22"/>
                                 <color key="tintColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                 <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                                 <state key="normal" image="eye.fill" catalog="system"/>
@@ -2986,7 +2986,7 @@
                                 <textInputTraits key="textInputTraits"/>
                             </textField>
                             <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="SAR-sw-Oq9">
-                                <rect key="frame" x="356" y="341.5" width="27" height="22"/>
+                                <rect key="frame" x="357" y="341.5" width="26" height="22"/>
                                 <color key="tintColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                 <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                                 <state key="normal" image="eye.fill" catalog="system"/>
@@ -3260,7 +3260,7 @@
         <image name="person.crop.circle.fill" catalog="system" width="128" height="123"/>
         <image name="person.fill" catalog="system" width="128" height="120"/>
         <image name="phone" catalog="system" width="128" height="115"/>
-        <image name="phone.down.fill" catalog="system" width="128" height="55"/>
+        <image name="phone.down.fill" catalog="system" width="128" height="53"/>
         <image name="phone.fill" catalog="system" width="128" height="114"/>
         <image name="plus" catalog="system" width="128" height="113"/>
         <image name="speaker.slash.fill" catalog="system" width="115" height="128"/>

+ 4 - 1
appbuilder-ios/NexilisLite/NexilisLite/Source/Nexilis.swift

@@ -225,7 +225,9 @@ public class Nexilis: NSObject {
                             }
                         })
                     } else if isShowForceSignIn && !Utils.getForceAnonymous() && !Utils.getSetProfile() {
-                        showForceSignIn()
+                        DispatchQueue.main.async {
+                            showForceSignIn()
+                        }
                     }
                     getServiceBank()
                     getPullWorkingArea()
@@ -487,6 +489,7 @@ public class Nexilis: NSObject {
         let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "changeDevice") as! ChangeDeviceViewController
         controller.forceLogin = true
         let navigationController = CustomNavigationController(rootViewController: controller)
+        navigationController.modalPresentationStyle = .fullScreen
         navigationController.navigationBar.tintColor = .white
         navigationController.navigationBar.barTintColor = UIApplication.shared.visibleViewController?.traitCollection.userInterfaceStyle == .dark ? .blackDarkMode : .mainColor
         navigationController.navigationBar.isTranslucent = false

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

@@ -22,7 +22,15 @@ public class ChangeDeviceViewController: UIViewController {
     public override func viewDidLoad() {
         super.viewDidLoad()
         
-        self.view.backgroundColor = .white
+//        self.view.backgroundColor = .white
+        let attributes = [NSAttributedString.Key.foregroundColor: UIColor.white]
+        let navBarAppearance = UINavigationBarAppearance()
+        navBarAppearance.configureWithOpaqueBackground()
+        navBarAppearance.backgroundColor = self.traitCollection.userInterfaceStyle == .dark ? .blackDarkMode : UIColor.mainColor
+        navBarAppearance.titleTextAttributes = attributes
+        navigationController?.navigationBar.standardAppearance = navBarAppearance
+        navigationController?.navigationBar.scrollEdgeAppearance = navBarAppearance
+        navigationController?.navigationBar.tintColor = .white
 
         self.title = "Sign-In".localized()
         descLogin.text = "Please enter your registered nickname or email address to Sign-In".localized()
@@ -42,6 +50,12 @@ public class ChangeDeviceViewController: UIViewController {
         view.addGestureRecognizer(tapGesture)
     }
     
+    public override func viewWillAppear(_ animated: Bool) {
+        navigationController?.navigationBar.titleTextAttributes = [NSAttributedString.Key.foregroundColor: UIColor.white]
+        navigationController?.navigationBar.tintColor = .white
+        navigationItem.rightBarButtonItem?.setTitleTextAttributes([NSAttributedString.Key.foregroundColor: UIColor.white], for: .normal)
+    }
+    
     @objc func checkUsername(_ textField: UITextField) {
         let text : String! = usernameField.text
         if isValidEmail(text) {