Commit 30f33c3c authored by Eric Eastwood's avatar Eric Eastwood
Browse files

Merge branch 'feature/add-gitlab-login' into 'master'

added Gitlab login to iOS app

Closes #24

See merge request gitlab-org/gitter/gitter-ios-app!20
parents 16b6fd73 5c01659d
......@@ -25,6 +25,9 @@ class LoginViewController: UIViewController {
case "login-twitter":
let vc = segue.destination as! LoginOauthViewController
vc.authProvider = "twitter"
case "login-gitlab":
let vc = segue.destination as! LoginOauthViewController
vc.authProvider = "gitlab"
default:
// secret menu, do nothing
return
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="wJh-wU-YFl">
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="16097.3" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="wJh-wU-YFl">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--Login Oauth View Controller-->
......@@ -14,19 +16,20 @@
<viewControllerLayoutGuide type="bottom" id="Kgv-Go-hkt"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Tfe-qE-Xij">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<activityIndicatorView opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" hidesWhenStopped="YES" animating="YES" style="gray" translatesAutoresizingMaskIntoConstraints="NO" id="3fU-g8-Ui0">
<rect key="frame" x="290" y="290" width="20" height="20"/>
<rect key="frame" x="197" y="438" width="20" height="20"/>
</activityIndicatorView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="3fU-g8-Ui0" firstAttribute="centerY" secondItem="Tfe-qE-Xij" secondAttribute="centerY" id="F7D-1b-LQ6"/>
<constraint firstItem="3fU-g8-Ui0" firstAttribute="centerX" secondItem="Tfe-qE-Xij" secondAttribute="centerX" id="xtc-ZA-sbj"/>
</constraints>
</view>
<navigationItem key="navigationItem" id="hYD-SP-zD0"/>
<simulatedStatusBarMetrics key="simulatedStatusBarMetrics"/>
<simulatedNavigationBarMetrics key="simulatedTopBarMetrics" prompted="NO"/>
<connections>
......@@ -54,14 +57,14 @@
<viewControllerLayoutGuide type="bottom" id="e9O-D1-9o2"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="uHb-5P-NWV">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="backdrop" translatesAutoresizingMaskIntoConstraints="NO" id="06r-hy-PP4">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
</imageView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="acd-D8-8uF">
<rect key="frame" x="175" y="189" width="250" height="222"/>
<rect key="frame" x="82" y="337" width="250" height="222"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="qkS-gN-cJH">
<rect key="frame" x="0.0" y="0.0" width="250" height="79"/>
......@@ -74,12 +77,12 @@
</connections>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Gbj-Es-fJz">
<rect key="frame" x="4" y="58" width="243" height="21"/>
<rect key="frame" x="3.5" y="58" width="243" height="21"/>
<string key="text">Where developers come to talk.
</string>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
......@@ -95,12 +98,12 @@
<rect key="frame" x="0.0" y="143" width="250" height="79"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ZbW-Ww-HNK">
<rect key="frame" x="0.0" y="-8" width="250" height="96"/>
<rect key="frame" x="0.0" y="-8.5" width="250" height="140"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="WAP-HR-H0V">
<rect key="frame" x="0.0" y="52" width="250" height="44"/>
<color key="backgroundColor" red="0.33333333333333331" green="0.67450980392156867" blue="0.93333333333333335" alpha="1" colorSpace="calibratedRGB"/>
<color key="tintColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<rect key="frame" x="0.0" y="96" width="250" height="44"/>
<color key="backgroundColor" red="0.33333333333333331" green="0.67450980392156867" blue="0.93333333333333335" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<color key="tintColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<inset key="contentEdgeInsets" minX="24" minY="10" maxX="24" maxY="10"/>
<inset key="titleEdgeInsets" minX="8" minY="0.0" maxX="-8" maxY="0.0"/>
<inset key="imageEdgeInsets" minX="-8" minY="0.0" maxX="8" maxY="0.0"/>
......@@ -116,10 +119,10 @@
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="3v6-My-Oza">
<rect key="frame" x="0.0" y="0.0" width="250" height="44"/>
<color key="backgroundColor" red="0.22745098039215686" green="0.19215686274509802" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
<rect key="frame" x="0.0" y="48" width="250" height="44"/>
<color key="backgroundColor" red="0.22745098039215686" green="0.19215686274509802" blue="0.20000000000000001" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="tintColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<color key="tintColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<inset key="contentEdgeInsets" minX="24" minY="10" maxX="24" maxY="10"/>
<inset key="titleEdgeInsets" minX="8" minY="0.0" maxX="-8" maxY="0.0"/>
<inset key="imageEdgeInsets" minX="-8" minY="0.0" maxX="8" maxY="0.0"/>
......@@ -134,12 +137,32 @@
<segue destination="nFZ-NC-h4X" kind="show" identifier="login-github" id="lVd-GG-NMb"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="WO4-id-UnP">
<rect key="frame" x="0.0" y="0.0" width="250" height="44"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="0.9882352941176471" green="0.42745098039215684" blue="0.14901960784313725" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="tintColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<inset key="contentEdgeInsets" minX="24" minY="10" maxX="24" maxY="10"/>
<inset key="titleEdgeInsets" minX="8" minY="0.0" maxX="-8" maxY="0.0"/>
<inset key="imageEdgeInsets" minX="-8" minY="0.0" maxX="8" maxY="0.0"/>
<state key="normal" title="Sign in with GitLab" image="gitlab-icon"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="5"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="boolean" keyPath="clipsToBounds" value="YES"/>
</userDefinedRuntimeAttributes>
<connections>
<segue destination="nFZ-NC-h4X" kind="show" identifier="login-gitlab" id="51v-Wh-sGQ"/>
</connections>
</button>
</subviews>
<constraints>
<constraint firstAttribute="bottom" secondItem="WAP-HR-H0V" secondAttribute="bottom" id="2fR-hp-Sbz"/>
<constraint firstItem="3v6-My-Oza" firstAttribute="top" secondItem="ZbW-Ww-HNK" secondAttribute="top" id="JVh-cT-ZZK"/>
<constraint firstItem="3v6-My-Oza" firstAttribute="top" secondItem="ZbW-Ww-HNK" secondAttribute="top" constant="48" id="JVh-cT-ZZK"/>
<constraint firstItem="3v6-My-Oza" firstAttribute="width" secondItem="ZbW-Ww-HNK" secondAttribute="width" id="Kcn-Fc-Pk2"/>
<constraint firstItem="WAP-HR-H0V" firstAttribute="top" secondItem="3v6-My-Oza" secondAttribute="bottom" constant="8" id="Kty-SQ-JWb"/>
<constraint firstItem="WAP-HR-H0V" firstAttribute="top" secondItem="3v6-My-Oza" secondAttribute="bottom" constant="4" id="Kty-SQ-JWb"/>
<constraint firstItem="WAP-HR-H0V" firstAttribute="centerX" secondItem="ZbW-Ww-HNK" secondAttribute="centerX" id="iko-RB-uQJ"/>
<constraint firstItem="WAP-HR-H0V" firstAttribute="width" secondItem="ZbW-Ww-HNK" secondAttribute="width" id="sfL-b1-WZg"/>
<constraint firstItem="3v6-My-Oza" firstAttribute="centerX" secondItem="ZbW-Ww-HNK" secondAttribute="centerX" id="zAq-9q-c6z"/>
......@@ -147,7 +170,7 @@
</view>
</subviews>
<constraints>
<constraint firstItem="ZbW-Ww-HNK" firstAttribute="centerY" secondItem="xBk-kZ-gZm" secondAttribute="centerY" id="TDp-kM-qA7"/>
<constraint firstItem="ZbW-Ww-HNK" firstAttribute="centerY" secondItem="xBk-kZ-gZm" secondAttribute="centerY" constant="22" id="TDp-kM-qA7"/>
<constraint firstItem="ZbW-Ww-HNK" firstAttribute="width" secondItem="xBk-kZ-gZm" secondAttribute="width" id="hmO-TA-LfB"/>
<constraint firstItem="ZbW-Ww-HNK" firstAttribute="centerX" secondItem="xBk-kZ-gZm" secondAttribute="centerX" id="qop-6a-uhC"/>
</constraints>
......@@ -166,7 +189,7 @@
</constraints>
</view>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="acd-D8-8uF" firstAttribute="centerY" secondItem="06r-hy-PP4" secondAttribute="centerY" id="8eZ-Aj-FRk"/>
<constraint firstItem="acd-D8-8uF" firstAttribute="centerX" secondItem="06r-hy-PP4" secondAttribute="centerX" id="9PH-1z-8aX"/>
......@@ -194,7 +217,7 @@
<objects>
<navigationController id="wJh-wU-YFl" sceneMemberID="viewController">
<navigationBar key="navigationBar" contentMode="scaleToFill" id="3ZW-gL-mAd">
<rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
<rect key="frame" x="0.0" y="44" width="414" height="44"/>
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<connections>
......@@ -206,14 +229,15 @@
<point key="canvasLocation" x="-1863" y="2024"/>
</scene>
</scenes>
<inferredMetricsTieBreakers>
<segue reference="51v-Wh-sGQ"/>
</inferredMetricsTieBreakers>
<color key="tintColor" red="0.92941176469999998" green="0.098039215690000001" blue="0.39607843139999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<resources>
<image name="backdrop" width="320" height="480"/>
<image name="github-icon" width="24" height="24"/>
<image name="gitter-logo" width="180" height="42"/>
<image name="gitlab-icon" width="24" height="24"/>
<image name="gitter-logo" width="180" height="41.5"/>
<image name="twitter-icon" width="24" height="24"/>
</resources>
<inferredMetricsTieBreakers>
<segue reference="nkZ-Yn-vZr"/>
</inferredMetricsTieBreakers>
<color key="tintColor" red="0.92941176469999998" green="0.098039215690000001" blue="0.39607843139999999" alpha="1" colorSpace="calibratedRGB"/>
</document>
{
"images" : [
{
"filename" : "fa_gitlab_24.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "fa_gitlab_48.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "fa_gitlab_72.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment