Chromium Code Reviews| Index: third_party/WebKit/Source/devtools/front_end/resources/AppManifestView.js |
| diff --git a/third_party/WebKit/Source/devtools/front_end/resources/AppManifestView.js b/third_party/WebKit/Source/devtools/front_end/resources/AppManifestView.js |
| index ceab6867f34566a8e6034a6f57e5ce3022798e8f..e807bd4e7079fcc1c8fdf8937a34b66f47de2999 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/resources/AppManifestView.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/resources/AppManifestView.js |
| @@ -10,7 +10,12 @@ Resources.AppManifestView = class extends UI.VBox { |
| super(true); |
| this.registerRequiredCSS('resources/appManifestView.css'); |
| - this._emptyView = new UI.EmptyWidget(Common.UIString('No web app manifest')); |
| + var p = createElement('p'); |
| + p.textContent = 'A web manifest allows you to control how your app behaves when launched and displayed to the user. '; |
|
pfeldman
2017/02/15 19:57:02
UI.formatLocalized('Lorem %s.', [linkElement])
paulirish
2017/02/23 01:49:30
sgtm. done
|
| + p.appendChild(UI.createExternalLink('https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/?utm_source=devtools', |
| + Common.UIString('Read more about the web manifest'))); |
| + this._emptyView = new UI.EmptyWidget(Common.UIString('No manifest detected'), p); |
|
pfeldman
2017/02/15 19:57:02
style: prefer
var p = this._emptyView.appendParag
paulirish
2017/02/23 01:49:30
yeah this is much better. good idea.
|
| + |
| this._emptyView.show(this.contentElement); |
| this._emptyView.hideWidget(); |
| @@ -28,14 +33,6 @@ Resources.AppManifestView = class extends UI.VBox { |
| addToHomeScreen.addEventListener(UI.ToolbarButton.Events.Click, this._addToHomescreen, this); |
| toolbar.appendToolbarItem(addToHomeScreen); |
| - this._manifestlessSection = this._reportView.appendSection(Common.UIString('No manifest detected')); |
| - var p = createElement('p'); |
| - p.textContent = 'A web manifest allows you to control how your app behaves when launched and displayed to the user. '; |
| - p.appendChild(UI.createExternalLink('https://developers.google.com/web/progressive-web-apps/?utm_source=devtools', |
| - Common.UIString('Read more on developers.google.com'))); |
| - this._manifestlessSection.element.appendChild(p); |
| - this._manifestlessSection.element.classList.add('hidden'); |
| - |
| this._presentationSection = this._reportView.appendSection(Common.UIString('Presentation')); |
| this._iconsSection = this._reportView.appendSection(Common.UIString('Icons')); |
| @@ -111,12 +108,8 @@ Resources.AppManifestView = class extends UI.VBox { |
| UI.createLabel(error.message, error.critical ? 'smallicon-error' : 'smallicon-warning')); |
| } |
| - var manifestDataFound = !!data; |
| - this._manifestlessSection.element.classList.toggle('hidden', manifestDataFound); |
| - this._presentationSection.element.classList.toggle('hidden', !manifestDataFound); |
| - this._iconsSection.element.classList.toggle('hidden', !manifestDataFound); |
| - this._identitySection.element.classList.toggle('hidden', !manifestDataFound); |
| - if (!data) return; |
| + if (!data) |
| + return; |
| var parsedManifest = JSON.parse(data); |
| this._nameField.textContent = stringProperty('name'); |