@@ -32,7 +32,7 @@ import {
32
32
SORT_ORDER ,
33
33
Endpoint ,
34
34
OpenOption ,
35
- DialogType ,
35
+ OutPutType ,
36
36
DialogOptions ,
37
37
} from "../model/Model" ;
38
38
import {
@@ -119,7 +119,7 @@ class TreeViewController implements Disposable {
119
119
submissionService . show ( result ) ;
120
120
eventService . emit ( "submit" , submissionService . getSubmitEvent ( ) ) ;
121
121
} catch ( error ) {
122
- await promptForOpenOutputChannel ( "提交出错了. 请查看控制台信息~" , DialogType . error ) ;
122
+ await promptForOpenOutputChannel ( "提交出错了. 请查看控制台信息~" , OutPutType . error ) ;
123
123
return ;
124
124
}
125
125
@@ -214,7 +214,7 @@ class TreeViewController implements Disposable {
214
214
submissionService . show ( result ) ;
215
215
eventService . emit ( "submit" , submissionService . getSubmitEvent ( ) ) ;
216
216
} catch ( error ) {
217
- await promptForOpenOutputChannel ( "提交测试出错了. 请查看控制台信息~" , DialogType . error ) ;
217
+ await promptForOpenOutputChannel ( "提交测试出错了. 请查看控制台信息~" , OutPutType . error ) ;
218
218
}
219
219
}
220
220
public async showFileSelectDialog ( fsPath ?: string ) : Promise < vscode . Uri [ ] | undefined > {
@@ -247,7 +247,7 @@ class TreeViewController implements Disposable {
247
247
submissionService . show ( result ) ;
248
248
eventService . emit ( "submit" , submissionService . getSubmitEvent ( ) ) ;
249
249
} catch ( error ) {
250
- await promptForOpenOutputChannel ( "提交测试出错了. 请查看控制台信息~" , DialogType . error ) ;
250
+ await promptForOpenOutputChannel ( "提交测试出错了. 请查看控制台信息~" , OutPutType . error ) ;
251
251
}
252
252
}
253
253
@@ -269,7 +269,7 @@ class TreeViewController implements Disposable {
269
269
submissionService . show ( result ) ;
270
270
eventService . emit ( "submit" , submissionService . getSubmitEvent ( ) ) ;
271
271
} catch ( error ) {
272
- await promptForOpenOutputChannel ( "提交测试出错了. 请查看控制台信息~" , DialogType . error ) ;
272
+ await promptForOpenOutputChannel ( "提交测试出错了. 请查看控制台信息~" , OutPutType . error ) ;
273
273
}
274
274
}
275
275
@@ -338,15 +338,15 @@ class TreeViewController implements Disposable {
338
338
await leetCodeConfig . update ( "endpoint" , endpoint , true /* UserSetting */ ) ;
339
339
vscode . window . showInformationMessage ( `Switched the endpoint to ${ endpoint } ` ) ;
340
340
} catch ( error ) {
341
- await promptForOpenOutputChannel ( "切换站点出错. 请查看控制台信息~" , DialogType . error ) ;
341
+ await promptForOpenOutputChannel ( "切换站点出错. 请查看控制台信息~" , OutPutType . error ) ;
342
342
}
343
343
344
344
try {
345
345
await vscode . commands . executeCommand ( "leetcode.signout" ) ;
346
346
await executeService . deleteCache ( ) ;
347
347
await promptForSignIn ( ) ;
348
348
} catch ( error ) {
349
- await promptForOpenOutputChannel ( "登录失败. 请查看控制台信息~" , DialogType . error ) ;
349
+ await promptForOpenOutputChannel ( "登录失败. 请查看控制台信息~" , OutPutType . error ) ;
350
350
}
351
351
}
352
352
@@ -379,7 +379,7 @@ class TreeViewController implements Disposable {
379
379
fileButtonService . refresh ( ) ;
380
380
}
381
381
} catch ( error ) {
382
- await promptForOpenOutputChannel ( "添加喜欢题目失败. 请查看控制台信息~" , DialogType . error ) ;
382
+ await promptForOpenOutputChannel ( "添加喜欢题目失败. 请查看控制台信息~" , OutPutType . error ) ;
383
383
}
384
384
}
385
385
@@ -391,7 +391,7 @@ class TreeViewController implements Disposable {
391
391
fileButtonService . refresh ( ) ;
392
392
}
393
393
} catch ( error ) {
394
- await promptForOpenOutputChannel ( "移除喜欢题目失败. 请查看控制台信息~" , DialogType . error ) ;
394
+ await promptForOpenOutputChannel ( "移除喜欢题目失败. 请查看控制台信息~" , OutPutType . error ) ;
395
395
}
396
396
}
397
397
@@ -430,7 +430,7 @@ class TreeViewController implements Disposable {
430
430
}
431
431
return problems . reverse ( ) ;
432
432
} catch ( error ) {
433
- await promptForOpenOutputChannel ( "获取题目失败. 请查看控制台信息~" , DialogType . error ) ;
433
+ await promptForOpenOutputChannel ( "获取题目失败. 请查看控制台信息~" , OutPutType . error ) ;
434
434
return [ ] ;
435
435
}
436
436
}
@@ -652,7 +652,7 @@ class TreeViewController implements Disposable {
652
652
solutionService . show ( unescapeJS ( solution ) ) ;
653
653
} catch ( error ) {
654
654
logOutput . appendLine ( error . toString ( ) ) ;
655
- await promptForOpenOutputChannel ( "Failed to fetch the top voted solution. 请查看控制台信息~" , DialogType . error ) ;
655
+ await promptForOpenOutputChannel ( "Failed to fetch the top voted solution. 请查看控制台信息~" , OutPutType . error ) ;
656
656
}
657
657
}
658
658
@@ -674,7 +674,7 @@ class TreeViewController implements Disposable {
674
674
console . log ( query_result ) ;
675
675
} catch ( error ) {
676
676
logOutput . appendLine ( error . toString ( ) ) ;
677
- await promptForOpenOutputChannel ( "Failed to fetch today question. 请查看控制台信息~" , DialogType . error ) ;
677
+ await promptForOpenOutputChannel ( "Failed to fetch today question. 请查看控制台信息~" , OutPutType . error ) ;
678
678
}
679
679
}
680
680
@@ -873,7 +873,7 @@ class TreeViewController implements Disposable {
873
873
874
874
await Promise . all ( promises ) ;
875
875
} catch ( error ) {
876
- await promptForOpenOutputChannel ( `${ error } 请查看控制台信息~` , DialogType . error ) ;
876
+ await promptForOpenOutputChannel ( `${ error } 请查看控制台信息~` , OutPutType . error ) ;
877
877
}
878
878
}
879
879
@@ -953,7 +953,7 @@ class TreeViewController implements Disposable {
953
953
eventService . emit ( "searchUserContest" , tt ) ;
954
954
} catch ( error ) {
955
955
logOutput . appendLine ( error . toString ( ) ) ;
956
- await promptForOpenOutputChannel ( "Failed to fetch today question. 请查看控制台信息~" , DialogType . error ) ;
956
+ await promptForOpenOutputChannel ( "Failed to fetch today question. 请查看控制台信息~" , OutPutType . error ) ;
957
957
}
958
958
}
959
959
public async searchToday ( ) : Promise < void > {
@@ -980,7 +980,7 @@ class TreeViewController implements Disposable {
980
980
}
981
981
} catch ( error ) {
982
982
logOutput . appendLine ( error . toString ( ) ) ;
983
- await promptForOpenOutputChannel ( "Failed to fetch today question. 请查看控制台信息~" , DialogType . error ) ;
983
+ await promptForOpenOutputChannel ( "Failed to fetch today question. 请查看控制台信息~" , OutPutType . error ) ;
984
984
}
985
985
}
986
986
0 commit comments