Commit a48ba696 authored by Harley Li's avatar Harley Li Committed by Commit Bot

[DevTools] Move button 'clear site data' upward

Hoist this button upward so that a user no longer needs to scroll down
to find it if the console is docked at the lower half of the Application
panel, providing convenience and less confusion to first-time users.

Bug: 825132
Change-Id: I6808695c1c3e00d92553e221169b9d76a2791b2e
Reviewed-on: https://chromium-review.googlesource.com/c/1306412
Commit-Queue: Haihong Li (Harley) <hhli@chromium.org>
Reviewed-by: default avatarErik Luo <luoe@chromium.org>
Reviewed-by: default avatarDmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604429}
parent c1b52ca6
......@@ -44,6 +44,10 @@ Resources.ClearStorageView = class extends UI.ThrottledWidget {
usageBreakdownRow.appendChild(this._pieChart.element);
usageBreakdownRow.appendChild(this._pieChartLegend);
const clearButtonSection = this._reportView.appendSection('', 'clear-storage-button').appendRow();
this._clearButton = UI.createTextButton(ls`Clear site data`, this._clear.bind(this));
clearButtonSection.appendChild(this._clearButton);
const application = this._reportView.appendSection(Common.UIString('Application'));
this._appendItem(application, Common.UIString('Unregister service workers'), 'service_workers');
......@@ -58,10 +62,6 @@ Resources.ClearStorageView = class extends UI.ThrottledWidget {
this._appendItem(caches, Common.UIString('Application cache'), 'appcache');
SDK.targetManager.observeTargets(this, SDK.Target.Capability.Browser);
const footer = this._reportView.appendSection('', 'clear-storage-button').appendRow();
this._clearButton = UI.createTextButton(
Common.UIString('Clear site data'), this._clear.bind(this), Common.UIString('Clear site data'));
footer.appendChild(this._clearButton);
}
/**
......
......@@ -10,7 +10,7 @@
}
.clear-storage-button .report-row {
margin: 0 0 0 20px;
margin: 0 0 0 17px;
display: flex;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment