Ver a proveniência

Changes node order on repositories view

Adds node for unpublished state
main
Eric Amodio há 4 anos
ascendente
cometimento
7846fb0b81
1 ficheiros alterados com 13 adições e 8 eliminações
  1. +13
    -8
      src/views/nodes/repositoryNode.ts

+ 13
- 8
src/views/nodes/repositoryNode.ts Ver ficheiro

@ -71,14 +71,21 @@ export class RepositoryNode extends SubscribeableViewNode {
status.state.behind,
status.detached,
);
children.push(new BranchNode(this.uri, this.view, this, branch, true));
if (status.state.behind) {
children.push(new BranchTrackingStatusNode(this.view, this, branch, status, 'behind', true));
if (this.view.config.showBranchComparison !== false) {
children.push(new CompareBranchNode(this.uri, this.view, this, branch ));
}
if (status.state.ahead) {
children.push(new BranchTrackingStatusNode(this.view, this, branch, status, 'ahead', true));
if (status.upstream) {
if (status.state.behind) {
children.push(new BranchTrackingStatusNode(this.view, this, branch, status, 'behind', true));
}
if (status.state.ahead) {
children.push(new BranchTrackingStatusNode(this.view, this, branch, status, 'ahead', true));
}
} else {
children.push(new BranchTrackingStatusNode(this.view, this, branch, status, 'none', true));
}
if (status.state.ahead || (status.files.length !== 0 && this.includeWorkingTree)) {
@ -86,9 +93,7 @@ export class RepositoryNode extends SubscribeableViewNode {
children.push(new StatusFilesNode(this.view, this, status, range));
}
if (this.view.config.showBranchComparison !== false) {
children.push(new CompareBranchNode(this.uri, this.view, this, branch));
}
children.push(new BranchNode(this.uri, this.view, this, branch, true));
if (!this.view.config.compact) {
children.push(new MessageNode(this.view, this, '', GlyphChars.Dash.repeat(2), ''));

Carregando…
Cancelar
Guardar