@@ -33,7 +33,6 @@ import { ThemeIcon } from 'vs/base/common/themables';
33
33
import { isWorkspaceFolder , IWorkspaceContextService , IWorkspaceFolder , WorkbenchState } from 'vs/platform/workspace/common/workspace' ;
34
34
import { settingsEditIcon , settingsScopeDropDownIcon } from 'vs/workbench/contrib/preferences/browser/preferencesIcons' ;
35
35
import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService' ;
36
- import { IPreferencesService } from 'vs/workbench/services/preferences/common/preferences' ;
37
36
import { ILanguageService } from 'vs/editor/common/languages/language' ;
38
37
import { CONTEXT_SETTINGS_EDITOR_IN_USER_TAB } from 'vs/workbench/contrib/preferences/common/preferences' ;
39
38
@@ -52,7 +51,6 @@ export class FolderSettingsActionViewItem extends BaseActionViewItem {
52
51
action : IAction ,
53
52
@IWorkspaceContextService private readonly contextService : IWorkspaceContextService ,
54
53
@IContextMenuService private readonly contextMenuService : IContextMenuService ,
55
- @IPreferencesService private readonly preferencesService : IPreferencesService ,
56
54
) {
57
55
super ( null , action ) ;
58
56
const workspace = this . contextService . getWorkspace ( ) ;
@@ -142,14 +140,14 @@ export class FolderSettingsActionViewItem extends BaseActionViewItem {
142
140
}
143
141
}
144
142
145
- private async update ( ) : Promise < void > {
143
+ private update ( ) : void {
146
144
let total = 0 ;
147
145
this . _folderSettingCounts . forEach ( n => total += n ) ;
148
146
149
147
const workspace = this . contextService . getWorkspace ( ) ;
150
148
if ( this . _folder ) {
151
149
this . labelElement . textContent = this . _folder . name ;
152
- this . anchorElement . title = ( await this . preferencesService . getEditableSettingsURI ( ConfigurationTarget . WORKSPACE_FOLDER , this . _folder . uri ) ) ?. fsPath || '' ;
150
+ this . anchorElement . title = this . _folder . name ;
153
151
const detailsText = this . labelWithCount ( this . _action . label , total ) ;
154
152
this . detailsElement . textContent = detailsText ;
155
153
this . dropDownElement . classList . toggle ( 'hide' , workspace . folders . length === 1 || ! this . _action . checked ) ;
@@ -233,7 +231,6 @@ export class SettingsTargetsWidget extends Widget {
233
231
@IInstantiationService private readonly instantiationService : IInstantiationService ,
234
232
@IWorkbenchEnvironmentService private readonly environmentService : IWorkbenchEnvironmentService ,
235
233
@ILabelService private readonly labelService : ILabelService ,
236
- @IPreferencesService private readonly preferencesService : IPreferencesService ,
237
234
@ILanguageService private readonly languageService : ILanguageService ,
238
235
@IContextKeyService contextKeyService : IContextKeyService ,
239
236
) {
@@ -265,15 +262,12 @@ export class SettingsTargetsWidget extends Widget {
265
262
} ) ) ;
266
263
267
264
this . userLocalSettings = new Action ( 'userSettings' , '' , '.settings-tab' , true , ( ) => this . updateTarget ( ConfigurationTarget . USER_LOCAL ) ) ;
268
- this . preferencesService . getEditableSettingsURI ( ConfigurationTarget . USER_LOCAL ) . then ( uri => {
269
- // Don't wait to create UI on resolving remote
270
- this . userLocalSettings . tooltip = uri ?. fsPath ?? '' ;
271
- } ) ;
265
+ this . userLocalSettings . tooltip = localize ( 'userSettings' , "User" ) ;
272
266
273
267
this . userRemoteSettings = new Action ( 'userSettingsRemote' , '' , '.settings-tab' , true , ( ) => this . updateTarget ( ConfigurationTarget . USER_REMOTE ) ) ;
274
- this . preferencesService . getEditableSettingsURI ( ConfigurationTarget . USER_REMOTE ) . then ( uri => {
275
- this . userRemoteSettings . tooltip = uri ?. fsPath ?? '' ;
276
- } ) ;
268
+ const remoteAuthority = this . environmentService . remoteAuthority ;
269
+ const hostLabel = remoteAuthority && this . labelService . getHostLabel ( Schemas . vscodeRemote , remoteAuthority ) ;
270
+ this . userRemoteSettings . tooltip = localize ( 'userSettingsRemote' , "Remote" ) + ( hostLabel ? ` [ ${ hostLabel } ]` : '' ) ;
277
271
278
272
this . workspaceSettings = new Action ( 'workspaceSettings' , '' , '.settings-tab' , false , ( ) => this . updateTarget ( ConfigurationTarget . WORKSPACE ) ) ;
279
273
@@ -368,7 +362,7 @@ export class SettingsTargetsWidget extends Widget {
368
362
this . workspaceSettings . enabled = this . contextService . getWorkbenchState ( ) !== WorkbenchState . EMPTY ;
369
363
this . folderSettings . action . enabled = this . contextService . getWorkbenchState ( ) === WorkbenchState . WORKSPACE && this . contextService . getWorkspace ( ) . folders . length > 0 ;
370
364
371
- this . workspaceSettings . tooltip = ( await this . preferencesService . getEditableSettingsURI ( ConfigurationTarget . WORKSPACE ) ) ?. fsPath || '' ;
365
+ this . workspaceSettings . tooltip = localize ( 'workspaceSettings' , "Workspace" ) ;
372
366
}
373
367
}
374
368
0 commit comments