@@ -28,7 +28,19 @@ Index: code-server/lib/vscode/src/vs/workbench/services/environment/browser/envi
28
28
===================================================================
29
29
--- code-server.orig/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts
30
30
+++ code-server/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts
31
- @@ -61,6 +61,13 @@ export class BrowserWorkbenchEnvironment
31
+ @@ -30,6 +30,11 @@ export interface IBrowserWorkbenchEnviro
32
+ * Options used to configure the workbench.
33
+ */
34
+ readonly options?: IWorkbenchConstructionOptions;
35
+ +
36
+ + /**
37
+ + * Enable downloading files via menu actions.
38
+ + */
39
+ + readonly isEnabledFileDownloads?: boolean;
40
+ }
41
+
42
+ export class BrowserWorkbenchEnvironmentService implements IBrowserWorkbenchEnvironmentService {
43
+ @@ -61,6 +66,13 @@ export class BrowserWorkbenchEnvironment
32
44
return this.options.userDataPath;
33
45
}
34
46
@@ -78,7 +90,7 @@ Index: code-server/lib/vscode/src/vs/workbench/browser/contextkeys.ts
78
90
===================================================================
79
91
--- code-server.orig/lib/vscode/src/vs/workbench/browser/contextkeys.ts
80
92
+++ code-server/lib/vscode/src/vs/workbench/browser/contextkeys.ts
81
- @@ -7,7 +7,7 @@ import { Event } from 'vs/base/common/ev
93
+ @@ -7,12 +7,11 @@ import { Event } from 'vs/base/common/ev
82
94
import { Disposable } from 'vs/base/common/lifecycle';
83
95
import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey';
84
96
import { InputFocusedContext, IsMacContext, IsLinuxContext, IsWindowsContext, IsWebContext, IsMacNativeContext, IsDevelopmentContext, IsIOSContext } from 'vs/platform/contextkey/common/contextkeys';
@@ -87,30 +99,38 @@ Index: code-server/lib/vscode/src/vs/workbench/browser/contextkeys.ts
87
99
import { TEXT_DIFF_EDITOR_ID, EditorInputCapabilities, SIDE_BY_SIDE_EDITOR_ID, DEFAULT_EDITOR_ASSOCIATION } from 'vs/workbench/common/editor';
88
100
import { trackFocus, addDisposableListener, EventType } from 'vs/base/browser/dom';
89
101
import { preferredSideBySideGroupDirection, GroupDirection, IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService';
102
+ import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
103
+ - import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';
104
+ import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
105
+ import { WorkbenchState, IWorkspaceContextService } from 'vs/platform/workspace/common/workspace';
106
+ import { IWorkbenchLayoutService, Parts, positionToString } from 'vs/workbench/services/layout/browser/layoutService';
107
+ @@ -24,6 +23,7 @@ import { IEditorResolverService } from '
108
+ import { IPaneCompositePartService } from 'vs/workbench/services/panecomposite/browser/panecomposite';
109
+ import { Schemas } from 'vs/base/common/network';
110
+ import { WebFileSystemAccess } from 'vs/platform/files/browser/webFileSystemAccess';
111
+ + import { IBrowserWorkbenchEnvironmentService } from '../services/environment/browser/environmentService';
112
+
113
+ export class WorkbenchContextKeysHandler extends Disposable {
114
+ private inputFocusedContext: IContextKey<boolean>;
115
+ @@ -75,7 +75,7 @@ export class WorkbenchContextKeysHandler
116
+ @IContextKeyService private readonly contextKeyService: IContextKeyService,
117
+ @IWorkspaceContextService private readonly contextService: IWorkspaceContextService,
118
+ @IConfigurationService private readonly configurationService: IConfigurationService,
119
+ - @IWorkbenchEnvironmentService private readonly environmentService: IWorkbenchEnvironmentService,
120
+ + @IBrowserWorkbenchEnvironmentService private readonly environmentService: IBrowserWorkbenchEnvironmentService,
121
+ @IEditorService private readonly editorService: IEditorService,
122
+ @IEditorResolverService private readonly editorResolverService: IEditorResolverService,
123
+ @IEditorGroupsService private readonly editorGroupService: IEditorGroupsService,
90
124
@@ -194,6 +194,9 @@ export class WorkbenchContextKeysHandler
91
125
this.auxiliaryBarVisibleContext = AuxiliaryBarVisibleContext.bindTo(this.contextKeyService);
92
126
this.auxiliaryBarVisibleContext.set(this.layoutService.isVisible(Parts.AUXILIARYBAR_PART));
93
127
94
128
+ // code-server
95
- + IsEnabledFileDownloads.bindTo(this.contextKeyService).set(this.environmentService.isEnabledFileDownloads)
129
+ + IsEnabledFileDownloads.bindTo(this.contextKeyService).set(this.environmentService.isEnabledFileDownloads ?? true )
96
130
+
97
131
this.registerListeners();
98
132
}
99
133
100
- Index: code-server/lib/vscode/src/vs/workbench/services/environment/common/environmentService.ts
101
- ===================================================================
102
- --- code-server.orig/lib/vscode/src/vs/workbench/services/environment/common/environmentService.ts
103
- +++ code-server/lib/vscode/src/vs/workbench/services/environment/common/environmentService.ts
104
- @@ -44,6 +44,9 @@ export interface IWorkbenchEnvironmentSe
105
- readonly filesToOpenOrCreate?: IPath[] | undefined;
106
- readonly filesToDiff?: IPath[] | undefined;
107
-
108
- + // --- code-server
109
- + readonly isEnabledFileDownloads: boolean;
110
- +
111
- // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
112
- // NOTE: KEEP THIS INTERFACE AS SMALL AS POSSIBLE. AS SUCH:
113
- // - PUT NON-WEB PROPERTIES INTO NATIVE WB ENV SERVICE
114
134
Index: code-server/lib/vscode/src/vs/workbench/contrib/files/browser/fileActions.contribution.ts
115
135
===================================================================
116
136
--- code-server.orig/lib/vscode/src/vs/workbench/contrib/files/browser/fileActions.contribution.ts
0 commit comments