Skip to content

Commit c5a3cde

Browse files
committed
update
1 parent 53945e8 commit c5a3cde

File tree

3 files changed

+55
-10
lines changed

3 files changed

+55
-10
lines changed

README.md

Lines changed: 38 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,44 @@
6464
- 简单的比较这些用例字符串是否相同
6565

6666
<!-- ## TODO 看到一些可能会用得上的功能
67-
- (完成) 在文件里面插入一些测试用例?
68-
- 提交答案与期望答案不同的地方?
69-
- 做题目计时
70-
- (完成) 不是中文站点,直接隐藏账号密码登录的方式
71-
- 默认的工作目录修改 不再是.leetcode(不改了)
72-
- (完成) Test按钮应该不在需要 case 和 allcase 只要留下输入的功能
73-
- 备忘录功能(数据直接放设置的工作目录?用github同步?)
74-
- 获取提交历史(直接找官方的提交数据)
75-
- 想做一个可以根据计算下次回顾本题的功能?(需要在设置的工作目录中存放多个文件?)
76-
- 还没出分前周赛题目显示 未评分(需要官网获取最新几期的题目编号) -->
67+
68+
- (完成) 在文件里面插入一些测试用例?
69+
- (完成) 不是中文站点,直接隐藏账号密码登录的方式
70+
- 默认的工作目录修改 不再是.leetcode(不改了)
71+
- 想做一个可以根据计算下次回顾本题的功能?(需要在设置的工作目录中存放多个文件?)
72+
- (完成) Test 按钮应该不在需要 case 和 allcase 只要留下输入的功能
73+
- 备忘录功能(数据直接放设置的工作目录?用 github 同步?)
74+
- 获取提交历史(直接找官方的提交数据)
75+
- 提交答案与期望答案不同的地方?
76+
- 做题目计时
77+
- 还没出分前周赛题目显示 未评分(需要官网获取最新几期的题目编号) -->
78+
79+
<!-- ## 新增在工作目录存放数据
80+
81+
### 目录说明
82+
83+
> workspace/ 工作目录
84+
>
85+
> > .lcpr_data/ 存数据
86+
> >
87+
> > > remake/ 备注
88+
> > >
89+
> > > > 题目内部编号.json 根据 qid 备注的信息
90+
> >
91+
> > > bricks.json
92+
93+
### bricks.json 存放格式
94+
95+
```
96+
{
97+
[qid] = {
98+
fid = "xxx", // 页面显示的编号可能有空格之类的
99+
submit_time = [], // 上次提交的时间
100+
type = 1, // 0:(不需要搬砖), 1:(14天搬砖simple), 2:(7天后搬砖simple_error), 3:(5天后搬砖simple_time), 4:(3天后搬砖(time_limit)), 5:(2天后搬砖(medium)), 6(1天后搬砖(hard))
101+
}
102+
}
103+
104+
``` -->
77105

78106
## 运行条件
79107

src/controller/MainController.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ class MainContorller {
2020
/**
2121
* 检查运行环境
2222
*/
23+
/**
24+
* It checks if the environment meets the requirements
25+
* @param {ExtensionContext} context - ExtensionContext
26+
*/
2327
public async checkNodeEnv(context: ExtensionContext) {
2428
if (!systemUtils.useVscodeNode()) {
2529
if (!(await executeService.checkNodeEnv(context))) {
@@ -28,6 +32,10 @@ class MainContorller {
2832
}
2933
}
3034

35+
/**
36+
* It takes the version number from the package.json file and converts it to a number
37+
* @param {ExtensionContext} context - ExtensionContext
38+
*/
3139
public setGlobal(context: ExtensionContext) {
3240
let cur_version: string = context.extension.packageJSON.version || "1.0.0";
3341
let cur_version_arr: Array<string> = cur_version.split(".");
@@ -40,6 +48,11 @@ class MainContorller {
4048
}
4149

4250
// 初始化上下文
51+
/**
52+
* This function sets the global variable and then calls the initialize function of the
53+
* treeDataService.
54+
* @param {ExtensionContext} context - ExtensionContext
55+
*/
4356
public initialize(context: ExtensionContext) {
4457
this.setGlobal(context);
4558
treeDataService.initialize(context);

src/extension.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ import { getLeetCodeEndpoint } from "./utils/ConfigUtils";
2727
import { DialogType } from "./model/Model";
2828

2929
// 激活插件
30+
/**
31+
* The main function of the extension. It is called when the extension is activated.
32+
* @param {ExtensionContext} context - ExtensionContext
33+
*/
3034
export async function activate(context: ExtensionContext): Promise<void> {
3135
try {
3236
// 初始化控制器

0 commit comments

Comments
 (0)