Skip to content

Commit

Permalink
feat: support for the file git blame
Browse files Browse the repository at this point in the history
  • Loading branch information
conwnet committed Apr 18, 2021
1 parent b7a8f69 commit ca2c712
Show file tree
Hide file tree
Showing 15 changed files with 497 additions and 13 deletions.
1 change: 1 addition & 0 deletions extensions/github1s/assets/icons/dark/close-blame.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions extensions/github1s/assets/icons/dark/open-blame.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions extensions/github1s/assets/icons/light/close-blame.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions extensions/github1s/assets/icons/light/open-blame.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
67 changes: 67 additions & 0 deletions extensions/github1s/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@
]
},
"commands": [
{
"command": "github1s.dev-test",
"title": "GitHub1s Dev Test",
"category": "GitHub1s"
},
{
"command": "github1s.update-token",
"title": "Update GitHub OAuth Token",
Expand Down Expand Up @@ -167,6 +172,32 @@
"category": "GitHub1s",
"icon": "$(arrow-right)",
"enablement": "resource =~ /^[^?]*\\?[^#]*(%26|\\b)hasNextRevision(=|%3D|%3d)true/"
},
{
"command": "github1s.toggle-editor-gutter-blame",
"title": "Toggle File Blame",
"category": "GitHub1s",
"enablement": "!isInDiffEditor && resourceScheme =~ /^github1s$/"
},
{
"command": "github1s.open-editor-gutter-blame",
"title": "Toggle File Blame",
"category": "GitHub1s",
"icon": {
"dark": "assets/icons/dark/open-blame.svg",
"light": "assets/icons/light/open-blame.svg"
},
"enablement": "!isInDiffEditor && resourceScheme =~ /^github1s$/"
},
{
"command": "github1s.close-editor-gutter-blame",
"title": "Toggle File Blame",
"category": "GitHub1s",
"icon": {
"dark": "assets/icons/dark/close-blame.svg",
"light": "assets/icons/light/close-blame.svg"
},
"enablement": "!isInDiffEditor && resourceScheme =~ /^github1s$/"
}
],
"colors": [
Expand Down Expand Up @@ -214,6 +245,24 @@
"dark": "#1890ff",
"highContrast": "#1890ff"
}
},
{
"id": "github1s.colors.gutterBlameBackground",
"description": "gutter blame background color",
"defaults": {
"light": "#00000013",
"dark": "#ffffff13",
"highContrast": "#ffffff13"
}
},
{
"id": "github1s.colors.highlightGutterBlameBackground",
"description": "highlight gutter blame background color",
"defaults": {
"light": "#00bcf233",
"dark": "#00bce233",
"highContrast": "#00bce233"
}
}
],
"menus": {
Expand Down Expand Up @@ -261,6 +310,14 @@
{
"command": "github1s.editor-view-open-next-revision",
"when": "false"
},
{
"command": "github1s.open-editor-gutter-blame",
"when": "false"
},
{
"command": "github1s.close-editor-gutter-blame",
"when": "false"
}
],
"view/title": [
Expand Down Expand Up @@ -323,6 +380,16 @@
"when": "isInDiffEditor",
"group": "navigation@3"
},
{
"command": "github1s.open-editor-gutter-blame",
"when": "!isInDiffEditor && resourceScheme =~ /^github1s$/ && !github1s.context.gutterBlameOpening",
"group": "navigation@4"
},
{
"command": "github1s.close-editor-gutter-blame",
"when": "!isInDiffEditor && resourceScheme =~ /^github1s$/ && github1s.context.gutterBlameOpening",
"group": "navigation@4"
},
{
"command": "github1s.editor-view-open-prev-revision",
"when": "resourceScheme =~ /^github1s/",
Expand Down
Loading

0 comments on commit ca2c712

Please sign in to comment.