File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 8686 "type" : " webview" ,
8787 "id" : " gitguardianQuotaView" ,
8888 "name" : " quota" ,
89- "collapsed" : true
89+ "collapsed" : true ,
90+ "when" : " isAuthenticated == true"
9091 }
9192 ]
9293 },
Original file line number Diff line number Diff line change @@ -120,6 +120,7 @@ function registerQuotaViewCommands(view: GitGuardianQuotaWebviewProvider) {
120120
121121export function activate ( context : ExtensionContext ) {
122122 // Check if ggshield if available
123+ commands . executeCommand ( 'setContext' , 'isAuthenticated' , false ) ;
123124 const outputChannel = window . createOutputChannel ( "GGShield Resolver" ) ;
124125 let configuration = createDefaultConfiguration ( context ) ;
125126 let authStatus : boolean = false ;
@@ -163,7 +164,9 @@ export function activate(context: ExtensionContext) {
163164 authStatus = ggshieldAuthStatus ( configuration ) ;
164165 if ( ! authStatus ) {
165166 updateStatusBarItem ( StatusBarStatus . unauthenticated , statusBar ) ;
166- }
167+ } else {
168+ commands . executeCommand ( 'setContext' , 'isAuthenticated' , true ) ;
169+ }
167170 } )
168171 . then ( async ( ) => {
169172 // Check if git is installed
@@ -229,6 +232,7 @@ export function activate(context: ExtensionContext) {
229232 if ( isAuthenticated ) {
230233 authStatus = true ;
231234 updateStatusBarItem ( StatusBarStatus . ready , statusBar ) ;
235+ commands . executeCommand ( 'setContext' , 'isAuthenticated' , true ) ;
232236 ggshieldViewProvider . refresh ( ) ;
233237 ggshieldQuotaViewProvider . refresh ( ) ;
234238 } else {
You can’t perform that action at this time.
0 commit comments