Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Support locked problems#19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
jdneo merged 2 commits intoLeetCode-OpenSource:masterfromTsFreddie:master
Mar 10, 2018
Merged

Conversation

TsFreddie
Copy link
Contributor

@TsFreddieTsFreddie commentedMar 9, 2018
edited by jdneo
Loading

Issue:#20

Added support for locked problems.
The regex is changed to match favorite, locked and state:

★ 🔒 ✔ [760] Find Anagram Mappings                                        Easy   (75.23 %)

The lock icon is grabbed from EmojiOne v2.0, please change it or add a license.

Please review the regex before merge.

@jdneojdneo self-requested a reviewMarch 9, 2018 06:09
@jdneojdneo self-assigned thisMar 9, 2018
@jdneojdneo added the enhancementNew feature or request labelMar 9, 2018
@jdneo
Copy link
Member

Hi@TsFreddie Thank you for the contribution! Looks nice!

Just interested about the intension of supporting locked problem. Could you please explain more about this feature to me?

@TsFreddie
Copy link
ContributorAuthor

I should say paid problems.

leetcode-cli does not give you all the problems withleetcode list -q L even if you are a premium user of leetcode.

image

It would be nice to be able to submit those problems as well.

@jdneo
Copy link
Member

@TsFreddie Oh, got your idea. That means: although the icon is a lock, but the paid user still can open the problem and try to solve it. Am I right?

I don't have a premium account so I was not aware of that. 😄

@jdneojdneo added this to the0.4.0 milestoneMar 9, 2018
@TsFreddie
Copy link
ContributorAuthor

Exactly. leetcode-cli isn't very descriptive about what it means by "locked".

@jdneo
Copy link
Member

Good to know that. Thanks for pointing out. 👍

I still have some stuff need to do. Will review the PR in detail ASAP!

@@ -7,6 +7,8 @@ import { executeCommand } from "../utils/cpUtils";
import { DialogType, promptForOpenOutputChannel } from "../utils/uiUtils";

export interface IProblem {
favorate: boolean;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

typo: favorite

@@ -19,19 +21,23 @@ export async function listProblems(channel: vscode.OutputChannel): Promise<IProb
if (leetCodeManager.getStatus() === UserStatus.SignedOut) {
return [];
}
const result: string = await executeCommand(channel, "node", [leetCodeBinaryPath, "list", "-q", "L"]);
const leetCodeConfig: vscode.WorkspaceConfiguration = vscode.workspace.getConfiguration("leetcode");
const showLocked = leetCodeConfig.get<string>("showLocked");
Copy link
Member

@jdneojdneoMar 9, 2018
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

nit: add a type definition: const showLocked:boolean = ...

package.json Outdated
@@ -129,6 +129,11 @@
{
"title": "LeetCode",
"properties": {
"leetcode.showLocked": {
"type": "boolean",
"default": true,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Suggest we set the default value to false, since I think there are more common users than the premium ones.

@jdneo
Copy link
Member

@TsFreddie Just some small changes, thanks.

@jdneo
Copy link
Member

Great! Thanks.

@jdneojdneo merged commitf3946b9 intoLeetCode-OpenSource:masterMar 10, 2018
@ismailhkose
Copy link

image

ringcrl pushed a commit to ringcrl/vscode-leetcode that referenced this pull requestApr 21, 2019
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@jdneojdneojdneo approved these changes

Assignees

@jdneojdneo

Labels
enhancementNew feature or request
Projects
None yet
Milestone
0.4.0
Development

Successfully merging this pull request may close these issues.

3 participants
@TsFreddie@jdneo@ismailhkose

[8]ページ先頭

©2009-2025 Movatter.jp