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

Unified Diff: chrome/browser/resources/options/chromeos/storage_manager.js

Issue 2078153002: Storage manager: Add conditional messages for disk low situation and update design. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Load roboto.css if chromeos Created 4 years, 6 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
Index: chrome/browser/resources/options/chromeos/storage_manager.js
diff --git a/chrome/browser/resources/options/chromeos/storage_manager.js b/chrome/browser/resources/options/chromeos/storage_manager.js
index 65aa199935a5f2b88c9c363e6e138d7179ce99fd..b2896568c5c7534200fcbeb9baabebc5ece91365 100644
--- a/chrome/browser/resources/options/chromeos/storage_manager.js
+++ b/chrome/browser/resources/options/chromeos/storage_manager.js
@@ -7,7 +7,9 @@
* totalSize: string,
* availableSize: string,
* usedSize: string,
- * usedRatio: number
+ * usedRatio: number,
+ * isSpaceLow: boolean,
+ * isSpaceCriticallyLow: boolean
* }}
*/
options.StorageSizeStat;
@@ -60,6 +62,11 @@ cr.define('options', function() {
$('storage-manager-size-capacity').textContent = sizeStat.totalSize;
$('storage-manager-size-in-use').textContent = sizeStat.usedSize;
$('storage-manager-size-available').textContent = sizeStat.availableSize;
+ $('storage-bar-progress').style.width = sizeStat.usedRatio * 100 + '%';
+ $('storageManagerPage').classList.toggle('critically-low-space',
+ sizeStat.isSpaceCriticallyLow);
+ $('storageManagerPage').classList.toggle('low-space',
+ sizeStat.isSpaceLow && !sizeStat.isSpaceCriticallyLow);
},
/**

Powered by Google App Engine
This is Rietveld 408576698