@@ -18,10 +18,10 @@ import { isWindows } from 'vs/base/common/platform';
18
18
import { IFileDialogService } from 'vs/platform/dialogs/common/dialogs' ;
19
19
import { mnemonicButtonLabel } from 'vs/base/common/labels' ;
20
20
import { ShowCurrentReleaseNotesActionId } from 'vs/workbench/contrib/update/common/update' ;
21
- import { IsWebContext } from 'vs/platform/contextkey/common/contextkeys' ;
22
21
import { IOpenerService } from 'vs/platform/opener/common/opener' ;
23
22
import { IProductService } from 'vs/platform/product/common/productService' ;
24
23
import { URI } from 'vs/base/common/uri' ;
24
+ import { RawContextKey } from 'vs/platform/contextkey/common/contextkey' ;
25
25
26
26
const workbench = Registry . as < IWorkbenchContributionsRegistry > ( WorkbenchExtensions . Workbench ) ;
27
27
@@ -140,6 +140,8 @@ class RestartToUpdateAction extends Action2 {
140
140
}
141
141
}
142
142
143
+ const CONTEXT_DONT_SHOW_DOWNLOAD_ACTION = new RawContextKey < false > ( 'doNotShowDownloadAction' , false ) ;
144
+
143
145
class DownloadAction extends Action2 {
144
146
145
147
static readonly ID = 'workbench.action.download' ;
@@ -152,11 +154,11 @@ class DownloadAction extends Action2 {
152
154
value : localize ( 'openDownloadPage' , "Download {0}" , product . nameLong ) ,
153
155
original : `Download ${ product . downloadUrl } `
154
156
} ,
155
- precondition : IsWebContext , // Only show when running in a web browser
157
+ precondition : CONTEXT_DONT_SHOW_DOWNLOAD_ACTION , // Only show when running in a web browser
156
158
f1 : true ,
157
159
menu : [ {
158
160
id : MenuId . StatusBarWindowIndicatorMenu ,
159
- when : IsWebContext
161
+ when : CONTEXT_DONT_SHOW_DOWNLOAD_ACTION
160
162
} ]
161
163
} ) ;
162
164
}
0 commit comments