From 2658ba9753960e8c2683768438db1d892c32a2c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?IT=E8=80=81=E5=A4=A7=E5=93=A5?= Date: Wed, 6 Apr 2022 21:03:08 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=80=E4=BB=8B=E5=A2=9E=E5=8A=A0=E4=B8=80?= =?UTF-8?q?=E4=BA=9B=E5=B8=B8=E7=94=A8=E5=9B=BE=E6=A0=87=EF=BC=8C=E6=9B=B4?= =?UTF-8?q?=E6=8D=A2=E4=BB=A4=E7=89=8C=E5=90=8E=E8=87=AA=E5=8A=A8=E5=88=B7?= =?UTF-8?q?=E6=96=B0=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 4 +++- .vscode/settings.json | 1 - CHANGELOG.md | 16 ++++++++++------ README.md | 13 ++++++++++--- package.json | 3 ++- src/extension.ts | 3 ++- 6 files changed, 27 insertions(+), 13 deletions(-) diff --git a/.gitignore b/.gitignore index a7447a5..1bd1c8b 100644 --- a/.gitignore +++ b/.gitignore @@ -3,5 +3,7 @@ dist node_modules .vscode-test/ *.vsix +/.DS_Store +*/.DS_Store +.DS_Store .DS_Store -*/.DS_Store \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 0b55fda..117fb0c 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -8,5 +8,4 @@ }, // Turn off tsc task auto detection since we have the necessary tasks as npm scripts "typescript.tsc.autoDetect": "off", - "ldgGist.accessToken": "c3b37799402699cbab9c2df7c98ec2eb" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f52a80..b95da08 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,14 +1,17 @@ -[comment]: <> (语义化版本 2.0.0 https://semver.org/lang/zh-CN/) [comment]: <> (如何维护更新日志 https://keepachangelog.com/zh-CN/1.0.0/) - -[comment]: <> (Added 新添加的功能。) [comment]: <> (Changed 对现有功能的变更。) [comment]: <> (Deprecated 已经不建议使用,准备很快移除的功能。) [comment]: <> (Removed 已经移除的功能。) [comment]: <> (Fixed 对 bug 的修复) [comment]: <> (Security 对安全的改进) - # 更新日志 > 记录程序的版本变更历程 ## [Unreleased] -- 暂无 +- 列表搜索代码片段 + +## [0.0.3] - 2022-04-06 + +### Added +- 简介增加一些常用图标 +- 更换令牌后自动刷新数据 + ## [0.0.2] - 2022-04-05 ### Added @@ -38,6 +41,7 @@ - 修改评论 - 删除评论 -[unreleased]: https://github.com/wanglong126/vscode-ldggist/compare/v1.0.0...HEAD +[unreleased]: https://github.com/wanglong126/vscode-ldggist/compare/v0.0.3...HEAD +[0.0.3]: https://github.com/wanglong126/vscode-ldggist/compare/v0.0.2...v0.0.3 [0.0.2]: https://github.com/wanglong126/vscode-ldggist/compare/v0.0.1...v0.0.2 [0.0.1]: https://github.com/wanglong126/vscode-ldggist/releases/tag/v0.0.1 diff --git a/README.md b/README.md index ce4bd60..40ef9ae 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,27 @@ # LdgGist -> 基于 `Gitee 和 GitHub` 的代码片段管理工具 +> 基于 `Gitee` 和 `GitHub` 的代码片段管理工具

+ + + - + + + + - +

+ ## 快速开始 ### 创建代码片段 diff --git a/package.json b/package.json index 2983792..a78ef7a 100644 --- a/package.json +++ b/package.json @@ -3,12 +3,13 @@ "displayName": "LdgGist", "publisher": "itldg", "description": "基于Gitee和GitHub的代码片段管理工具", - "version": "0.0.2", + "version": "0.0.3", "icon": "resources/logo.png", "engines": { "vscode": "^1.65.0" }, "categories": [ + "Snippets", "Other" ], "activationEvents": [ diff --git a/src/extension.ts b/src/extension.ts index e8aed88..54a32bb 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -11,7 +11,7 @@ const gist = new GistApi(); var lastToken: string = ''; export function activate(context: vscode.ExtensionContext) { console.log(`${pluginName} activate`); - registerCommand(context, "login", () => { setToken(); vscode.commands.executeCommand(`${pluginName}.refreshGists`); vscode.commands.executeCommand(`${pluginName}.refreshPublicGists`); }); + registerCommand(context, "login", setToken); registerCommandOneArg(context, "selectedGist", async (id: string) => { if (gist.currId === id) { return; } gist.currId = id; gist.getCommits(); gist.getComments(); @@ -66,6 +66,7 @@ async function setToken(): Promise { if (token) { await vscode.workspace.getConfiguration(pluginName).update('accessToken', token); checkType(token); + vscode.commands.executeCommand(`${pluginName}.refreshGists`); vscode.commands.executeCommand(`${pluginName}.refreshPublicGists`); return true; } return false;