Chromium Code Reviews| OLD | NEW |
|---|---|
| (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/paper-progress/paper-pr ogress.html"> | |
| 5 <link rel="import" href="/device_page/drive_cache_dialog.html"> | |
| 6 <link rel="import" href="/prefs/prefs.html"> | |
| 7 <link rel="import" href="/route.html"> | |
| 8 <link rel="import" href="/settings_page/settings_subpage.html"> | |
|
michaelpg
2016/10/01 01:41:05
unused
fukino
2016/10/03 18:40:41
Done.
| |
| 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: rgb(219, 68, 55); | |
| 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 #critically-low-message iron-icon { | |
| 46 --iron-icon-fill-color: rgb(219, 68, 55); | |
| 47 } | |
| 48 | |
| 49 .storage-size { | |
| 50 color: rgb(145, 145, 145); | |
| 51 } | |
| 52 | |
| 53 .message-area { | |
| 54 background-color: rgb(245, 245, 245); | |
|
michaelpg
2016/10/01 01:41:05
var(--google-grey-100)
(same for any other colors
fukino
2016/10/03 18:40:41
Thanks! It turned out that --google-red-500 can al
| |
| 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 p { | |
| 73 color: rgb(90, 90, 90); | |
| 74 } | |
| 75 | |
| 76 #bar-area { | |
| 77 display: flex; | |
| 78 flex-direction: column; | |
| 79 margin: 12px 0 20px; | |
| 80 width: 100%; | |
| 81 } | |
| 82 | |
| 83 #bar-labels { | |
| 84 display: flex; | |
| 85 } | |
| 86 | |
| 87 .bar-label { | |
| 88 display: flex; | |
| 89 flex-direction: column; | |
| 90 } | |
| 91 | |
| 92 .bar-label .vertical-line { | |
| 93 align-self: center; | |
| 94 background-color: rgb(223, 223, 223); | |
| 95 height: 10px; | |
| 96 width: 1px; | |
| 97 } | |
| 98 | |
| 99 .bar-label span { | |
| 100 font-size: 85%; | |
| 101 } | |
| 102 | |
| 103 .bar-label .wrapper { | |
| 104 text-align: center; | |
| 105 white-space: nowrap; | |
| 106 } | |
| 107 | |
| 108 /* 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. | |
| 110 * 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 | |
| 112 * render the text contents. */ | |
| 113 .end-aligned .wrapper { | |
| 114 direction: rtl; | |
|
michaelpg
2016/10/01 01:41:04
can this not be done with flex display? e.g., just
fukino
2016/10/03 18:40:41
The tricky part is that the label "Available" shou
| |
| 115 } | |
| 116 | |
| 117 :host-context([dir=rtl]) .end-aligned .wrapper { | |
| 118 direction: ltr; | |
| 119 } | |
| 120 | |
| 121 .end-aligned .wrapper span { | |
| 122 direction: initial; | |
| 123 unicode-bidi: embed; | |
| 124 } | |
| 125 </style> | |
| 126 <div class="settings-box first" hidden$="[[!isSpaceLow_(spaceState_)]]"> | |
| 127 <div class="message-area"> | |
| 128 <div class="message-title"> | |
| 129 <iron-icon icon="cr:warning"></iron-icon> | |
| 130 <span>$i18n{storageSpaceLowMessageTitle}</span> | |
| 131 </div> | |
| 132 <p>$i18n{storageSpaceLowMessageLine1}</p> | |
| 133 <p>$i18n{storageSpaceLowMessageLine2}</p> | |
| 134 </div> | |
| 135 </div> | |
| 136 <div class="settings-box first" | |
| 137 hidden$="[[!isSpaceCriticallyLow_(spaceState_)]]"> | |
| 138 <div id="critically-low-message" class="message-area"> | |
|
michaelpg
2016/10/01 01:41:04
nit throughout: use camelCase IDs for consistency
fukino
2016/10/03 18:40:41
Done. Used camelCase for critically-low-message, b
| |
| 139 <div class="message-title"> | |
| 140 <iron-icon icon="cr:warning"></iron-icon> | |
| 141 <span>$i18n{storageSpaceCriticallyLowMessageTitle}</span> | |
| 142 </div> | |
| 143 <p>$i18n{storageSpaceCriticallyLowMessageLine1}</p> | |
| 144 <p>$i18n{storageSpaceCriticallyLowMessageLine2}</p> | |
| 145 </div> | |
| 146 </div> | |
| 147 <div class="settings-box first"> | |
| 148 <div id="bar-area"> | |
| 149 <progress id="bar" class$="[[getBarClass_(spaceState_)]]" | |
| 150 value="[[usedRatio_]]"></progress> | |
| 151 <div id="bar-labels"> | |
| 152 <div id="inUseLabelArea" class="bar-label"> | |
| 153 <div class="vertical-line"></div> | |
| 154 <div class="wrapper"><span>$i18n{storageItemInUse}</span></div> | |
| 155 <div class="wrapper"> | |
| 156 <span id="inUseSize" class="storage-size"></span> | |
| 157 </div> | |
| 158 </div> | |
| 159 <div id="availableLabelArea" class="bar-label end-aligned"> | |
| 160 <div class="vertical-line"></div> | |
| 161 <div class="wrapper"><span>$i18n{storageItemAvailable}</span></div> | |
| 162 <div class="wrapper"> | |
| 163 <span id="availableSize" class="storage-size"></span> | |
| 164 </div> | |
| 165 </div> | |
| 166 </div> | |
| 167 </div> | |
| 168 </div> | |
| 169 <div class="settings-box" on-tap="onDownloadsTap_" actionable> | |
| 170 <div class="start">$i18n{storageItemDownloads}</div> | |
| 171 <div id="downloadsSize" class="storage-size"> | |
| 172 $i18n{storageSizeComputing} | |
| 173 </div> | |
| 174 </div> | |
| 175 <div class="settings-box" on-tap="onDriveCacheTap_" | |
| 176 hidden$="[[!driveEnabled_]]" actionable> | |
| 177 <div class="start">$i18n{storageItemDriveCache}</div> | |
| 178 <div id="driveCacheSize" class="storage-size"> | |
| 179 $i18n{storageSizeComputing} | |
| 180 </div> | |
| 181 </div> | |
| 182 <div class="settings-box" on-tap="onBrowsingDataTap_" actionable> | |
| 183 <div class="start">$i18n{storageItemBrowsingData}</div> | |
| 184 <div id="browsingDataSize" class="storage-size"> | |
| 185 $i18n{storageSizeComputing} | |
| 186 </div> | |
| 187 </div> | |
| 188 <div class="settings-box" on-tap="onAndroidTap_" | |
| 189 hidden$="[[!androidEnabled_]]" actionable> | |
| 190 <div class="start">$i18n{storageItemAndroid}</div> | |
| 191 <div id="androidSize" class="storage-size"> | |
| 192 $i18n{storageSizeComputing} | |
| 193 </div> | |
| 194 </div> | |
| 195 <div class="settings-box" on-tap="onOtherUsersTap_" actionable> | |
| 196 <div class="start">$i18n{storageItemOtherUsers}</div> | |
| 197 <div id="otherUsersSize" class="storage-size"> | |
| 198 $i18n{storageSizeComputing} | |
| 199 </div> | |
| 200 </div> | |
| 201 <settings-drive-cache-dialog id="storageDriveCache"> | |
| 202 </settings-drive-cache-dialog> | |
| 203 </template> | |
| 204 <script src="storage.js"></script> | |
| 205 </dom-module> | |
| OLD | NEW |