You've already forked hotpocket
BTHLABS-66: Prepping for public release: Take one
This commit is contained in:
@@ -9,11 +9,14 @@
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@class UnameLabel;
|
||||
|
||||
@interface AuthorizationViewController : UIViewController
|
||||
|
||||
@property UIImageView *invalidURLWarningView;
|
||||
|
||||
@property IBOutlet UITextField *instanceURLField;
|
||||
@property IBOutlet UnameLabel *unameLabel;
|
||||
|
||||
-(IBAction)doStartAuthorizationFlow:(id)sender;
|
||||
|
||||
|
||||
@@ -12,7 +12,9 @@
|
||||
#import "HPAuthFlow.h"
|
||||
#import "HPCredentialsHelper.h"
|
||||
#import "MainViewController.h"
|
||||
#import "NSBundle+HotPocketExtensions.h"
|
||||
#import "NSURL+HotPocketExtensions.h"
|
||||
#import "UnameLabel.h"
|
||||
|
||||
@interface AuthorizationViewController (AuthorizationViewControllerPrivate)
|
||||
|
||||
@@ -31,6 +33,8 @@
|
||||
self.invalidURLWarningView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
self.invalidURLWarningView.frame = CGRectMake(0, 0, 16, 16);
|
||||
self.invalidURLWarningView.tintColor = [UIColor colorNamed:@"WarningColor"];
|
||||
|
||||
self.unameLabel.text = [NSBundle uname];
|
||||
}
|
||||
|
||||
-(void)viewWillAppear:(BOOL)animated {
|
||||
|
||||
@@ -77,6 +77,13 @@
|
||||
<action selector="doLogOut:" destination="BYZ-38-t0r" eventType="primaryActionTriggered" id="iq7-wK-GMu"/>
|
||||
</connections>
|
||||
</button>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="SD4-ZJ-wLU" userLabel="uname Label" customClass="UnameLabel">
|
||||
<rect key="frame" x="20" y="855" width="374" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<color key="textColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
|
||||
<color key="backgroundColor" name="BackgroundColor"/>
|
||||
@@ -86,6 +93,7 @@
|
||||
<connections>
|
||||
<outlet property="instanceURLButton" destination="OPO-AY-zgd" id="1Wr-H9-eZ6"/>
|
||||
<outlet property="logoutButton" destination="wQZ-n6-b0o" id="vco-vP-zvy"/>
|
||||
<outlet property="unameLabel" destination="SD4-ZJ-wLU" id="LLk-wO-epu"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
|
||||
@@ -136,7 +144,7 @@
|
||||
<action selector="doStartAuthorizationFlow:" destination="1Il-xJ-X5Y" eventType="primaryActionTriggered" id="Rd9-1f-N6Z"/>
|
||||
</connections>
|
||||
</textField>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Enter the URL to your HotPocket instance, e.g. https://my.hotpocket.app" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Tn1-fl-daL" customClass="MultilineLabel">
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Enter the URL to your HotPocket instance, e.g. https://hotpocket.yourcompany.com/" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Tn1-fl-daL" customClass="MultilineLabel">
|
||||
<rect key="frame" x="20" y="348" width="374" height="64"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
@@ -152,6 +160,13 @@
|
||||
<action selector="doStartAuthorizationFlow:" destination="1Il-xJ-X5Y" eventType="primaryActionTriggered" id="U0V-Pp-M2x"/>
|
||||
</connections>
|
||||
</button>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gId-nt-VtS" userLabel="uname Label" customClass="UnameLabel">
|
||||
<rect key="frame" x="20" y="855" width="374" height="21"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<color key="textColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<viewLayoutGuide key="safeArea" id="dL2-4T-yXY"/>
|
||||
<color key="backgroundColor" name="BackgroundColor"/>
|
||||
@@ -159,6 +174,7 @@
|
||||
</view>
|
||||
<connections>
|
||||
<outlet property="instanceURLField" destination="v5s-Uh-qWU" id="hRQ-r8-3Dz"/>
|
||||
<outlet property="unameLabel" destination="gId-nt-VtS" id="ust-gO-7YN"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="m6b-Bm-Ty7" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
|
||||
|
||||
@@ -9,10 +9,13 @@
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@class UnameLabel;
|
||||
|
||||
@interface MainViewController : UIViewController
|
||||
|
||||
@property IBOutlet UIButton *instanceURLButton;
|
||||
@property IBOutlet UIButton *logoutButton;
|
||||
@property IBOutlet UnameLabel *unameLabel;
|
||||
|
||||
-(IBAction)doOpenInstanceURL:(id)sender;
|
||||
-(IBAction)doLogOut:(id)sender;
|
||||
|
||||
@@ -7,9 +7,10 @@
|
||||
|
||||
#import "MainViewController.h"
|
||||
|
||||
#import "HPCredentialsHelper.h"
|
||||
|
||||
#import "AuthorizationViewController.h"
|
||||
#import "HPCredentialsHelper.h"
|
||||
#import "NSBundle+HotPocketExtensions.h"
|
||||
#import "UnameLabel.h"
|
||||
|
||||
@interface MainViewController (MainViewControllerPrivate)
|
||||
|
||||
@@ -27,6 +28,8 @@
|
||||
[self.instanceURLButton setTitle:@"" forState:UIControlStateNormal];
|
||||
self.instanceURLButton.enabled = NO;
|
||||
|
||||
self.unameLabel.text = [NSBundle uname];
|
||||
|
||||
self.logoutButton.enabled = NO;
|
||||
}
|
||||
|
||||
|
||||
16
services/apple/iOS (App)/UnameLabel.h
Normal file
16
services/apple/iOS (App)/UnameLabel.h
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// UnameLabel.h
|
||||
// HotPocket
|
||||
//
|
||||
// Created by Tomek Wójcik on 17/11/2025.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface UnameLabel : UILabel
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
16
services/apple/iOS (App)/UnameLabel.m
Normal file
16
services/apple/iOS (App)/UnameLabel.m
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// UnameLabel.m
|
||||
// HotPocket
|
||||
//
|
||||
// Created by Tomek Wójcik on 17/11/2025.
|
||||
//
|
||||
|
||||
#import "UnameLabel.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@implementation UnameLabel
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
@@ -6,6 +6,7 @@
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#import "AppDelegate.h"
|
||||
|
||||
int main(int argc, char * argv[]) {
|
||||
|
||||
Reference in New Issue
Block a user