1
This commit is contained in:
@@ -443,7 +443,7 @@ static NSString * const kKBSkinMetadataThemeKey = @"theme_json";
|
||||
#if __has_include("KBNetworkManager.h")
|
||||
// 远程下载(http/https)
|
||||
NSLog(@"🌐[SkinBridge] will GET zip: %@", zipURL);
|
||||
[KBHUD showWithStatus:@"正在下载..."];
|
||||
[KBHUD showWithStatus:KBLocalized(@"Downloading...")];
|
||||
[[KBNetworkManager shared] GETData:zipURL parameters:nil headers:nil completion:^(NSData *data, NSURLResponse *response, NSError *error) {
|
||||
NSLog(@"🌐[SkinBridge] GET finished id=%@ error=%@", skinId, error);
|
||||
if (error || data.length == 0) {
|
||||
|
||||
@@ -209,3 +209,4 @@
|
||||
"Purchase pending approval." = "Purchase pending approval.";
|
||||
"Unable to obtain transaction payload." = "Unable to obtain transaction payload.";
|
||||
"Resume Purchase" = "Resume Purchase";
|
||||
"Downloading..." = "Downloading...";
|
||||
|
||||
@@ -211,3 +211,4 @@
|
||||
"Purchase pending approval." = "购买等待确认";
|
||||
"Unable to obtain transaction payload." = "无法获取交易凭据";
|
||||
"Resume Purchase" = "恢复购买";
|
||||
"Downloading..." = "正在下载...";
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
}
|
||||
NSString *message = nil;
|
||||
if (success) {
|
||||
message = KBLocalized(@"已应用,切到键盘查看");
|
||||
message = KBLocalized(@"Applied. Switch to the keyboard to view.");
|
||||
} else if ([error.domain isEqualToString:KBSkinBridgeErrorDomain] &&
|
||||
error.code == KBSkinBridgeErrorContainerUnavailable) {
|
||||
message = KBLocalized(@"无法访问共享容器,应用皮肤失败");
|
||||
|
||||
@@ -313,7 +313,7 @@ typedef NS_ENUM(NSInteger, KBSkinDetailSection) {
|
||||
skin[@"force_download"] = @(YES);
|
||||
NSLog(@"⬇️[SkinDetail] download request id=%@ zip=%@ force=YES",
|
||||
skin[@"id"], skin[@"zip_url"]);
|
||||
[KBHUD showWithStatus:@"正在下载..."];
|
||||
[KBHUD showWithStatus:KBLocalized(@"Downloading...")];
|
||||
[[KBSkinService shared] applySkinWithJSON:skin
|
||||
fromViewController:self
|
||||
mode:KBSkinSourceModeRemoteZip
|
||||
|
||||
@@ -213,9 +213,11 @@
|
||||
return;
|
||||
}
|
||||
NSString *themeIdValue = [[self kb_themeIdParamFromString:themeId] description];
|
||||
NSString *path = [NSString stringWithFormat:@"%@?themeId=%@", API_THEME_RESTORE, themeIdValue ?: @""];
|
||||
[[KBNetworkManager shared] POST:path
|
||||
jsonBody:nil
|
||||
// NSString *path = [NSString stringWithFormat:@"%@?themeId=%@", API_THEME_RESTORE, themeIdValue ?: @""];
|
||||
NSDictionary *body = @{@"themeId": [self kb_themeIdParamFromString:themeId]};
|
||||
|
||||
[[KBNetworkManager shared] POST:API_THEME_RESTORE
|
||||
jsonBody:body
|
||||
headers:nil
|
||||
autoShowBusinessError:NO
|
||||
completion:^(NSDictionary * _Nullable json,
|
||||
|
||||
Reference in New Issue
Block a user