1
This commit is contained in:
@@ -27,9 +27,9 @@
|
|||||||
"We'll use Apple for a quick, secure sign-in" = "We'll use Apple for a quick, secure sign-in";
|
"We'll use Apple for a quick, secure sign-in" = "We'll use Apple for a quick, secure sign-in";
|
||||||
"Sign in with Apple requires iOS 13 or later" = "Sign in with Apple requires iOS 13 or later";
|
"Sign in with Apple requires iOS 13 or later" = "Sign in with Apple requires iOS 13 or later";
|
||||||
"需要 iOS13+ 才能使用 Apple 登录" = "Sign in with Apple requires iOS 13 or later";
|
"需要 iOS13+ 才能使用 Apple 登录" = "Sign in with Apple requires iOS 13 or later";
|
||||||
"无效的登录凭证" = "Invalid login credential";
|
"Invalid login credential" = "Invalid login credential";
|
||||||
"未返回 token" = "No token returned";
|
"No token returned" = "No token returned";
|
||||||
"保存登录态失败" = "Failed to save login state";
|
"Failed to save login state" = "Failed to save login state";
|
||||||
"请切换到主App完成登录" = "Please switch to the main app to finish signing in";
|
"请切换到主App完成登录" = "Please switch to the main app to finish signing in";
|
||||||
|
|
||||||
// Generic buttons & tips
|
// Generic buttons & tips
|
||||||
@@ -67,7 +67,6 @@
|
|||||||
"Please check this app's wireless-data permission or network connection in Settings." = "Please check this app's wireless-data permission or network connection in Settings.";
|
"Please check this app's wireless-data permission or network connection in Settings." = "Please check this app's wireless-data permission or network connection in Settings.";
|
||||||
|
|
||||||
// Permission & guides
|
// Permission & guides
|
||||||
"使用引导" = "Usage Guide";
|
|
||||||
"Turn on Allow Full Access to experience all features" = "Turn on Allow Full Access to experience all features";
|
"Turn on Allow Full Access to experience all features" = "Turn on Allow Full Access to experience all features";
|
||||||
"Allow Full Access" = "Allow Full Access";
|
"Allow Full Access" = "Allow Full Access";
|
||||||
"Follow: Settings → General → Keyboard → Keyboards → %@ → Allow Full Access" = "Follow: Settings → General → Keyboard → Keyboards → %@ → Allow Full Access";
|
"Follow: Settings → General → Keyboard → Keyboards → %@ → Allow Full Access" = "Follow: Settings → General → Keyboard → Keyboards → %@ → Allow Full Access";
|
||||||
|
|||||||
@@ -32,6 +32,9 @@
|
|||||||
"保存登录态失败" = "保存登录态失败";
|
"保存登录态失败" = "保存登录态失败";
|
||||||
"请切换到主App完成登录" = "请切换到主App完成登录";
|
"请切换到主App完成登录" = "请切换到主App完成登录";
|
||||||
|
|
||||||
|
// 英文 key 映射(用于代码中直接使用英文 key)
|
||||||
|
"Failed to save login state" = "保存登录态失败";
|
||||||
|
|
||||||
// 通用按钮与提示
|
// 通用按钮与提示
|
||||||
"好" = "好";
|
"好" = "好";
|
||||||
"确定" = "确定";
|
"确定" = "确定";
|
||||||
|
|||||||
@@ -39,7 +39,6 @@ typedef NS_ENUM(NSInteger, KBGuideItemType) {
|
|||||||
- (void)viewDidLoad {
|
- (void)viewDidLoad {
|
||||||
[super viewDidLoad];
|
[super viewDidLoad];
|
||||||
self.view.backgroundColor = [UIColor colorWithWhite:0.96 alpha:1.0];
|
self.view.backgroundColor = [UIColor colorWithWhite:0.96 alpha:1.0];
|
||||||
// self.title = KBLocalized(@"使用引导");
|
|
||||||
|
|
||||||
[self.view addSubview:self.tableView];
|
[self.view addSubview:self.tableView];
|
||||||
[self.view addSubview:self.inputBar];
|
[self.view addSubview:self.inputBar];
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
[[AppleSignInManager shared] signInFromViewController:presenter completion:^(ASAuthorizationAppleIDCredential * _Nullable credential, NSError * _Nullable error) {
|
[[AppleSignInManager shared] signInFromViewController:presenter completion:^(ASAuthorizationAppleIDCredential * _Nullable credential, NSError * _Nullable error) {
|
||||||
if (error) { if (completion) completion(NO, error); return; }
|
if (error) { if (completion) completion(NO, error); return; }
|
||||||
if (![credential isKindOfClass:[ASAuthorizationAppleIDCredential class]]) {
|
if (![credential isKindOfClass:[ASAuthorizationAppleIDCredential class]]) {
|
||||||
if (completion) completion(NO, [NSError errorWithDomain:@"KBLogin" code:-1 userInfo:@{NSLocalizedDescriptionKey: KBLocalized(@"无效的登录凭证")}]);
|
if (completion) completion(NO, [NSError errorWithDomain:@"KBLogin" code:-1 userInfo:@{NSLocalizedDescriptionKey: KBLocalized(@"Invalid login credential")}]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
self.currentUser = user;
|
self.currentUser = user;
|
||||||
NSString *token = user.token ?: [self.class tokenFromResponseObject:jsonOrData];
|
NSString *token = user.token ?: [self.class tokenFromResponseObject:jsonOrData];
|
||||||
if (token.length == 0) {
|
if (token.length == 0) {
|
||||||
if (completion) completion(NO, [NSError errorWithDomain:@"KBLogin" code:-2 userInfo:@{NSLocalizedDescriptionKey: KBLocalized(@"未返回 token")}]);
|
if (completion) completion(NO, [NSError errorWithDomain:@"KBLogin" code:-2 userInfo:@{NSLocalizedDescriptionKey: KBLocalized(@"No token returned")}]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -63,7 +63,7 @@
|
|||||||
refreshToken:nil
|
refreshToken:nil
|
||||||
expiryDate:nil
|
expiryDate:nil
|
||||||
userIdentifier:cred.user];
|
userIdentifier:cred.user];
|
||||||
if (completion) completion(ok, ok ? nil : [NSError errorWithDomain:@"KBLogin" code:-3 userInfo:@{NSLocalizedDescriptionKey: KBLocalized(@"保存登录态失败")}]);
|
if (completion) completion(ok, ok ? nil : [NSError errorWithDomain:@"KBLogin" code:-3 userInfo:@{NSLocalizedDescriptionKey: KBLocalized(@"Failed to save login state")}]);
|
||||||
}];
|
}];
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -413,6 +413,7 @@ typedef NS_ENUM(NSInteger, KBSearchSection) {
|
|||||||
_collectionView.backgroundColor = [UIColor whiteColor];
|
_collectionView.backgroundColor = [UIColor whiteColor];
|
||||||
_collectionView.dataSource = self;
|
_collectionView.dataSource = self;
|
||||||
_collectionView.delegate = self;
|
_collectionView.delegate = self;
|
||||||
|
_collectionView.keyboardDismissMode = UIScrollViewKeyboardDismissModeOnDrag;
|
||||||
// 注册 cell & header
|
// 注册 cell & header
|
||||||
[_collectionView registerClass:KBTagCell.class forCellWithReuseIdentifier:kTagCellId];
|
[_collectionView registerClass:KBTagCell.class forCellWithReuseIdentifier:kTagCellId];
|
||||||
[_collectionView registerClass:KBSkinCardCell.class forCellWithReuseIdentifier:kSkinCellId];
|
[_collectionView registerClass:KBSkinCardCell.class forCellWithReuseIdentifier:kSkinCellId];
|
||||||
|
|||||||
Reference in New Issue
Block a user