Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(406)

Unified Diff: third_party/WebKit/Source/devtools/front_end/settings/EditFileSystemView.js

Issue 2614883002: DevTools: lighten the workspaces settings ui a bit. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/settings/SettingsScreen.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/settings/EditFileSystemView.js
diff --git a/third_party/WebKit/Source/devtools/front_end/settings/EditFileSystemView.js b/third_party/WebKit/Source/devtools/front_end/settings/EditFileSystemView.js
index 5314a9e7f15e8f90085b285486970c18fe9b0536..0051824ba6d66a6ae4ed30f53c1068c34062f825 100644
--- a/third_party/WebKit/Source/devtools/front_end/settings/EditFileSystemView.js
+++ b/third_party/WebKit/Source/devtools/front_end/settings/EditFileSystemView.js
@@ -51,27 +51,20 @@ Settings.EditFileSystemView = class extends UI.VBox {
Workspace.IsolatedFileSystemManager.Events.ExcludedFolderRemoved, this._update, this)
];
- this._mappingsList = new UI.ListWidget(this);
- this._mappingsList.element.classList.add('file-system-list');
- this._mappingsList.registerRequiredCSS('settings/editFileSystemView.css');
- var mappingsPlaceholder = createElementWithClass('div', 'file-system-list-empty');
- var mappingsHeader = this.contentElement.createChild('div', 'file-system-header');
- mappingsHeader.createChild('div', 'file-system-header-text').textContent = Common.UIString('Mappings');
- if (Runtime.experiments.isEnabled('persistence2')) {
- var div = mappingsPlaceholder.createChild('div');
- div.createTextChild(
- Common.UIString('Mappings are inferred automatically via the \'Persistence 2.0\' experiment. Please '));
- div.appendChild(UI.createExternalLink(
- 'https://bugs.chromium.org/p/chromium/issues/entry?template=Defect%20report%20from%20user&components=Platform%3EDevTools%3EAuthoring&comment=DevTools%20failed%20to%20link%20network%20resource%20to%20filesystem.%0A%0APlatform%3A%20%3CLinux%2FWin%2FMac%3E%0AChrome%20version%3A%20%3Cyour%20chrome%20version%3E%0A%0AWhat%20are%20the%20details%20of%20your%20project%3F%0A-%20Source%20code%20(if%20any)%3A%20http%3A%2F%2Fgithub.com%2Fexample%2Fexample%0A-%20Build%20System%3A%20gulp%2Fgrunt%2Fwebpack%2Frollup%2F...%0A-%20HTTP%20server%3A%20node%20HTTP%2Fnginx%2Fapache...%0A%0AAssets%20failed%20to%20link%20(or%20incorrectly%20linked)%3A%0A1.%0A2.%0A3.%0A%0AIf%20possible%2C%20please%20attach%20a%20screenshot%20of%20network%20sources%20navigator%20which%20should%0Ashow%20which%20resources%20failed%20to%20map',
- Common.UIString('report')));
- div.createTextChild(Common.UIString(' any bugs.'));
- } else {
- mappingsPlaceholder.textContent = Common.UIString('No mappings');
+
+ if (!Runtime.experiments.isEnabled('persistence2')) {
+ this._mappingsList = new UI.ListWidget(this);
+ this._mappingsList.element.classList.add('file-system-list');
+ this._mappingsList.registerRequiredCSS('settings/editFileSystemView.css');
+ var mappingsPlaceholder = createElementWithClass('div', 'file-system-list-empty');
+ var mappingsHeader = this.contentElement.createChild('div', 'file-system-header');
+ mappingsHeader.createChild('div', 'file-system-header-text').textContent = Common.UIString('Mappings');
+ mappingsPlaceholder.textContent = Common.UIString('None');
mappingsHeader.appendChild(
UI.createTextButton(Common.UIString('Add'), this._addMappingButtonClicked.bind(this), 'add-button'));
+ this._mappingsList.setEmptyPlaceholder(mappingsPlaceholder);
+ this._mappingsList.show(this.contentElement);
}
- this._mappingsList.setEmptyPlaceholder(mappingsPlaceholder);
- this._mappingsList.show(this.contentElement);
var excludedFoldersHeader = this.contentElement.createChild('div', 'file-system-header');
excludedFoldersHeader.createChild('div', 'file-system-header-text').textContent =
@@ -82,7 +75,7 @@ Settings.EditFileSystemView = class extends UI.VBox {
this._excludedFoldersList.element.classList.add('file-system-list');
this._excludedFoldersList.registerRequiredCSS('settings/editFileSystemView.css');
var excludedFoldersPlaceholder = createElementWithClass('div', 'file-system-list-empty');
- excludedFoldersPlaceholder.textContent = Common.UIString('No excluded folders');
+ excludedFoldersPlaceholder.textContent = Common.UIString('None');
this._excludedFoldersList.setEmptyPlaceholder(excludedFoldersPlaceholder);
this._excludedFoldersList.show(this.contentElement);
@@ -98,10 +91,11 @@ Settings.EditFileSystemView = class extends UI.VBox {
if (this._muteUpdate)
return;
- this._mappingsList.clear();
this._mappings = [];
if (Runtime.experiments.isEnabled('persistence2'))
return;
+
+ this._mappingsList.clear();
var mappings = Workspace.fileSystemMapping.mappingEntries(this._fileSystemPath);
for (var entry of mappings) {
if (entry.configurable) {
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/settings/SettingsScreen.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698