diff --git a/images/dark/icon-repo-green.svg b/images/dark/icon-repo-green.svg
new file mode 100644
index 0000000..0d97016
--- /dev/null
+++ b/images/dark/icon-repo-green.svg
@@ -0,0 +1,5 @@
+
+
\ No newline at end of file
diff --git a/images/dark/icon-repo-red.svg b/images/dark/icon-repo-red.svg
new file mode 100644
index 0000000..61ca8a5
--- /dev/null
+++ b/images/dark/icon-repo-red.svg
@@ -0,0 +1,5 @@
+
+
\ No newline at end of file
diff --git a/images/dark/icon-repo-yellow.svg b/images/dark/icon-repo-yellow.svg
new file mode 100644
index 0000000..95a3a90
--- /dev/null
+++ b/images/dark/icon-repo-yellow.svg
@@ -0,0 +1,5 @@
+
+
\ No newline at end of file
diff --git a/images/light/icon-repo-green.svg b/images/light/icon-repo-green.svg
new file mode 100644
index 0000000..686b047
--- /dev/null
+++ b/images/light/icon-repo-green.svg
@@ -0,0 +1,5 @@
+
+
\ No newline at end of file
diff --git a/images/light/icon-repo-red.svg b/images/light/icon-repo-red.svg
new file mode 100644
index 0000000..771514c
--- /dev/null
+++ b/images/light/icon-repo-red.svg
@@ -0,0 +1,5 @@
+
+
\ No newline at end of file
diff --git a/images/light/icon-repo-yellow.svg b/images/light/icon-repo-yellow.svg
new file mode 100644
index 0000000..41fee17
--- /dev/null
+++ b/images/light/icon-repo-yellow.svg
@@ -0,0 +1,5 @@
+
+
\ No newline at end of file
diff --git a/src/views/statusNode.ts b/src/views/statusNode.ts
index b00fd23..e74b977 100644
--- a/src/views/statusNode.ts
+++ b/src/views/statusNode.ts
@@ -34,6 +34,7 @@ export class StatusNode extends ExplorerNode {
let hasChildren = false;
let label = '';
+ let iconSuffix = '';
if (status.upstream) {
if (!status.state.ahead && !status.state.behind) {
label = `${status.branch} is up-to-date with ${status.upstream}`;
@@ -41,6 +42,15 @@ export class StatusNode extends ExplorerNode {
else {
label = `${status.branch} is not up-to-date with ${status.upstream}`;
hasChildren = true;
+ if (status.state.ahead && status.state.behind) {
+ iconSuffix = '-yellow';
+ }
+ else if (status.state.ahead) {
+ iconSuffix = '-green';
+ }
+ else if (status.state.behind) {
+ iconSuffix = '-red';
+ }
}
}
else {
@@ -51,8 +61,8 @@ export class StatusNode extends ExplorerNode {
item.contextValue = this.resourceType;
item.iconPath = {
- dark: this.context.asAbsolutePath('images/dark/icon-repo.svg'),
- light: this.context.asAbsolutePath('images/light/icon-repo.svg')
+ dark: this.context.asAbsolutePath(`images/dark/icon-repo${iconSuffix}.svg`),
+ light: this.context.asAbsolutePath(`images/light/icon-repo${iconSuffix}.svg`)
};
return item;