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

Side by Side Diff: chrome/browser/resources/settings/device_page/storage.html

Issue 2348913002: Port storage manager to MD settings. (Closed)
Patch Set: Address review comments 2. Created 4 years, 2 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 unified diff | Download patch
OLDNEW
(Empty)
1 <link rel="import" href="chrome://resources/cr_elements/icons.html">
2 <link rel="import" href="chrome://resources/html/polymer.html">
3 <link rel="import" href="chrome://resources/html/web_ui_listener_behavior.html">
4 <link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.htm l">
5 <link rel="import" href="chrome://resources/polymer/v1_0/paper-progress/paper-pr ogress.html">
6 <link rel="import" href="/device_page/drive_cache_dialog.html">
7 <link rel="import" href="/prefs/prefs.html">
8 <link rel="import" href="/route.html">
9 <link rel="import" href="/settings_shared_css.html">
10
11 <dom-module id="settings-storage">
12 <template>
13 <style include="settings-shared">
14 progress {
15 -webkit-appearance: none;
16 display: block;
17 height: 40px;
18 width: 100%;
19 }
20
21 progress::-webkit-progress-bar {
22 background-color: rgb(232, 232, 232);
23 border-radius: 2px;
24 }
25
26 progress::-webkit-progress-value {
27 background-color: rgb(167, 225, 251);
28 border-radius: 2px;
29 }
30
31 progress.space-low::-webkit-progress-value {
32 background-color: rgb(255, 176, 0);
33 }
34
35 progress.space-critically-low::-webkit-progress-value {
36 background-color: var(--google-red-500);
37 }
38
39 iron-icon {
40 --iron-icon-fill-color: rgb(255, 176, 0);
41 --iron-icon-height: 20px;
42 --iron-icon-width: 20px;
43 }
44
45 #criticallyLowMessage iron-icon {
46 --iron-icon-fill-color: var(--google-red-500);
47 }
48
49 .storage-size {
50 color: rgb(145, 145, 145);
51 }
52
53 .message-area {
54 background-color: var(--google-grey-100);
55 border-radius: 2px;
56 margin: 10px 0;
57 padding: 20px 20px 6px;
58 width: 100%;
59 }
60
61 .message-title {
62 align-items: center;
63 display: flex;
64 margin-bottom: 16px;
65 }
66
67 .message-title span {
68 font-size: 115%;
69 margin: 0 10px;
70 }
71
72 .message-area > div:not(.message-title) {
73 color: rgb(90, 90, 90);
74 margin: 1em 0;
75 }
76
77 #barArea {
78 display: flex;
79 flex-direction: column;
80 margin: 12px 0 20px;
81 width: 100%;
82 }
83
84 #barLabels {
85 display: flex;
86 }
87
88 .bar-label {
89 display: flex;
90 flex-direction: column;
91 }
92
93 .bar-label .vertical-line {
94 align-self: center;
95 background-color: rgb(223, 223, 223);
96 height: 10px;
97 width: 1px;
98 }
99
100 .bar-label span {
101 font-size: 85%;
102 }
103
104 .bar-label .wrapper {
105 text-align: center;
106 white-space: nowrap;
107 }
108
109 /* If the "Available" part in the ber is too small, the label "Available"
110 * and a label for its size can overstep the right edge of bar area.
111 * To prevent it, we invert the direction to put the text labels here.
112 * We restore the direction for inner span elements not to change how to
113 * render the text contents. */
114 .end-aligned .wrapper {
115 direction: rtl;
116 }
117
118 :host-context([dir=rtl]) .end-aligned .wrapper {
119 direction: ltr;
120 }
121
122 .end-aligned .wrapper span {
123 direction: initial;
124 unicode-bidi: embed;
125 }
126 </style>
127 <div class="settings-box first"
128 hidden$="[[!isSpaceLow_(sizeStat_.spaceState)]]">
129 <div class="message-area">
130 <div class="message-title">
131 <iron-icon icon="cr:warning"></iron-icon>
132 <span>$i18n{storageSpaceLowMessageTitle}</span>
133 </div>
134 <div>$i18n{storageSpaceLowMessageLine1}</div>
135 <div>$i18n{storageSpaceLowMessageLine2}</div>
136 </div>
137 </div>
138 <div class="settings-box first"
139 hidden$="[[!isSpaceCriticallyLow_(sizeStat_.spaceState)]]">
140 <div id="criticallyLowMessage" class="message-area">
141 <div class="message-title">
142 <iron-icon icon="cr:warning"></iron-icon>
143 <span>$i18n{storageSpaceCriticallyLowMessageTitle}</span>
144 </div>
145 <div>$i18n{storageSpaceCriticallyLowMessageLine1}</div>
146 <div>$i18n{storageSpaceCriticallyLowMessageLine2}</div>
147 </div>
148 </div>
149 <div class="settings-box first">
150 <div id="barArea">
151 <progress id="bar" class$="[[getBarClass_(sizeStat_.spaceState)]]"
152 value="[[sizeStat_.usedRatio]]"></progress>
153 <div id="barLabels">
154 <div id="inUseLabelArea" class="bar-label">
155 <div class="vertical-line"></div>
156 <div class="wrapper"><span>$i18n{storageItemInUse}</span></div>
157 <div class="wrapper">
158 <span class="storage-size">[[sizeStat_.usedSize]]</span>
159 </div>
160 </div>
161 <div id="availableLabelArea" class="bar-label end-aligned">
162 <div class="vertical-line"></div>
163 <div class="wrapper"><span>$i18n{storageItemAvailable}</span></div>
164 <div class="wrapper">
165 <span class="storage-size">[[sizeStat_.availableSize]]</span>
166 </div>
167 </div>
168 </div>
169 </div>
170 </div>
171 <div class="settings-box" on-tap="onDownloadsTap_" actionable>
172 <div class="start">$i18n{storageItemDownloads}</div>
173 <div id="downloadsSize" class="storage-size">
174 $i18n{storageSizeComputing}
175 </div>
176 </div>
177 <div class="settings-box" on-tap="onDriveCacheTap_"
178 hidden$="[[!driveEnabled_]]" actionable>
179 <div class="start">$i18n{storageItemDriveCache}</div>
180 <div id="driveCacheSize" class="storage-size">
181 $i18n{storageSizeComputing}
182 </div>
183 </div>
184 <div class="settings-box" on-tap="onBrowsingDataTap_" actionable>
185 <div class="start">$i18n{storageItemBrowsingData}</div>
186 <div id="browsingDataSize" class="storage-size">
187 $i18n{storageSizeComputing}
188 </div>
189 </div>
190 <div class="settings-box" on-tap="onAndroidTap_"
191 hidden$="[[!androidEnabled_]]" actionable>
192 <div class="start">$i18n{storageItemAndroid}</div>
193 <div id="androidSize" class="storage-size">
194 $i18n{storageSizeComputing}
195 </div>
196 </div>
197 <div class="settings-box" on-tap="onOtherUsersTap_" actionable>
198 <div class="start">$i18n{storageItemOtherUsers}</div>
199 <div id="otherUsersSize" class="storage-size">
200 $i18n{storageSizeComputing}
201 </div>
202 </div>
203 <settings-drive-cache-dialog id="storageDriveCache">
204 </settings-drive-cache-dialog>
205 </template>
206 <script src="/device_page/storage.js"></script>
207 </dom-module>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698