diff --git a/images/dark/icon-repo-cloud-blue.svg b/images/dark/icon-repo-cloud-blue.svg
new file mode 100644
index 0000000..bfefa95
--- /dev/null
+++ b/images/dark/icon-repo-cloud-blue.svg
@@ -0,0 +1,5 @@
+
diff --git a/images/dark/icon-repo-cloud-green.svg b/images/dark/icon-repo-cloud-green.svg
new file mode 100644
index 0000000..a94d73e
--- /dev/null
+++ b/images/dark/icon-repo-cloud-green.svg
@@ -0,0 +1,5 @@
+
diff --git a/images/dark/icon-repo-cloud-red.svg b/images/dark/icon-repo-cloud-red.svg
new file mode 100644
index 0000000..daea637
--- /dev/null
+++ b/images/dark/icon-repo-cloud-red.svg
@@ -0,0 +1,5 @@
+
diff --git a/images/dark/icon-repo-cloud-yellow.svg b/images/dark/icon-repo-cloud-yellow.svg
new file mode 100644
index 0000000..bd86ba9
--- /dev/null
+++ b/images/dark/icon-repo-cloud-yellow.svg
@@ -0,0 +1,5 @@
+
diff --git a/images/dark/icon-repo-cloud.svg b/images/dark/icon-repo-cloud.svg
new file mode 100644
index 0000000..0bc37e3
--- /dev/null
+++ b/images/dark/icon-repo-cloud.svg
@@ -0,0 +1,5 @@
+
diff --git a/images/dark/icon-repo-solid-blue.svg b/images/dark/icon-repo-solid-blue.svg
new file mode 100644
index 0000000..32f9378
--- /dev/null
+++ b/images/dark/icon-repo-solid-blue.svg
@@ -0,0 +1,4 @@
+
diff --git a/images/dark/icon-repo-solid-green.svg b/images/dark/icon-repo-solid-green.svg
new file mode 100644
index 0000000..a5a55f7
--- /dev/null
+++ b/images/dark/icon-repo-solid-green.svg
@@ -0,0 +1,4 @@
+
diff --git a/images/dark/icon-repo-solid-red.svg b/images/dark/icon-repo-solid-red.svg
new file mode 100644
index 0000000..d150422
--- /dev/null
+++ b/images/dark/icon-repo-solid-red.svg
@@ -0,0 +1,4 @@
+
diff --git a/images/dark/icon-repo-solid-yellow.svg b/images/dark/icon-repo-solid-yellow.svg
new file mode 100644
index 0000000..b4aa92f
--- /dev/null
+++ b/images/dark/icon-repo-solid-yellow.svg
@@ -0,0 +1,4 @@
+
diff --git a/images/dark/icon-repo-solid.svg b/images/dark/icon-repo-solid.svg
new file mode 100644
index 0000000..ace3818
--- /dev/null
+++ b/images/dark/icon-repo-solid.svg
@@ -0,0 +1,4 @@
+
diff --git a/images/light/icon-repo-cloud-blue.svg b/images/light/icon-repo-cloud-blue.svg
new file mode 100644
index 0000000..8171e6c
--- /dev/null
+++ b/images/light/icon-repo-cloud-blue.svg
@@ -0,0 +1,5 @@
+
diff --git a/images/light/icon-repo-cloud-green.svg b/images/light/icon-repo-cloud-green.svg
new file mode 100644
index 0000000..575d888
--- /dev/null
+++ b/images/light/icon-repo-cloud-green.svg
@@ -0,0 +1,5 @@
+
diff --git a/images/light/icon-repo-cloud-red.svg b/images/light/icon-repo-cloud-red.svg
new file mode 100644
index 0000000..21a84c9
--- /dev/null
+++ b/images/light/icon-repo-cloud-red.svg
@@ -0,0 +1,5 @@
+
diff --git a/images/light/icon-repo-cloud-yellow.svg b/images/light/icon-repo-cloud-yellow.svg
new file mode 100644
index 0000000..752c6aa
--- /dev/null
+++ b/images/light/icon-repo-cloud-yellow.svg
@@ -0,0 +1,5 @@
+
diff --git a/images/light/icon-repo-cloud.svg b/images/light/icon-repo-cloud.svg
new file mode 100644
index 0000000..16451d8
--- /dev/null
+++ b/images/light/icon-repo-cloud.svg
@@ -0,0 +1,5 @@
+
diff --git a/images/light/icon-repo-solid-blue.svg b/images/light/icon-repo-solid-blue.svg
new file mode 100644
index 0000000..b0496f9
--- /dev/null
+++ b/images/light/icon-repo-solid-blue.svg
@@ -0,0 +1,4 @@
+
diff --git a/images/light/icon-repo-solid-green.svg b/images/light/icon-repo-solid-green.svg
new file mode 100644
index 0000000..9f120a4
--- /dev/null
+++ b/images/light/icon-repo-solid-green.svg
@@ -0,0 +1,4 @@
+
diff --git a/images/light/icon-repo-solid-red.svg b/images/light/icon-repo-solid-red.svg
new file mode 100644
index 0000000..da150a6
--- /dev/null
+++ b/images/light/icon-repo-solid-red.svg
@@ -0,0 +1,4 @@
+
diff --git a/images/light/icon-repo-solid-yellow.svg b/images/light/icon-repo-solid-yellow.svg
new file mode 100644
index 0000000..082d659
--- /dev/null
+++ b/images/light/icon-repo-solid-yellow.svg
@@ -0,0 +1,4 @@
+
diff --git a/images/light/icon-repo-solid.svg b/images/light/icon-repo-solid.svg
new file mode 100644
index 0000000..59f72f1
--- /dev/null
+++ b/images/light/icon-repo-solid.svg
@@ -0,0 +1,4 @@
+
diff --git a/src/views/nodes/repositoryNode.ts b/src/views/nodes/repositoryNode.ts
index f70f0e6..8ba2f7b 100644
--- a/src/views/nodes/repositoryNode.ts
+++ b/src/views/nodes/repositoryNode.ts
@@ -207,28 +207,36 @@ export class RepositoryNode extends SubscribeableViewNode
lastFetched
? `${pad(GlyphChars.Dash, 2, 2)}Last fetched ${Repository.formatLastFetched(lastFetched, false)}`
: ''
- }${this.repo.formattedName ? `\n${this.uri.repoPath}` : ''}`;
- let iconSuffix = '';
+ }${this.repo.formattedName ? `\\\n${this.uri.repoPath}` : ''}`;
let workingStatus = '';
+ const { workspace } = this.context;
+
let contextValue: string = ContextValues.Repository;
if (this.repo.starred) {
contextValue += '+starred';
}
- if (this.context.workspace != null) {
+ if (workspace != null) {
contextValue += '+workspace';
- if (this.context.workspace.type === WorkspaceType.Cloud) {
+ if (workspace.type === WorkspaceType.Cloud) {
contextValue += '+cloud';
- } else if (this.context.workspace.type === WorkspaceType.Local) {
+ } else if (workspace.type === WorkspaceType.Local) {
contextValue += '+local';
}
}
+
+ let iconSuffix;
// TODO@axosoft-ramint Temporary workaround, remove when our git commands work on closed repos.
if (this.repo.closed) {
contextValue += '+closed';
+ iconSuffix = '';
+ } else {
+ iconSuffix = '-solid';
}
+
if (this.repo.virtual) {
contextValue += '+virtual';
+ iconSuffix = '-cloud';
}
const status = await this._status;
@@ -259,7 +267,7 @@ export class RepositoryNode extends SubscribeableViewNode
providerName = remote?.provider?.name;
}
- iconSuffix = workingStatus ? '-blue' : '';
+ iconSuffix += workingStatus ? '-blue' : '';
if (status.upstream != null) {
tooltip += ` is ${status.getUpstreamStatus({
empty: `up to date with $(git-branch) ${status.upstream}${
@@ -273,10 +281,10 @@ export class RepositoryNode extends SubscribeableViewNode
if (status.state.behind) {
contextValue += '+behind';
- iconSuffix = '-red';
+ iconSuffix += '-red';
}
if (status.state.ahead) {
- iconSuffix = status.state.behind ? '-yellow' : '-green';
+ iconSuffix += status.state.behind ? '-yellow' : '-green';
contextValue += '+ahead';
}
}
@@ -290,9 +298,13 @@ export class RepositoryNode extends SubscribeableViewNode
}
}
+ if (workspace != null) {
+ tooltip += `\n\nRepository is ${this.repo.closed ? 'not ' : ''}open in the current window`;
+ }
+
const item = new TreeItem(
label,
- this.context.workspace != null ? TreeItemCollapsibleState.Collapsed : TreeItemCollapsibleState.Expanded,
+ workspace != null ? TreeItemCollapsibleState.Collapsed : TreeItemCollapsibleState.Expanded,
);
item.id = this.id;
item.contextValue = contextValue;
@@ -304,7 +316,7 @@ export class RepositoryNode extends SubscribeableViewNode
light: this.view.container.context.asAbsolutePath(`images/light/icon-repo${iconSuffix}.svg`),
};
- if (this.context.workspace != null && !this.repo.closed) {
+ if (workspace != null && !this.repo.closed) {
item.resourceUri = Uri.parse(`gitlens-view://workspaces/repository/open`);
}
diff --git a/src/views/nodes/workspaceMissingRepositoryNode.ts b/src/views/nodes/workspaceMissingRepositoryNode.ts
index 33951b1..7dbd78c 100644
--- a/src/views/nodes/workspaceMissingRepositoryNode.ts
+++ b/src/views/nodes/workspaceMissingRepositoryNode.ts
@@ -1,4 +1,5 @@
-import { ThemeIcon, TreeItem, TreeItemCollapsibleState, Uri } from 'vscode';
+import { MarkdownString, ThemeColor, ThemeIcon, TreeItem, TreeItemCollapsibleState, Uri } from 'vscode';
+import type { Colors } from '../../constants';
import { unknownGitUri } from '../../git/gitUri';
import type {
CloudWorkspace,
@@ -46,9 +47,12 @@ export class WorkspaceMissingRepositoryNode extends ViewNode {
const item = new TreeItem(this.name, TreeItemCollapsibleState.None);
item.id = this.id;
item.description = 'Unable to find repo, please locate';
- item.tooltip = `${this.name} (missing)`;
+ item.tooltip = new MarkdownString(`${this.name}\n\nRepository could not be found`);
item.contextValue = ContextValues.WorkspaceMissingRepository;
- item.iconPath = new ThemeIcon('question');
+ item.iconPath = new ThemeIcon(
+ 'question',
+ new ThemeColor('gitlens.decorations.workspaceRepoMissingForegroundColor' satisfies Colors),
+ );
item.resourceUri = Uri.parse(`gitlens-view://workspaces/repository/missing`);
return item;
}
diff --git a/src/views/viewDecorationProvider.ts b/src/views/viewDecorationProvider.ts
index 1f353fd..793a0f0 100644
--- a/src/views/viewDecorationProvider.ts
+++ b/src/views/viewDecorationProvider.ts
@@ -47,14 +47,16 @@ export class ViewFileDecorationProvider implements FileDecorationProvider, Dispo
if (type === 'repository') {
if (status === 'open') {
return {
- badge: 'O',
+ badge: '●',
color: new ThemeColor('gitlens.decorations.workspaceRepoOpenForegroundColor' satisfies Colors),
- tooltip: 'Open',
+ tooltip: '',
};
- } else if (status === 'missing') {
+ }
+
+ if (status === 'missing') {
return {
color: new ThemeColor('gitlens.decorations.workspaceRepoMissingForegroundColor' satisfies Colors),
- tooltip: 'Missing',
+ tooltip: '',
};
}
}