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

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

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

Powered by Google App Engine
This is Rietveld 408576698