OLD | NEW |
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="chrome://resources/polymer/v1_0/paper-icon-button/paper
-icon-button-light.html"> |
5 <link rel="import" href="/device_page/drive_cache_dialog.html"> | 6 <link rel="import" href="/device_page/drive_cache_dialog.html"> |
6 <link rel="import" href="/prefs/prefs.html"> | 7 <link rel="import" href="/prefs/prefs.html"> |
7 <link rel="import" href="/route.html"> | 8 <link rel="import" href="/route.html"> |
8 <link rel="import" href="/settings_shared_css.html"> | 9 <link rel="import" href="/settings_shared_css.html"> |
9 | 10 |
10 <dom-module id="settings-storage"> | 11 <dom-module id="settings-storage"> |
11 <template> | 12 <template> |
12 <style include="settings-shared"> | 13 <style include="settings-shared"> |
13 progress { | 14 progress { |
14 -webkit-appearance: none; | 15 -webkit-appearance: none; |
15 display: block; | 16 display: block; |
16 height: 40px; | 17 height: 28px; |
17 width: 100%; | 18 width: 100%; |
18 } | 19 } |
19 | 20 |
20 progress::-webkit-progress-bar { | 21 progress::-webkit-progress-bar { |
21 background-color: rgb(232, 232, 232); | 22 background-color: rgba(0, 0, 0, 0.06); |
22 border-radius: 2px; | 23 border-radius: 2px; |
23 } | 24 } |
24 | 25 |
25 progress::-webkit-progress-value { | 26 progress::-webkit-progress-value { |
26 background-color: rgb(167, 225, 251); | 27 background-color: rgb(0, 175, 255); |
27 border-radius: 2px; | 28 border-radius: 2px; |
28 } | 29 } |
29 | 30 |
30 progress.space-low::-webkit-progress-value { | 31 progress.space-low::-webkit-progress-value { |
31 background-color: rgb(255, 176, 0); | 32 background-color: rgb(255, 176, 0); |
32 } | 33 } |
33 | 34 |
34 progress.space-critically-low::-webkit-progress-value { | 35 progress.space-critically-low::-webkit-progress-value { |
35 background-color: var(--google-red-500); | 36 background-color: var(--google-red-500); |
36 } | 37 } |
37 | 38 |
38 iron-icon { | 39 iron-icon { |
39 --iron-icon-fill-color: rgb(255, 176, 0); | 40 --iron-icon-fill-color: rgb(255, 176, 0); |
40 --iron-icon-height: 20px; | 41 --iron-icon-height: 32px; |
41 --iron-icon-width: 20px; | 42 --iron-icon-width: 32px; |
42 } | 43 } |
43 | 44 |
44 #criticallyLowMessage iron-icon { | 45 #criticallyLowMessage iron-icon { |
45 --iron-icon-fill-color: var(--google-red-500); | 46 --iron-icon-fill-color: var(--google-red-500); |
46 } | 47 } |
47 | 48 |
48 .storage-size { | 49 .storage-size { |
49 color: rgb(145, 145, 145); | 50 color: var(--paper-grey-600); |
50 } | 51 } |
51 | 52 |
52 .message-area { | 53 .message-area { |
| 54 -webkit-padding-end: 48px; |
| 55 -webkit-padding-start: 16px; |
53 background-color: var(--google-grey-100); | 56 background-color: var(--google-grey-100); |
54 border-radius: 2px; | 57 border-radius: 2px; |
55 margin: 10px 0; | 58 display: flex; |
56 padding: 20px 20px 6px; | 59 margin: 14px 0 16px; |
| 60 padding-bottom: 12px; |
| 61 padding-top: 16px; |
57 width: 100%; | 62 width: 100%; |
58 } | 63 } |
59 | 64 |
60 .message-title { | 65 .message-area > iron-icon { |
61 align-items: center; | 66 -webkit-padding-end: 16px; |
62 display: flex; | 67 flex: none; |
63 margin-bottom: 16px; | |
64 } | 68 } |
65 | 69 |
66 .message-title span { | 70 .message-title { |
67 font-size: 115%; | 71 font-size: 115%; |
68 margin: 0 10px; | |
69 } | 72 } |
70 | 73 |
71 .message-area > div:not(.message-title) { | 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> |
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> |
OLD | NEW |