Skip to content

Commit

Permalink
Update to Swift 3 & Modify prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
Chriskuei committed Apr 3, 2017
1 parent a496b3e commit c97ec2e
Show file tree
Hide file tree
Showing 98 changed files with 26,511 additions and 2,137 deletions.
2 changes: 1 addition & 1 deletion Bon.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@
TargetAttributes = {
832444E01CDF17860031CFE0 = {
CreatedOnToolsVersion = 7.3;
LastSwiftMigration = 0800;
LastSwiftMigration = 0830;
};
};
};
Expand Down
2 changes: 1 addition & 1 deletion Bon/BIT.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public enum LoginState: String, CustomStringConvertible {
class BIT {

struct URL {
static let AuthActionURL = "http://10.0.0.55:801/include/auth_action.php"
static let AuthActionURL = "http://10.0.0.55/include/auth_action.php"
static let HelpCenter = "http://10.0.0.55:8800"
}
}
10 changes: 7 additions & 3 deletions Bon/BonViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,13 @@ class BonViewController: NSViewController {
delay(1) {
self.bonLoginView.show(.loginSuccess)
}
} else if value.contains("You are already online.") {
self.forceLogout()
self.login()
} else if value.contains("You are already online.") || value.contains("IP has been online, please logout.") {
delay(1) {
self.getOnlineInfo()
}
delay(1) {
self.bonLoginView.show(.loginSuccess)
}
} else if value.contains("Password is error.") {
delay(1) {
self.bonLoginView.show(.passwordError)
Expand Down
17 changes: 9 additions & 8 deletions Bon/BonViewController.xib
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="11201" systemVersion="16A323" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="12118" systemVersion="16E195" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="11201"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="12118"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="BonViewController" customModule="Bon" customModuleProvider="target">
Expand Down Expand Up @@ -59,7 +60,7 @@
</constraints>
<imageCell key="cell" enabled="NO" refusesFirstResponder="YES" alignment="left" imageScaling="axesIndependently" image="icon_status" id="0Hl-hd-ZdP"/>
</imageView>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" preferredMaxLayoutWidth="369" translatesAutoresizingMaskIntoConstraints="NO" id="3Pm-fz-CoX">
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" allowsCharacterPickerTouchBarItem="NO" preferredMaxLayoutWidth="369" translatesAutoresizingMaskIntoConstraints="NO" id="3Pm-fz-CoX">
<rect key="frame" x="62" y="35" width="226" height="17"/>
<constraints>
<constraint firstAttribute="height" constant="17" id="dX2-7t-05d"/>
Expand All @@ -70,7 +71,7 @@
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" preferredMaxLayoutWidth="369" translatesAutoresizingMaskIntoConstraints="NO" id="pgG-rF-6fN">
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" allowsCharacterPickerTouchBarItem="NO" preferredMaxLayoutWidth="369" translatesAutoresizingMaskIntoConstraints="NO" id="pgG-rF-6fN">
<rect key="frame" x="62" y="10" width="226" height="17"/>
<textFieldCell key="cell" lineBreakMode="truncatingTail" truncatesLastVisibleLine="YES" enabled="NO" refusesFirstResponder="YES" allowsUndo="NO" sendsActionOnEndEditing="YES" alignment="left" title="Desc" usesSingleLineMode="YES" id="3nv-AR-HIH" userLabel="Info">
<font key="font" metaFont="system"/>
Expand Down Expand Up @@ -130,15 +131,15 @@
</constraints>
<imageCell key="cell" refusesFirstResponder="YES" alignment="left" animates="YES" imageScaling="proportionallyDown" image="Bon" id="c85-g9-cbp"/>
</imageView>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="haq-Hv-Kse">
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="NO" translatesAutoresizingMaskIntoConstraints="NO" id="haq-Hv-Kse">
<rect key="frame" x="-2" y="172" width="304" height="17"/>
<textFieldCell key="cell" enabled="NO" allowsUndo="NO" sendsActionOnEndEditing="YES" alignment="center" title="Sorry..." id="AvQ-d1-TL4">
<font key="font" metaFont="system"/>
<color key="textColor" name="headerColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="bg3-0n-Dyq" customClass="BonTextField" customModule="Bon" customModuleProvider="target">
<textField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bg3-0n-Dyq" customClass="BonTextField" customModule="Bon" customModuleProvider="target">
<rect key="frame" x="101" y="135" width="98" height="22"/>
<constraints>
<constraint firstAttribute="height" constant="22" id="P0F-ZO-Mhu"/>
Expand All @@ -152,7 +153,7 @@
<action selector="switchToPasswordTextField:" target="-2" id="2mL-Qj-1i5"/>
</connections>
</textField>
<secureTextField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="JU4-Rh-2ep">
<secureTextField verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="NO" translatesAutoresizingMaskIntoConstraints="NO" id="JU4-Rh-2ep">
<rect key="frame" x="101" y="95" width="98" height="22"/>
<secureTextFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" borderStyle="bezel" alignment="left" placeholderString="password" usesSingleLineMode="YES" bezelStyle="round" id="9mN-tY-ayJ">
<font key="font" metaFont="system"/>
Expand Down Expand Up @@ -240,7 +241,7 @@
<action selector="onSettingsButton:" target="-2" id="tHg-5O-k2y"/>
</connections>
</button>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="2s3-b7-Kgb">
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2s3-b7-Kgb">
<rect key="frame" x="18" y="6" width="32" height="23"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="center" title="Bon" id="5UB-0a-Zqc">
<font key="font" size="13" name="AvenirNext-DemiBold"/>
Expand Down
4 changes: 2 additions & 2 deletions Bon/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.4.1</string>
<string>0.5.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>160924</string>
<string>170403</string>
<key>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>LSUIElement</key>
Expand Down
2 changes: 1 addition & 1 deletion Cartfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "Alamofire/Alamofire" ~> 4.0
github "Alamofire/Alamofire" ~> 4.4
2 changes: 1 addition & 1 deletion Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "Alamofire/Alamofire" "4.0.0"
github "Alamofire/Alamofire" "4.4.0"

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.
Binary file modified Carthage/Build/Mac/Alamofire.framework/Versions/A/Alamofire
Binary file not shown.
Loading

0 comments on commit c97ec2e

Please sign in to comment.