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

fix: upload-post-file cmd #168

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

Merged
cnblogs-dudu merged 4 commits into main from fix-upload-btn-in-treeview
Jul 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 28 additions & 14 deletions package.json
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,13 @@
"category": "Cnblogs Posts List",
"enablement": "vscode-cnb.isAuthorized"
},
{
"command": "vscode-cnb.upload-post-no-confirm",
"title": "上传博文",
"icon": "$(cloud-upload)",
"category": "Cnblogs Posts List",
"enablement": "vscode-cnb.isAuthorized"
},
{
"command": "vscode-cnb.delete-post",
"title": "删除随笔(支持多选)",
Expand Down Expand Up @@ -199,7 +206,14 @@
"category": "Cnblogs"
},
{
"command": "vscode-cnb.upload-post-file-to-cnblogs",
"command": "vscode-cnb.upload-post-file",
"title": "上传到博客园",
"icon": "$(vscode-cnb-cloud-upload)",
"enablement": "vscode-cnb.isAuthorized",
"category": "Cnblogs"
},
{
"command": "vscode-cnb.upload-post-file-no-confirm",
"title": "上传到博客园",
"icon": "$(vscode-cnb-cloud-upload)",
"enablement": "vscode-cnb.isAuthorized",
Expand Down Expand Up @@ -546,21 +560,21 @@
"markdownDescription": "在拉取博文时显示确认消息"
},
"cnblogsClientForVSCode.menus.context.explorer": {
"markdownDescription": "控制要在资源管理器右键菜单中显示的命令",
"type": "object",
"additionalProperties": false,
"default": {
"upload-post-file-to-cnblogs": true,
"upload-post-file-no-confirm": true,
"pull-post-remote-updates": true,
"modify-post-settings": true,
"show-post-to-local-file-info": true,
"open-post-in-blog-admin": true,
"export-post-to-pdf": true,
"copy-post-link": true
},
"markdownDescription": "控制要在资源管理器右键菜单中显示的命令",
"order": 13,
"properties": {
"upload-post-file-to-cnblogs": {
"upload-post-file-no-confirm": {
"description": "上传到博客园",
"type": "boolean",
"order": 0,
Expand Down Expand Up @@ -605,9 +619,10 @@
}
},
"cnblogsClientForVSCode.menus.context.editor": {
"markdownDescription": "控制要在编辑器右键菜单中显示的命令",
"type": "object",
"default": {
"upload-post-file-to-cnblogs": true,
"upload-post-file-no-confirm": true,
"pull-post-remote-updates": true,
"modify-post-settings": true,
"show-post-to-local-file-info": true,
Expand All @@ -620,7 +635,7 @@
"ing:publish-selection": false
},
"properties": {
"upload-post-file-to-cnblogs": {
"upload-post-file-no-confirm": {
"description": "上传到博客园",
"type": "boolean",
"order": 0
Expand Down Expand Up @@ -679,7 +694,6 @@
},
"scope": "application",
"additionalProperties": false,
"markdownDescription": "控制要在编辑器右键菜单中显示的命令",
"order": 14
}
}
Expand Down Expand Up @@ -856,7 +870,7 @@
"when": "false"
},
{
"command": "vscode-cnb.upload-post-file-to-cnblogs",
"command": "vscode-cnb.upload-post-file",
"when": "true"
},
{
Expand Down Expand Up @@ -1006,7 +1020,7 @@
"group": "delete@2"
},
{
"command": "vscode-cnb.upload-post",
"command": "vscode-cnb.upload-post-no-confirm",
"group": "0@1",
"when": "viewItem == cnb-post-cached"
},
Expand Down Expand Up @@ -1111,8 +1125,8 @@
"group": "cnblogs@1"
},
{
"command": "vscode-cnb.upload-post-file-to-cnblogs",
"when": "resourceLangId == markdown && config.cnblogsClientForVSCode.menus.context.editor.upload-post-file-to-cnblogs",
"command": "vscode-cnb.upload-post-file-no-confirm",
"when": "resourceLangId == markdown && config.cnblogsClientForVSCode.menus.context.editor.upload-post-file-no-confirm",
"group": "cnblogs@2"
},
{
Expand Down Expand Up @@ -1163,7 +1177,7 @@
"group": "navigation"
},
{
"command": "vscode-cnb.upload-post-file-to-cnblogs",
"command": "vscode-cnb.upload-post-file",
"when": "resourceLangId == markdown",
"group": "navigation"
}
Expand All @@ -1175,8 +1189,8 @@
"group": "cnblogs@1"
},
{
"command": "vscode-cnb.upload-post-file-to-cnblogs",
"when": "resourceLangId == markdown && config.cnblogsClientForVSCode.menus.context.explorer.upload-post-file-to-cnblogs",
"command": "vscode-cnb.upload-post-file",
"when": "resourceLangId == markdown && config.cnblogsClientForVSCode.menus.context.explorer.upload-post-file",
"group": "cnblogs@2"
},
{
Expand Down
8 changes: 5 additions & 3 deletions src/commands/commands-registration.ts
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
refreshPostsList,
seekPostsList,
} from './posts-list/refresh-posts-list'
import { uploadPostFileToCnblogs, uploadPostToCnblogs } from './posts-list/upload-post'
import { uploadPostFile, uploadPostFileNoConfirm, uploadPost, uploadPostNoConfirm } from './posts-list/upload-post'
import { createLocalDraft } from './posts-list/create-local-draft'
import { deleteSelectedPosts } from './posts-list/delete-post'
import { modifyPostSettings } from './posts-list/modify-post-settings'
Expand Down Expand Up @@ -55,11 +55,13 @@ export const registerCommands = () => {
commands.registerCommand(`${appName}.seek-posts-list`, seekPostsList),
commands.registerCommand(`${appName}.next-posts-list`, gotoNextPostsList),
commands.registerCommand(`${appName}.edit-post`, openPostInVscode),
commands.registerCommand(`${appName}.upload-post`, uploadPostToCnblogs),
commands.registerCommand(`${appName}.modify-post-settings`, modifyPostSettings),
commands.registerCommand(`${appName}.delete-post`, deleteSelectedPosts),
commands.registerCommand(`${appName}.create-local-draft`, createLocalDraft),
commands.registerCommand(`${appName}.upload-post-file-to-cnblogs`, uploadPostFileToCnblogs),
commands.registerCommand(`${appName}.upload-post`, uploadPost),
commands.registerCommand(`${appName}.upload-post-no-confirm`, uploadPostNoConfirm),
commands.registerCommand(`${appName}.upload-post-file`, uploadPostFile),
commands.registerCommand(`${appName}.upload-post-file-no-confirm`, uploadPostFileNoConfirm),
commands.registerCommand(`${appName}.pull-post-remote-updates`, pullPostRemoteUpdates),
commands.registerCommand(`${appName}.upload-clipboard-image`, () => uploadImage(true, 'clipboard')),
commands.registerCommand(`${appName}.upload-local-disk-image`, () => uploadImage(true, 'local')),
Expand Down
Loading

AltStyle によって変換されたページ (->オリジナル) /