BTHLABS-66: Prepping for public release: Take three

I smell a drastic change to auth flow in the Mac app... Let's see if it
gets approved this time :D.
This commit is contained in:
2025-11-21 20:25:02 +01:00
parent 9abed01e53
commit 23f8296659
11 changed files with 89 additions and 36 deletions

View File

@@ -9,9 +9,12 @@
NS_ASSUME_NONNULL_BEGIN
@class MultilineLabel;
@interface AuthorizationProgressViewController : UIViewController
@property IBOutlet UIActivityIndicatorView *progressIndicator;
@property IBOutlet MultilineLabel *progressLabel;
@end

View File

@@ -9,6 +9,7 @@
#import "AppDelegate.h"
#import "HPCredentialsHelper.h"
#import "MultilineLabel.h"
@interface AuthorizationProgressViewController (AuthorizationProgressViewControllerPrivate)
@@ -22,6 +23,7 @@
-(void)viewDidLoad {
[super viewDidLoad];
self.progressLabel.text = NSLocalizedString(@"Continue to sign out in your browser...", @"Continue to sign out in your browser...");
}
-(void)viewWillAppear:(BOOL)animated {
@@ -29,7 +31,15 @@
[self.progressIndicator startAnimating];
AppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onAuthFlowDidFinish:) name:@"AuthFlowDidFinish" object:appDelegate.authFlow];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(onAuthFlowDidFinish:)
name:@"AuthFlowDidFinish"
object:appDelegate.authFlow];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(onAuthFlowDidReceiveAuthParams:)
name:@"AuthFlowDidReceiveAuthParams"
object:appDelegate.authFlow];
}
-(void)viewWillDisappear:(BOOL)animated {
@@ -71,4 +81,8 @@
});
}
-(void)onAuthFlowDidReceiveAuthParams:(NSNotification *)notification {
self.progressLabel.text = NSLocalizedString(@"Processing authorization...", @"Processing authorization...");
}
@end

View File

@@ -229,8 +229,8 @@
<rect key="frame" x="189" y="306" width="37" height="37"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
</activityIndicatorView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Awaiting authentication response..." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qiJ-yx-nMd">
<rect key="frame" x="20" y="359" width="374" height="21"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Awaiting authentication response..." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qiJ-yx-nMd" customClass="MultilineLabel">
<rect key="frame" x="20" y="359" width="374" height="64"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
@@ -242,6 +242,7 @@
</view>
<connections>
<outlet property="progressIndicator" destination="DNy-gf-n60" id="hJF-jc-ZJ0"/>
<outlet property="progressLabel" destination="qiJ-yx-nMd" id="1Wu-em-XsK"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="N3D-cM-5Ro" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>