mirror of
https://github.com/ckaczor/vscode-gitlens.git
synced 2026-01-13 17:23:11 -05:00
Adds more details to remotes in custom view
This commit is contained in:
@@ -32,6 +32,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
|
||||
- Provides a context menu with `Open Branches in Remote`, and `Refresh` commands
|
||||
|
||||
- `Remotes` node — provides a list of remotes
|
||||
- Indicates the direction of the remote (fetch, push, both), remote service (if applicable), and repository path
|
||||
- Expand each remote to see its list of branches
|
||||
- Expand each branch to easily see its revision (commit) history
|
||||
- Expand each revision (commit) to quickly see the set of files changed, complete with status indicators for adds, changes, renames, and deletes
|
||||
|
||||
@@ -145,6 +145,7 @@ GitLens provides an unobtrusive blame annotation at the end of the current line,
|
||||
- Provides a context menu with `Open Branches in Remote`, and `Refresh` commands
|
||||
|
||||
- `Remotes` node — provides a list of remotes
|
||||
- Indicates the direction of the remote (fetch, push, both), remote service (if applicable), and repository path
|
||||
- Expand each remote to see its list of branches
|
||||
- Expand each branch to easily see its revision (commit) history
|
||||
- Expand each revision (commit) to quickly see the set of files changed, complete with status indicators for adds, changes, renames, and deletes
|
||||
|
||||
@@ -77,6 +77,7 @@ export type GlyphChars = '\u21a9' |
|
||||
'\u2937' |
|
||||
'\u2190' |
|
||||
'\u2194' |
|
||||
'\u2192' |
|
||||
'\u21e8' |
|
||||
'\u2191' |
|
||||
'\u2713' |
|
||||
@@ -91,6 +92,7 @@ export const GlyphChars = {
|
||||
ArrowDropRight: '\u2937' as GlyphChars,
|
||||
ArrowLeft: '\u2190' as GlyphChars,
|
||||
ArrowLeftRight: '\u2194' as GlyphChars,
|
||||
ArrowRight: '\u2192' as GlyphChars,
|
||||
ArrowRightHollow: '\u21e8' as GlyphChars,
|
||||
ArrowUp: '\u2191' as GlyphChars,
|
||||
Check: '\u2713' as GlyphChars,
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
import { Iterables } from '../system';
|
||||
import { ExtensionContext, TreeItem, TreeItemCollapsibleState } from 'vscode';
|
||||
import { BranchHistoryNode } from './branchHistoryNode';
|
||||
import { GlyphChars } from '../constants';
|
||||
import { ExplorerNode, ResourceType } from './explorerNode';
|
||||
import { GitRemote, GitService, GitUri } from '../gitService';
|
||||
|
||||
@@ -22,7 +23,26 @@ export class RemoteNode extends ExplorerNode {
|
||||
}
|
||||
|
||||
getTreeItem(): TreeItem {
|
||||
const item = new TreeItem(this.remote.name, TreeItemCollapsibleState.Collapsed);
|
||||
const fetch = this.remote.types.includes('push');
|
||||
const push = this.remote.types.includes('push');
|
||||
|
||||
let separator;
|
||||
if (fetch && push) {
|
||||
separator = GlyphChars.ArrowLeftRight;
|
||||
}
|
||||
else if (fetch) {
|
||||
separator = GlyphChars.ArrowLeft;
|
||||
}
|
||||
else if (push) {
|
||||
separator = GlyphChars.ArrowRight;
|
||||
}
|
||||
else {
|
||||
separator = GlyphChars.Dash;
|
||||
}
|
||||
|
||||
const label = `${this.remote.name} ${GlyphChars.Space}${separator}${GlyphChars.Space} ${(this.remote.provider !== undefined) ? this.remote.provider.name : this.remote.domain} ${GlyphChars.Space}${GlyphChars.Dot}${GlyphChars.Space} ${this.remote.path}`;
|
||||
|
||||
const item = new TreeItem(label, TreeItemCollapsibleState.Collapsed);
|
||||
item.contextValue = this.resourceType;
|
||||
|
||||
// item.iconPath = {
|
||||
|
||||
Reference in New Issue
Block a user