Skip to content

增加一键下载功能 #80

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
WeijieH opened this issue Dec 26, 2018 · 3 comments
Open

增加一键下载功能 #80

WeijieH opened this issue Dec 26, 2018 · 3 comments

Comments

@WeijieH
Copy link

WeijieH commented Dec 26, 2018

如题, 能不能添加一个一键下载所有(当前session)题目的功能?

@hongzzz
Copy link

hongzzz commented Feb 7, 2019

同有这个需求~

@ZephyrJung
Copy link

+1

@ZephyrJung
Copy link

ZephyrJung commented Feb 21, 2019

自己写了一下,不过由于没有node、electron、vscode插件开发经验,所以写出来比较暴力也不规范,就不提PR了,大概就是在show.ts中添加了如下代码:

async function loadAllProblemsInternal() {
    new Promise(async (resolve: (res: Array<IQuickItemEx<IProblem>>) => void): Promise<void> => {
        (await list.listProblems()).map((problem: IProblem) => showProblemInternal(problem));
    });
}

然后把这个按钮跟Show Problem放到了一起:joy: 临时解决下问题

主要就是发现search的时候会获取所有题目,由此利用了下现成代码

不过搂出来感觉不是很全,拿到了543个题,仅供参考吧传送门

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants