File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 1- import { StatusBarItem , window } from 'vscode'
1+ import { StatusBarItem , ThemeColor , window } from 'vscode'
22import { Disposable } from './class/dispose'
33import { ICli } from './cli'
44import { RegisteredCommands } from './commands/external'
@@ -51,6 +51,8 @@ export class Status extends Disposable {
5151
5252 private setState = ( isWorking : boolean ) => {
5353 this . statusBarItem . text = this . getText ( isWorking )
54+ this . statusBarItem . color = this . getColor ( )
55+
5456 this . statusBarItem . command = this . getCommand ( )
5557 }
5658
@@ -66,6 +68,13 @@ export class Status extends Disposable {
6668 }
6769 }
6870
71+ private getColor ( ) {
72+ if ( this . available ) {
73+ return
74+ }
75+ return new ThemeColor ( 'errorForeground' )
76+ }
77+
6978 private getCommand ( ) {
7079 if ( this . available ) {
7180 return
You can’t perform that action at this time.
0 commit comments