Skip to content

Commit

Permalink
feat: change login way and add tracking logic option (#944)
Browse files Browse the repository at this point in the history
fix: resolve UAT issues

fix: update action

feat: add login progress

fix: change function name

Co-authored-by: leo.zhao<[email protected]>
  • Loading branch information
leozhao21 committed May 15, 2024
1 parent d713ad5 commit 71264fa
Show file tree
Hide file tree
Showing 17 changed files with 670 additions and 237 deletions.
7 changes: 5 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,8 @@
".vscode-test": true
},
"tslint.autoFixOnSave": true,
"tslint.ignoreDefinitionFiles": true
}
"tslint.ignoreDefinitionFiles": true,
"prettier.tabWidth": 4,
"prettier.useTabs": false,
"prettier.printWidth": 150
}
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
- English Document | [中文文档](https://github.com/LeetCode-OpenSource/vscode-leetcode/blob/master/docs/README_zh-CN.md)

## ❗️ Attention ❗️- Workaround to login to LeetCode endpoint

> Note: If you are using `leetcode.cn`, you can just ignore this section.
Recently we observed that [the extension cannot login to leetcode.com endpoint anymore](https://github.com/LeetCode-OpenSource/vscode-leetcode/issues/478). The root cause of this issue is that leetcode.com changed its login mechanism and so far there is no ideal way to fix that issue.
Expand All @@ -32,9 +33,10 @@ Thanks for [@yihong0618](https://github.com/yihong0618) provided a workaround wh
> Note: If you want to use third-party login(**Recommended**), please make sure your account has been connected to the third-party. If you want to use `Cookie` login, click [here](https://github.com/LeetCode-OpenSource/vscode-leetcode/issues/478#issuecomment-564757098) to see the steps.
## Requirements

- [VS Code 1.30.1+](https://code.visualstudio.com/)
- [Node.js 10+](https://nodejs.org)
> NOTE: Please make sure that `Node` is in your `PATH` environment variable. You can also use the setting `leetcode.nodePath` to specify the location of your `Node.js` executable.
> NOTE: Please make sure that `Node` is in your `PATH` environment variable. You can also use the setting `leetcode.nodePath` to specify the location of your `Node.js` executable.
## Quick Start

Expand All @@ -43,6 +45,7 @@ Thanks for [@yihong0618](https://github.com/yihong0618) provided a workaround wh
## Features

### Sign In/Out

<p align="center">
<img src="https://raw.githubusercontent.com/LeetCode-OpenSource/vscode-leetcode/master/docs/imgs/sign_in.png" alt="Sign in" />
</p>
Expand All @@ -52,16 +55,19 @@ Thanks for [@yihong0618](https://github.com/yihong0618) provided a workaround wh
- You can also use the following command to sign in/out:
- **LeetCode: Sign in**
- **LeetCode: Sign out**

---

### Switch Endpoint

<p align="center">
<img src="https://raw.githubusercontent.com/LeetCode-OpenSource/vscode-leetcode/master/docs/imgs/endpoint.png" alt="Switch Endpoint" />
</p>

- By clicking the button ![btn_endpoint](https://raw.githubusercontent.com/LeetCode-OpenSource/vscode-leetcode/master/docs/imgs/btn_endpoint.png) at the **explorer's navigation bar**, you can switch between different endpoints.

- The supported endpoints are:

- **leetcode.com**
- **leetcode.cn**

Expand All @@ -70,6 +76,7 @@ Thanks for [@yihong0618](https://github.com/yihong0618) provided a workaround wh
---

### Pick a Problem

<p align="center">
<img src="https://raw.githubusercontent.com/LeetCode-OpenSource/vscode-leetcode/master/docs/imgs/pick_problem.png" alt="Pick a Problem" />
</p>
Expand All @@ -86,11 +93,13 @@ Thanks for [@yihong0618](https://github.com/yihong0618) provided a workaround wh
---

### Editor Shortcuts

<p align="center">
<img src="https://raw.githubusercontent.com/LeetCode-OpenSource/vscode-leetcode/master/docs/imgs/shortcuts.png" alt="Editor Shortcuts" />
</p>

- The extension supports 5 editor shortcuts (aka Code Lens):

- `Submit`: Submit your answer to LeetCode.
- `Test`: Test your answer with customized test cases.
- `Star/Unstar`: Star or unstar the current problem.
Expand All @@ -102,6 +111,7 @@ Thanks for [@yihong0618](https://github.com/yihong0618) provided a workaround wh
---

### Search problems by Keywords

<p align="center">
<img src="https://raw.githubusercontent.com/LeetCode-OpenSource/vscode-leetcode/master/docs/imgs/search.png" alt="Search problems by Keywords" />
</p>
Expand All @@ -111,19 +121,18 @@ Thanks for [@yihong0618](https://github.com/yihong0618) provided a workaround wh
---

### Manage Session

<p align="center">
<img src="https://raw.githubusercontent.com/LeetCode-OpenSource/vscode-leetcode/master/docs/imgs/session.png" alt="Manage Session" />
</p>

- To manage your LeetCode sessions, just clicking the `LeetCode: ***` at the bottom of the status bar. You can **switch** between sessions or **create**, **delete** a session.


## Settings

| Setting Name | Description | Default Value |
| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ |
| `leetcode.hideSolved` | Specify to hide the solved problems or not | `false` |
| `leetcode.showLocked` | Specify to show the locked problems or not. Only Premium users could open the locked problems | `false` |
| `leetcode.defaultLanguage` | Specify the default language used to solve the problem. Supported languages are: `bash`, `c`, `cpp`, `csharp`, `golang`, `java`, `javascript`, `kotlin`, `mysql`, `php`, `python`,`python3`,`ruby`,`rust`, `scala`, `swift`, `typescript` | `N/A` |
| `leetcode.useWsl` | Specify whether to use WSL or not | `false` |
| `leetcode.endpoint` | Specify the active endpoint. Supported endpoints are: `leetcode`, `leetcode-cn` | `leetcode` |
Expand All @@ -137,6 +146,7 @@ Thanks for [@yihong0618](https://github.com/yihong0618) provided a workaround wh
| `leetcode.useEndpointTranslation` | Use endpoint's translation (if available) | `true` |
| `leetcode.colorizeProblems` | Add difficulty badge and colorize problems files in explorer tree | `true` |
| `leetcode.problems.sortStrategy` | Specify sorting strategy for problems list | `None` |
| `leetcode.allowReportData` | Allow LeetCode to report anonymous usage data to improve the product. list | `true` |

## Want Help?

Expand Down

0 comments on commit 71264fa

Please sign in to comment.