Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <link href="chrome://resources/polymer/polymer/polymer.html" rel="import"> | |
| 2 <link href="chrome://resources/polymer/paper-icon-button/paper-icon-button.html" rel="import"> | |
| 3 <link href="chrome://resources/polymer/paper-shadow/paper-shadow.html" rel="impo rt"> | |
| 4 <link href="chrome://resources/polymer/core-tooltip/core-tooltip.html" rel="impo rt"> | |
| 5 <link href="chrome://resources/polymer/core-icon/core-icon.html" rel="import"> | |
| 6 <link href="chrome://resources/polymer/core-icons/device-icons.html" rel="import "> | |
| 7 <link href="chrome://resources/polymer/core-icons/hardware-icons.html" rel="impo rt"> | |
| 8 <link href="chrome://resources/polymer/core-icons/notification-icons.html" rel=" import"> | |
| 9 | |
| 10 <polymer-element name="device-list" attributes="label devices" layout vertical> | |
|
michaelpg
2015/04/28 04:00:49
attributes= is redundant when these appear in the
Tim Song
2015/04/28 19:41:33
Done.
| |
| 11 <template> | |
| 12 <style> | |
| 13 .devices-label { | |
| 14 padding: 10px 22px; | |
|
michaelpg
2015/04/28 04:00:49
alphabetize properties throughout
Tim Song
2015/04/28 19:41:33
Done.
| |
| 15 color: #999; | |
| 16 font-size: 16px; | |
| 17 margin-top: 20px; | |
| 18 } | |
| 19 | |
| 20 paper-shadow { | |
| 21 background-color: #ffffff; | |
| 22 } | |
| 23 | |
| 24 .item { | |
| 25 height: 72px; | |
| 26 border-bottom: 1px solid rgba(0,0,0,0.12); | |
| 27 } | |
| 28 | |
| 29 .name { | |
| 30 margin-right: 0 8px 2px 0; | |
| 31 } | |
| 32 | |
| 33 .public-key { | |
| 34 font-size: 13px; | |
| 35 color: #767676; | |
| 36 overflow: hidden; | |
| 37 text-overflow: ellipsis; | |
| 38 height: 16px; | |
| 39 white-space: nowrap; | |
| 40 width: 300px; | |
| 41 } | |
| 42 | |
| 43 .phone-lock { | |
| 44 width: 16px; | |
| 45 height: 16px; | |
| 46 } | |
| 47 | |
| 48 .end-icon { | |
| 49 margin: 0 14px; | |
| 50 } | |
| 51 | |
| 52 paper-icon-button, core-icon { | |
| 53 opacity: 0.25; | |
| 54 } | |
| 55 | |
| 56 paper-icon-button:hover, core-icon:hover { | |
| 57 opacity: 1; | |
| 58 } | |
| 59 | |
| 60 .ineligibility-icons { | |
| 61 margin: 0 22px; | |
| 62 } | |
| 63 | |
| 64 .ineligibility-icon { | |
| 65 color: orange; | |
| 66 opacity: 0.5; | |
| 67 } | |
| 68 | |
| 69 .hidden { | |
| 70 display: none; | |
| 71 } | |
| 72 | |
| 73 core-tooltip::shadow .core-tooltip { | |
| 74 font-size: 14px; | |
| 75 padding: 8px 16px; | |
| 76 line-height: 18px; | |
| 77 } | |
| 78 </style> | |
| 79 | |
| 80 <div class='devices-label'>{{label}}</div> | |
| 81 | |
| 82 <paper-shadow> | |
| 83 <template repeat='{{device in devices}}'> | |
| 84 <div class='item' layout horizontal center> | |
| 85 <paper-icon-button class='end-icon' | |
| 86 icon='hardware:phonelink{{!device.unlockKey ? "-off" : ""}}'> | |
| 87 </paper-icon-button> | |
| 88 | |
| 89 <div class='info'> | |
| 90 <div layout horizontal> | |
| 91 <span class='name'>{{device.friendlyDeviceName}}</span> | |
| 92 <core-tooltip position='top'> | |
| 93 <core-icon icon='lock-open' | |
| 94 class='phone-lock {{ !device.remoteState ? "hidden" : "" }}'> | |
|
michaelpg
2015/04/28 04:00:49
Instead of the hidden class, why not the hidden at
Tim Song
2015/04/28 19:41:33
hidden="false" doesn't work. The "hidden" attribut
michaelpg
2015/04/29 00:05:28
I'm sorry; the syntax is:
hidden?="{{!device.remo
Tim Song
2015/04/29 18:05:43
Done. Thanks, that's really helpful to know!
| |
| 95 </core-icon> | |
| 96 <div tip> | |
| 97 <div> | |
| 98 User Present: | |
|
michaelpg
2015/04/28 04:00:49
nit: 2 space indent here & below
Tim Song
2015/04/28 19:41:33
Done.
| |
| 99 {{ device.remoteState.userPresent }} | |
| 100 </div> | |
| 101 <div> | |
| 102 Secure Screen Lock: | |
| 103 {{ device.remoteState.secureScreenLock }} | |
| 104 </div> | |
| 105 <div> | |
| 106 Trust Agent: | |
| 107 {{ device.remoteState.trustAgent }} | |
| 108 </div> | |
| 109 </div> | |
| 110 </core-tooltip> | |
| 111 </div> | |
| 112 <div class='public-key'>{{device.publicKey}}</div> | |
| 113 </div> | |
| 114 | |
| 115 <div flex></div> | |
| 116 <paper-icon-button | |
| 117 class='end-icon {{ !device.unlockKey ? "hidden" : "" }}' | |
| 118 icon='{{ getIconForConnection_(device.connectionStatus) }}'> | |
| 119 </paper-icon-button> | |
| 120 | |
| 121 <div class='ineligibility-icons | |
| 122 {{ device.ineligibilityReasons == null ? "hidden" : "" }}'> | |
| 123 <template repeat="{{ reason in device.ineligibilityReasons }}"> | |
| 124 <core-tooltip label='{{prettifyReason_(reason)}}' position=top> | |
|
michaelpg
2015/04/28 04:00:49
double quotes around all attribute values
Tim Song
2015/04/28 19:41:33
Done.
| |
| 125 <core-icon icon="{{ getIconForIneligibilityReason_(reason) }}" | |
| 126 class="ineligibility-icon"> | |
|
michaelpg
2015/04/28 04:00:49
nit: don't align, just indent 4 spaces
Tim Song
2015/04/28 19:41:33
Done.
| |
| 127 </core-icon> | |
| 128 </core-tooltip> | |
| 129 </template> | |
| 130 </div> | |
| 131 </div> | |
| 132 </template> | |
| 133 </paper-shadow> | |
| 134 </template> | |
| 135 <script src="device-list.js"></script> | |
| 136 </polymer-element> | |
| OLD | NEW |