diff --git a/CustomKeyboard/View/KBKeyBoardMainView.m b/CustomKeyboard/View/KBKeyBoardMainView.m index 387fe33..e5bb958 100644 --- a/CustomKeyboard/View/KBKeyBoardMainView.m +++ b/CustomKeyboard/View/KBKeyBoardMainView.m @@ -25,7 +25,8 @@ - (instancetype)initWithFrame:(CGRect)frame { if (self = [super initWithFrame:frame]) { - self.backgroundColor = [KBSkinManager shared].current.keyboardBackground; +// self.backgroundColor = [KBSkinManager shared].current.keyboardBackground; + self.backgroundColor = [UIColor colorWithHex:0xD1D3DB]; // 顶部栏 self.topBar = [[KBToolBar alloc] init]; @@ -205,7 +206,8 @@ - (void)kb_applyTheme { KBSkinManager *mgr = [KBSkinManager shared]; BOOL hasImg = ([mgr currentBackgroundImage] != nil); - UIColor *bg = mgr.current.keyboardBackground; +// UIColor *bg = mgr.current.keyboardBackground; + UIColor *bg = [UIColor colorWithHex:0xD1D3DB]; self.backgroundColor = hasImg ? [UIColor clearColor] : bg; self.keyboardView.backgroundColor = hasImg ? [UIColor clearColor] : bg; if ([self.topBar respondsToSelector:@selector(kb_applyTheme)]) { diff --git a/Shared/Localization/en.lproj/Localizable.strings b/Shared/Localization/en.lproj/Localizable.strings index c637836..2055264 100644 --- a/Shared/Localization/en.lproj/Localizable.strings +++ b/Shared/Localization/en.lproj/Localizable.strings @@ -31,6 +31,7 @@ "Invalid login credential" = "Invalid login credential"; "No token returned" = "No token returned"; "Failed to save login state" = "Failed to save login state"; +"登录已取消" = "Sign-in canceled"; "请切换到主App完成登录" = "Please switch to the main app to finish signing in"; "Continue Via Email" = "Continue Via Email"; "Login With Email Password" = "Login With Email Password"; diff --git a/Shared/Localization/zh-Hans.lproj/Localizable.strings b/Shared/Localization/zh-Hans.lproj/Localizable.strings index bc036a5..57aca51 100644 --- a/Shared/Localization/zh-Hans.lproj/Localizable.strings +++ b/Shared/Localization/zh-Hans.lproj/Localizable.strings @@ -31,6 +31,7 @@ "Invalid login credential" = "无效的登录凭证"; "No token returned" = "未返回 token"; "Failed to save login state" = "保存登录态失败"; +"登录已取消" = "登录已取消"; "请切换到主App完成登录" = "请切换到主App完成登录"; "Continue Via Email" = "通过邮箱登录"; "Login With Email Password" = "使用邮箱密码登录"; diff --git a/keyBoard/Class/Manager/AppleSignInManager.m b/keyBoard/Class/Manager/AppleSignInManager.m index 197e6fa..34856e5 100644 --- a/keyBoard/Class/Manager/AppleSignInManager.m +++ b/keyBoard/Class/Manager/AppleSignInManager.m @@ -106,7 +106,16 @@ static NSString * const kKBAppleUserIdentifierKey = @"com.company.keyboard.apple - (void)authorizationController:(ASAuthorizationController *)controller didCompleteWithError:(NSError *)error API_AVAILABLE(ios(13.0)) { if (self.completion) { - self.completion(nil, error); + NSError *finalError = error; + if (@available(iOS 13.0, *)) { + if ([error.domain isEqualToString:ASAuthorizationErrorDomain] && error.code == ASAuthorizationErrorCanceled) { + finalError = [NSError errorWithDomain:error.domain + code:error.code + userInfo:@{NSLocalizedDescriptionKey: KBLocalized(@"登录已取消") + }]; + } + } +// self.completion(nil, finalError); } self.completion = nil; self.presentingVC = nil;