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'
2
2
import { Disposable } from './class/dispose'
3
3
import { ICli } from './cli'
4
4
import { RegisteredCommands } from './commands/external'
@@ -51,6 +51,8 @@ export class Status extends Disposable {
51
51
52
52
private setState = ( isWorking : boolean ) => {
53
53
this . statusBarItem . text = this . getText ( isWorking )
54
+ this . statusBarItem . color = this . getColor ( )
55
+
54
56
this . statusBarItem . command = this . getCommand ( )
55
57
}
56
58
@@ -66,6 +68,13 @@ export class Status extends Disposable {
66
68
}
67
69
}
68
70
71
+ private getColor ( ) {
72
+ if ( this . available ) {
73
+ return
74
+ }
75
+ return new ThemeColor ( 'errorForeground' )
76
+ }
77
+
69
78
private getCommand ( ) {
70
79
if ( this . available ) {
71
80
return
You can’t perform that action at this time.
0 commit comments