验证在线 LUT 分类、帧上传与下载应用,准备 1.22.0
这个提交包含在:
1 父节点
a2a8624dc0
当前提交
a04c4a69ed
11 个文件已更改
+295
-27
没有与搜索条件相匹配的文件
@@ -284,7 +284,7 @@ typedef NS_ENUM(NSInteger,DYRegistrationState) { DYChecking, DYRegistering, DYRe
|
||||
- (void)stopAccountLogin {
|
||||
self.accountGeneration++;[self.accountTask cancel];self.accountTask=nil;
|
||||
[self.loginTimer invalidate];self.loginTimer=nil;self.loginSessionKey=nil;self.pollingLogin=NO;
|
||||
self.loginButton.enabled=YES;self.accessButton.enabled=YES;
|
||||
self.loginButton.title=@"微信登录";self.loginButton.enabled=YES;self.accessButton.enabled=YES;
|
||||
}
|
||||
- (void)refreshOnlineAccount:(id)sender {
|
||||
if(self.loginSessionKey.length)return;
|
||||
@@ -303,6 +303,7 @@ typedef NS_ENUM(NSInteger,DYRegistrationState) { DYChecking, DYRegistering, DYRe
|
||||
}];
|
||||
}
|
||||
- (void)loginOnlineAccount:(id)sender {
|
||||
if(self.loginSessionKey.length){[self stopAccountLogin];self.accountTitle.stringValue=@"登录已取消";self.accountDetail.stringValue=@"可以重新点击微信登录。";return;}
|
||||
[self stopAccountLogin];NSUInteger generation=self.accountGeneration;
|
||||
NSString *device=[DYOnlineLUTClient deviceUUID];
|
||||
if(!device){self.accountDetail.stringValue=@"无法读取本机身份,请稍后重试。";return;}
|
||||
@@ -317,6 +318,7 @@ typedef NS_ENUM(NSInteger,DYRegistrationState) { DYChecking, DYRegistering, DYRe
|
||||
[self stopAccountLogin];self.accountTitle.stringValue=@"登录未完成";self.accountDetail.stringValue=error.localizedDescription?:@"登录服务返回的地址无效。";return;
|
||||
}
|
||||
self.loginSessionKey=key;self.accountTitle.stringValue=@"请在浏览器中完成微信登录";self.accountDetail.stringValue=@"完成扫码和账号确认后,这里会自动验证在线 LUT 权限。";
|
||||
self.loginButton.title=@"取消登录";self.loginButton.enabled=YES;
|
||||
if(![NSWorkspace.sharedWorkspace openURL:url]){[self stopAccountLogin];self.accountDetail.stringValue=@"无法打开浏览器,请重试。";return;}
|
||||
self.loginTimer=[NSTimer scheduledTimerWithTimeInterval:2 target:self selector:@selector(pollOnlineLogin:) userInfo:@{ @"started":NSDate.date } repeats:YES];
|
||||
}];
|
||||
|
||||
在新工单中引用
屏蔽一个用户