You've already forked hotpocket
BTHLABS-94: Pass is_netloc_banned from save to share extension
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="24127" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="j1y-V4-xli">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="24506" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="j1y-V4-xli">
|
||||
<device id="retina6_12" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="24063"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="24504"/>
|
||||
<capability name="Image references" minToolsVersion="12.0"/>
|
||||
<capability name="Named colors" minToolsVersion="9.0"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
@@ -44,8 +44,8 @@
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
</activityIndicatorView>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="CqC-1V-R49">
|
||||
<rect key="frame" x="138" y="107" width="77" height="35"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<rect key="frame" x="130" y="107" width="92" height="35"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<state key="normal" title="Button"/>
|
||||
<buttonConfiguration key="configuration" style="gray" title="Cancel">
|
||||
<color key="baseForegroundColor" name="DangerColor"/>
|
||||
@@ -57,7 +57,7 @@
|
||||
</subviews>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="9Dr-s7-Kqv" userLabel="Done View">
|
||||
<rect key="frame" x="20" y="299" width="353" height="142"/>
|
||||
<rect key="frame" x="20" y="299" width="353" height="193"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="checkmark.circle.fill" catalog="system" translatesAutoresizingMaskIntoConstraints="NO" id="0oo-rV-Vfd">
|
||||
@@ -73,9 +73,9 @@
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="AHS-eb-Mk8">
|
||||
<rect key="frame" x="143" y="107" width="67" height="35"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<color key="tintColor" name="AccentColor"/>
|
||||
<rect key="frame" x="132" y="107" width="88" height="35"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<color key="tintColor" name="SecondaryColor"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" title="Close"/>
|
||||
<buttonConfiguration key="configuration" style="tinted" title="Close"/>
|
||||
@@ -102,9 +102,9 @@
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="gFP-1G-Hef">
|
||||
<rect key="frame" x="143" y="107" width="67" height="35"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<color key="tintColor" name="AccentColor"/>
|
||||
<rect key="frame" x="130" y="107" width="92" height="35"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<color key="tintColor" name="SecondaryColor"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" title="Close"/>
|
||||
<buttonConfiguration key="configuration" style="tinted" title="Close"/>
|
||||
@@ -131,9 +131,9 @@
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="UJs-K5-SJe">
|
||||
<rect key="frame" x="143" y="107" width="67" height="35"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<color key="tintColor" name="AccentColor"/>
|
||||
<rect key="frame" x="130" y="107" width="92" height="35"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<color key="tintColor" name="SecondaryColor"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" title="Close"/>
|
||||
<buttonConfiguration key="configuration" style="tinted" title="Close"/>
|
||||
@@ -161,8 +161,8 @@
|
||||
</label>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="0WL-Hk-6Bk">
|
||||
<rect key="frame" x="143" y="107" width="67" height="35"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<color key="tintColor" name="AccentColor"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<color key="tintColor" name="SecondaryColor"/>
|
||||
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
|
||||
<state key="normal" title="Close"/>
|
||||
<buttonConfiguration key="configuration" style="tinted" title="Close"/>
|
||||
@@ -189,6 +189,7 @@
|
||||
<outlet property="errorView" destination="DLn-U6-UcA" id="cl1-I0-nY1"/>
|
||||
<outlet property="needsSetupView" destination="eqK-cv-2mf" id="Vb3-Y3-8Y8"/>
|
||||
<outlet property="progressIndicator" destination="1HO-hL-WcQ" id="1Qd-Gt-b3G"/>
|
||||
<outlet property="savedLabel" destination="QoY-OC-nmX" id="cqW-iq-7CR"/>
|
||||
<outlet property="savingView" destination="zdu-vr-R6t" id="svY-bA-Z9d"/>
|
||||
<outlet property="unameLabel" destination="xfn-uj-KNk" id="TTp-PV-ttr"/>
|
||||
<outlet property="unprocessableEntityView" destination="ckY-6z-0fe" id="owN-qJ-oBj"/>
|
||||
@@ -204,14 +205,14 @@
|
||||
<image name="exclamationmark.circle.fill" catalog="system" width="128" height="123"/>
|
||||
<image name="icon-mac-384.png" width="384" height="384"/>
|
||||
<image name="multiply.circle.fill" catalog="system" width="128" height="123"/>
|
||||
<namedColor name="AccentColor">
|
||||
<color red="0.10980392156862745" green="0.72941176470588232" blue="0.92941176470588238" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</namedColor>
|
||||
<namedColor name="BackgroundColor">
|
||||
<color red="0.12941176470588237" green="0.14509803921568629" blue="0.16078431372549021" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</namedColor>
|
||||
<namedColor name="DangerColor">
|
||||
<color red="0.93300002813339233" green="0.3919999897480011" blue="0.46299999952316284" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<color red="0.93333333333333335" green="0.39215686274509803" blue="0.46274509803921571" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</namedColor>
|
||||
<namedColor name="SecondaryColor">
|
||||
<color red="0.0" green="0.50980392156862742" blue="0.8666666666666667" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</namedColor>
|
||||
<namedColor name="SuccessColor">
|
||||
<color red="0.054901960784313725" green="0.65490196078431373" blue="0.40392156862745099" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
@property IBOutlet UIView *errorView;
|
||||
@property IBOutlet UIView *unprocessableEntityView;
|
||||
@property IBOutlet UnameLabel *unameLabel;
|
||||
@property IBOutlet UILabel *savedLabel;
|
||||
|
||||
-(IBAction)doCancel:(id)sender;
|
||||
-(IBAction)doClose:(id)sender;
|
||||
|
||||
@@ -33,6 +33,21 @@
|
||||
#endif
|
||||
self.errorView.hidden = NO;
|
||||
} else {
|
||||
self.savedLabel.text = NSLocalizedString(
|
||||
@"Your link has been saved!",
|
||||
@"Your link has been saved!"
|
||||
);
|
||||
|
||||
NSDictionary *save = result.result;
|
||||
|
||||
BOOL isNetlocBanned = [(NSNumber *)[save valueForKey:@"is_netloc_banned"] boolValue];
|
||||
if (isNetlocBanned == YES) {
|
||||
self.savedLabel.text = NSLocalizedString(
|
||||
@"Your link has been saved, but you may want to update its title.",
|
||||
@"Your link has been saved, but you may want to update its title."
|
||||
);
|
||||
}
|
||||
|
||||
self.doneView.hidden = NO;
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user