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