Browse Source

Adds remote-specific icons to view

main
Eric Amodio 7 years ago
parent
commit
02e080167e
12 changed files with 78 additions and 4 deletions
  1. +1
    -0
      CHANGELOG.md
  2. +11
    -0
      images/dark/icon-bitbucket.svg
  3. +3
    -0
      images/dark/icon-github.svg
  4. +10
    -0
      images/dark/icon-gitlab.svg
  5. +11
    -0
      images/light/icon-bitbucket.svg
  6. +3
    -0
      images/light/icon-github.svg
  7. +10
    -0
      images/light/icon-gitlab.svg
  8. +4
    -0
      src/git/remotes/bitbucket-server.ts
  9. +4
    -0
      src/git/remotes/bitbucket.ts
  10. +4
    -0
      src/git/remotes/github.ts
  11. +4
    -0
      src/git/remotes/provider.ts
  12. +13
    -4
      src/views/remoteNode.ts

+ 1
- 0
CHANGELOG.md View File

@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
![Issue linking](./images/ss-cl-issue-linking.png)
- Adds icons to remotes in the *GitLens* view based on the remote service provider
- Adds multi-cursor support to current line annotations — closes [#291](https://github.com/eamodio/vscode-gitlens/issues/291)
- Adds support to toggle annotations for each file individually or for all files at once — closes [#289](https://github.com/eamodio/vscode-gitlens/issues/289)
- Adds new controls the interactive settings editor (*Open Settings* from the Command Palette) to configure this new behavior

+ 11
- 0
images/dark/icon-bitbucket.svg View File

@ -0,0 +1,11 @@
<svg width="16" height="22" xmlns="http://www.w3.org/2000/svg">
<defs>
<linearGradient id="a" x2="0" y2="1">
<stop offset="0%" stop-color="#424242" stop-opacity=".7"/>
<stop offset="50%" stop-color="#424242" stop-opacity="0"/>
<stop offset="100%" stop-color="#424242" stop-opacity="0"/>
</linearGradient>
</defs>
<path fill="#C5C5C5" d="M1.41 4.66a.45.45 0 0 0-.45.53l1.92 11.63a.61.61 0 0 0 .6.51h9.2a.45.45 0 0 0 .44-.38L15.04 5.2a.45.45 0 0 0-.45-.53H1.41zm8.07 8.41H6.55l-.8-4.15h4.44l-.7 4.15z"/>
<path fill="url(#a)" d="M14.43 8.92h-4.24l-.7 4.15H6.54L3.08 17.2a.61.61 0 0 0 .4.15h9.2a.45.45 0 0 0 .44-.38l1.3-8.04z"/>
</svg>

+ 3
- 0
images/dark/icon-github.svg View File

@ -0,0 +1,3 @@
<svg width="16" height="22" xmlns="http://www.w3.org/2000/svg">
<path fill="#C5C5C5" d="M8 4.234a6.936 6.936 0 0 0-6.938 6.937 6.933 6.933 0 0 0 4.744 6.582c.347.06.477-.147.477-.33 0-.164-.009-.71-.009-1.292-1.743.321-2.194-.424-2.332-.815-.078-.2-.417-.815-.712-.98-.242-.13-.59-.45-.008-.46.546-.008.936.504 1.066.712.625 1.05 1.622.754 2.021.572.06-.45.243-.754.442-.928-1.543-.173-3.156-.771-3.156-3.425a2.7 2.7 0 0 1 .71-1.865c-.069-.173-.311-.884.07-1.838 0 0 .581-.182 1.908.711a6.438 6.438 0 0 1 1.734-.234c.59 0 1.18.078 1.735.234 1.327-.902 1.908-.711 1.908-.711.381.954.138 1.665.069 1.838.442.486.711 1.102.711 1.865 0 2.662-1.622 3.252-3.165 3.425.251.217.468.633.468 1.284 0 .928-.009 1.673-.009 1.908 0 .182.13.398.477.33a6.949 6.949 0 0 0 4.727-6.583A6.936 6.936 0 0 0 8 4.234z"/>
</svg>

+ 10
- 0
images/dark/icon-gitlab.svg View File

@ -0,0 +1,10 @@
<svg width="16" height="22" xmlns="http://www.w3.org/2000/svg">
<path fill="#636363" d="M15.12 11.98l-.8-2.57-1.59-5.1a.27.28 0 0 0-.52 0l-1.58 5.1H5.36l-1.59-5.1a.27.28 0 0 0-.51 0l-1.59 5.1-.8 2.57a.55.57 0 0 0 .2.64L8 17.87l6.93-5.25a.55.57 0 0 0 .2-.64"/>
<path fill="#C5C5C5" d="M8 17.87l2.63-8.46H5.36L8 17.87z"/>
<path fill="#9E9E9E" d="M8 17.87L5.35 9.41H1.67L8 17.87z"/>
<path fill="#636363" d="M1.67 9.41l-.8 2.57a.54.57 0 0 0 .2.64L8 17.87 1.67 9.41z"/>
<path fill="#C5C5C5" d="M1.67 9.41h3.7l-1.6-5.1a.27.28 0 0 0-.51 0l-1.59 5.1z"/>
<path fill="#9E9E9E" d="M8 17.87l2.63-8.46h3.69l-6.33 8.46z"/>
<path fill="#636363" d="M14.32 9.41l.8 2.57a.54.57 0 0 1-.2.64l-6.93 5.25 6.33-8.46z"/>
<path fill="#C5C5C5" d="M14.32 9.41h-3.7l1.6-5.1a.27.28 0 0 1 .51 0l1.59 5.1z"/>
</svg>

+ 11
- 0
images/light/icon-bitbucket.svg View File

@ -0,0 +1,11 @@
<svg width="16" height="22" xmlns="http://www.w3.org/2000/svg">
<defs>
<linearGradient id="a" x2="0" y2="1">
<stop offset="0%" stop-color="#C5C5C5" stop-opacity=".7"/>
<stop offset="50%" stop-color="#C5C5C5" stop-opacity="0"/>
<stop offset="100%" stop-color="#C5C5C5" stop-opacity="0"/>
</linearGradient>
</defs>
<path fill="#424242" d="M1.41 4.66a.45.45 0 0 0-.45.53l1.92 11.63a.61.61 0 0 0 .6.51h9.2a.45.45 0 0 0 .44-.38L15.04 5.2a.45.45 0 0 0-.45-.53H1.41zm8.07 8.41H6.55l-.8-4.15h4.44l-.7 4.15z"/>
<path fill="url(#a)" d="M14.43 8.92h-4.24l-.7 4.15H6.54L3.08 17.2a.61.61 0 0 0 .4.15h9.2a.45.45 0 0 0 .44-.38l1.3-8.04z"/>
</svg>

+ 3
- 0
images/light/icon-github.svg View File

@ -0,0 +1,3 @@
<svg width="16" height="22" xmlns="http://www.w3.org/2000/svg">
<path fill="#424242" d="M8 4.234a6.936 6.936 0 0 0-6.938 6.937 6.933 6.933 0 0 0 4.744 6.582c.347.06.477-.147.477-.33 0-.164-.009-.71-.009-1.292-1.743.321-2.194-.424-2.332-.815-.078-.2-.417-.815-.712-.98-.242-.13-.59-.45-.008-.46.546-.008.936.504 1.066.712.625 1.05 1.622.754 2.021.572.06-.45.243-.754.442-.928-1.543-.173-3.156-.771-3.156-3.425a2.7 2.7 0 0 1 .71-1.865c-.069-.173-.311-.884.07-1.838 0 0 .581-.182 1.908.711a6.438 6.438 0 0 1 1.734-.234c.59 0 1.18.078 1.735.234 1.327-.902 1.908-.711 1.908-.711.381.954.138 1.665.069 1.838.442.486.711 1.102.711 1.865 0 2.662-1.622 3.252-3.165 3.425.251.217.468.633.468 1.284 0 .928-.009 1.673-.009 1.908 0 .182.13.398.477.33a6.949 6.949 0 0 0 4.727-6.583A6.936 6.936 0 0 0 8 4.234z"/>
</svg>

+ 10
- 0
images/light/icon-gitlab.svg View File

@ -0,0 +1,10 @@
<svg width="16" height="22" xmlns="http://www.w3.org/2000/svg">
<path fill="#A3A3A3" d="M15.12 11.98l-.8-2.57-1.59-5.1a.27.28 0 0 0-.52 0l-1.58 5.1H5.36l-1.59-5.1a.27.28 0 0 0-.51 0l-1.59 5.1-.8 2.57a.55.57 0 0 0 .2.64L8 17.87l6.93-5.25a.55.57 0 0 0 .2-.64"/>
<path fill="#424242" d="M8 17.87l2.63-8.46H5.36L8 17.87z"/>
<path fill="#696969" d="M8 17.87L5.35 9.41H1.67L8 17.87z"/>
<path fill="#A3A3A3" d="M1.67 9.41l-.8 2.57a.54.57 0 0 0 .2.64L8 17.87 1.67 9.41z"/>
<path fill="#424242" d="M1.67 9.41h3.7l-1.6-5.1a.27.28 0 0 0-.51 0l-1.59 5.1z"/>
<path fill="#696969" d="M8 17.87l2.63-8.46h3.69l-6.33 8.46z"/>
<path fill="#A3A3A3" d="M14.32 9.41l.8 2.57a.54.57 0 0 1-.2.64l-6.93 5.25 6.33-8.46z"/>
<path fill="#424242" d="M14.32 9.41h-3.7l1.6-5.1a.27.28 0 0 1 .51 0l1.59 5.1z"/>
</svg>

+ 4
- 0
src/git/remotes/bitbucket-server.ts View File

@ -22,6 +22,10 @@ export class BitbucketServerService extends RemoteProvider {
return `https://${this.domain}/projects/${project}/repos/${repo}`;
}
get icon() {
return 'bitbucket';
}
get name() {
return this.formatName('Bitbucket Server');
}

+ 4
- 0
src/git/remotes/bitbucket.ts View File

@ -17,6 +17,10 @@ export class BitbucketService extends RemoteProvider {
super(domain, path, protocol, name, custom);
}
get icon() {
return 'bitbucket';
}
get name() {
return this.formatName('Bitbucket');
}

+ 4
- 0
src/git/remotes/github.ts View File

@ -17,6 +17,10 @@ export class GitHubService extends RemoteProvider {
super(domain, path, protocol, name, custom);
}
get icon() {
return 'github';
}
get name() {
return this.formatName('GitHub');
}

+ 4
- 0
src/git/remotes/provider.ts View File

@ -46,6 +46,10 @@ export abstract class RemoteProvider {
this._name = name;
}
get icon(): string {
return 'remote';
}
abstract get name(): string;
protected get baseUrl() {

+ 13
- 4
src/views/remoteNode.ts View File

@ -8,6 +8,7 @@ import { GlyphChars } from '../constants';
import { ExplorerNode, ResourceType } from './explorerNode';
import { GitExplorer } from './gitExplorer';
import { GitRemote, GitRemoteType, GitUri, Repository } from '../gitService';
import { Container } from '../container';
export class RemoteNode extends ExplorerNode {
@ -66,10 +67,18 @@ export class RemoteNode extends ExplorerNode {
const item = new TreeItem(label, TreeItemCollapsibleState.Collapsed);
item.contextValue = ResourceType.Remote;
// item.iconPath = {
// dark: this.context.asAbsolutePath('images/dark/icon-remote.svg'),
// light: this.context.asAbsolutePath('images/light/icon-remote.svg')
// };
if (this.remote.provider !== undefined) {
item.iconPath = {
dark: Container.context.asAbsolutePath(`images/dark/icon-${this.remote.provider.icon}.svg`),
light: Container.context.asAbsolutePath(`images/light/icon-${this.remote.provider.icon}.svg`)
};
}
else {
item.iconPath = {
dark: Container.context.asAbsolutePath('images/dark/icon-remote.svg'),
light: Container.context.asAbsolutePath('images/light/icon-remote.svg')
};
}
return item;
}

||||||
x
 
000:0
Loading…
Cancel
Save