Commit 8313ba4a authored by Tomas Vik (OOO back on 2026-08-31)'s avatar Tomas Vik (OOO back on 2026-08-31) 🌴
Browse files

feat: clicking ambigous project item lets user select a project

parent 59f6345a
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
import vscode from 'vscode';
import path from 'path';
import { GitRepository } from '../../git/new_git';
import { USER_COMMANDS } from '../../command_names';

export class MultipleProjectsItem extends vscode.TreeItem {
  repository: GitRepository;
@@ -11,5 +12,10 @@ export class MultipleProjectsItem extends vscode.TreeItem {
    this.repository = repository;
    this.iconPath = new vscode.ThemeIcon('warning');
    this.contextValue = 'multiple-projects-detected';
    this.command = {
      command: USER_COMMANDS.SELECT_PROJECT,
      title: 'Select GitLab Project',
      arguments: [this],
    };
  }
}
+6 −0
Original line number Diff line number Diff line
import vscode from 'vscode';
import path from 'path';
import { GitRepository } from '../../git/new_git';
import { USER_COMMANDS } from '../../command_names';

export class NoProjectItem extends vscode.TreeItem {
  repository: GitRepository;
@@ -11,5 +12,10 @@ export class NoProjectItem extends vscode.TreeItem {
    this.repository = repository;
    this.iconPath = new vscode.ThemeIcon('error');
    this.contextValue = 'no-project-detected';
    this.command = {
      command: USER_COMMANDS.SELECT_PROJECT,
      title: 'Select GitLab Project',
      arguments: [this],
    };
  }
}