Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <link rel="import" href="chrome://resources/cr_elements/cr_expand_button/cr_expa nd_button.html"> | 1 <link rel="import" href="chrome://resources/cr_elements/cr_expand_button/cr_expa nd_button.html"> |
| 2 <link rel="import" href="chrome://resources/cr_elements/icons.html"> | 2 <link rel="import" href="chrome://resources/cr_elements/icons.html"> |
| 3 <link rel="import" href="chrome://resources/cr_elements/network/cr_network_icon. html"> | 3 <link rel="import" href="chrome://resources/cr_elements/network/cr_network_icon. html"> |
| 4 <link rel="import" href="chrome://resources/cr_elements/network/cr_onc_types.htm l"> | 4 <link rel="import" href="chrome://resources/cr_elements/network/cr_onc_types.htm l"> |
| 5 <link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_network _behavior.html"> | 5 <link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_network _behavior.html"> |
| 6 <link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_network _indicator.html"> | 6 <link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_network _indicator.html"> |
| 7 <link rel="import" href="chrome://resources/html/i18n_behavior.html"> | 7 <link rel="import" href="chrome://resources/html/i18n_behavior.html"> |
| 8 <link rel="import" href="chrome://resources/html/polymer.html"> | 8 <link rel="import" href="chrome://resources/html/polymer.html"> |
| 9 <link rel="import" href="chrome://resources/polymer/v1_0/iron-collapse/iron-coll apse.html"> | 9 <link rel="import" href="chrome://resources/polymer/v1_0/iron-collapse/iron-coll apse.html"> |
| 10 <link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/classe s/iron-flex-layout.html"> | 10 <link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/classe s/iron-flex-layout.html"> |
| (...skipping 23 matching lines...) Expand all Loading... | |
| 34 } | 34 } |
| 35 | 35 |
| 36 cr-policy-network-indicator { | 36 cr-policy-network-indicator { |
| 37 -webkit-margin-start: 10px; | 37 -webkit-margin-start: 10px; |
| 38 } | 38 } |
| 39 | 39 |
| 40 iron-collapse { | 40 iron-collapse { |
| 41 margin: 10px; | 41 margin: 10px; |
| 42 } | 42 } |
| 43 | 43 |
| 44 .settings-box.embedded { | |
| 45 -webkit-margin-start: 0; | |
| 46 align-items: stretch; | |
| 47 flex-direction: column; | |
| 48 justify-content: center; | |
| 49 padding: 0; | |
| 50 } | |
| 51 | |
| 52 .settings-box.stretch { | |
| 53 align-items: stretch; | |
| 54 } | |
| 55 | |
| 44 .subtitle { | 56 .subtitle { |
| 45 -webkit-margin-start: 20px; | 57 -webkit-margin-start: 20px; |
| 46 font-weight: 500; | 58 font-weight: 500; |
| 47 padding: 20px 0; | 59 padding: 20px 0; |
| 48 } | 60 } |
| 49 | 61 |
| 50 #buttonDiv paper-button { | 62 #buttonDiv paper-button { |
| 51 margin: 10px 0; | 63 margin: 10px 0; |
| 52 } | 64 } |
| 53 | 65 |
| 54 #networkName { | 66 #networkName { |
| 55 /* TODO(stevenjb): Finalize font-size for this and networkState. */ | 67 /* TODO(stevenjb): Finalize font-size for this and networkState. */ |
| 56 font-size: 125%; | 68 font-size: 125%; |
| 57 font-weight: 500; | 69 font-weight: 500; |
| 58 } | 70 } |
| 59 | 71 |
| 60 #networkState { | 72 #networkState { |
| 61 @apply(--settings-secondary); | 73 @apply(--settings-secondary); |
| 62 } | 74 } |
| 63 | 75 |
| 64 #networkState[connected] { | 76 #networkState[connected] { |
| 65 color: var(--google-green-500); | 77 color: var(--google-green-500); |
| 66 } | 78 } |
| 67 | 79 |
| 68 #proxyDiv { | 80 #proxyDiv { |
| 69 max-width: 500px; | 81 max-width: 500px; |
| 70 } | 82 } |
| 71 </style> | 83 </style> |
| 72 <div class="settings-box first single-column"> | 84 <!-- Title section: Icon + name + connection state. --> |
| 73 <!-- Title section: Icon + name + connection state. --> | 85 <div class="settings-box first"> |
| 74 <div class="settings-box embedded"> | 86 <div class="start layout horizontal center"> |
| 75 <div class="start layout horizontal center"> | 87 <cr-network-icon network-state="[[networkProperties]]"> |
| 76 <cr-network-icon network-state="[[networkProperties]]"> | 88 </cr-network-icon> |
| 77 </cr-network-icon> | 89 <div class="layout vertical"> |
| 78 <div class="layout vertical"> | 90 <div id="networkName">[[getStateName_(networkProperties)]]</div> |
| 79 <div id="networkName">[[getStateName_(networkProperties)]]</div> | 91 <div id="networkState" |
| 80 <div id="networkState" | 92 connected$="[[isConnectedState_(networkProperties)]]"> |
| 81 connected$="[[isConnectedState_(networkProperties)]]"> | 93 [[getStateText_(networkProperties)]] |
| 82 [[getStateText_(networkProperties)]] | |
| 83 </div> | |
| 84 </div> | 94 </div> |
| 85 </div> | 95 </div> |
| 86 <div id="buttonDiv" class="layout horizontal center"> | |
| 87 <paper-button class="secondary-button" on-tap="onForgetTap_" | |
| 88 hidden$="[[!showForget_(networkProperties)]]"> | |
| 89 $i18n{networkButtonForget} | |
| 90 </paper-button> | |
| 91 <paper-button class="secondary-button" on-tap="onViewAccountTap_" | |
| 92 hidden$="[[!showViewAccount_(networkProperties)]]"> | |
| 93 $i18n{networkButtonViewAccount} | |
| 94 </paper-button> | |
| 95 <paper-button class="secondary-button" on-tap="onActivateTap_" | |
| 96 hidden$="[[!showActivate_(networkProperties)]]"> | |
| 97 $i18n{networkButtonActivate} | |
| 98 </paper-button> | |
| 99 <paper-button class="secondary-button" on-tap="onConfigureTap_" | |
| 100 hidden$="[[!showConfigure_(networkProperties)]]"> | |
| 101 $i18n{networkButtonConfigure} | |
| 102 </paper-button> | |
| 103 <paper-button class="primary-button" on-tap="onConnectTap_" | |
| 104 hidden$="[[!showConnect_(networkProperties)]]" | |
| 105 disabled="[[!enableConnect_(networkProperties, defaultNetwork)]]"> | |
| 106 $i18n{networkButtonConnect} | |
| 107 </paper-button> | |
| 108 <paper-button class="primary-button" on-tap="onDisconnectTap_" | |
| 109 hidden$="[[!showDisconnect_(networkProperties)]]"> | |
| 110 $i18n{networkButtonDisconnect} | |
| 111 </paper-button> | |
| 112 </div> | |
| 113 </div> | 96 </div> |
| 114 <!-- Shared. --> | 97 <div id="buttonDiv" class="layout horizontal center"> |
| 115 <div class="settings-box embedded" | 98 <paper-button class="secondary-button" on-tap="onForgetTap_" |
| 116 hidden$="[[!showShared_(networkProperties)]]"> | 99 hidden$="[[!showForget_(networkProperties)]]"> |
| 117 $i18n{networkShared} | 100 $i18n{networkButtonForget} |
| 101 </paper-button> | |
| 102 <paper-button class="secondary-button" on-tap="onViewAccountTap_" | |
| 103 hidden$="[[!showViewAccount_(networkProperties)]]"> | |
| 104 $i18n{networkButtonViewAccount} | |
| 105 </paper-button> | |
| 106 <paper-button class="secondary-button" on-tap="onActivateTap_" | |
| 107 hidden$="[[!showActivate_(networkProperties)]]"> | |
| 108 $i18n{networkButtonActivate} | |
| 109 </paper-button> | |
| 110 <paper-button class="secondary-button" on-tap="onConfigureTap_" | |
| 111 hidden$="[[!showConfigure_(networkProperties)]]"> | |
| 112 $i18n{networkButtonConfigure} | |
| 113 </paper-button> | |
| 114 <paper-button class="primary-button" on-tap="onConnectTap_" | |
| 115 hidden$="[[!showConnect_(networkProperties)]]" | |
| 116 disabled="[[!enableConnect_(networkProperties, defaultNetwork)]]"> | |
| 117 $i18n{networkButtonConnect} | |
| 118 </paper-button> | |
| 119 <paper-button class="primary-button" on-tap="onDisconnectTap_" | |
| 120 hidden$="[[!showDisconnect_(networkProperties)]]"> | |
| 121 $i18n{networkButtonDisconnect} | |
| 122 </paper-button> | |
| 118 </div> | 123 </div> |
| 124 </div> | |
| 125 | |
| 126 <!-- Shared. --> | |
| 127 <div class="settings-box continuation" | |
| 128 hidden$="[[!showShared_(networkProperties)]]"> | |
| 129 $i18n{networkShared} | |
| 130 </div> | |
| 131 <!-- Top level properties --> | |
| 132 <div class="settings-box continuation embedded"> | |
| 119 <!-- Prefer this network. --> | 133 <!-- Prefer this network. --> |
| 120 <div class="settings-box embedded" | 134 <div class="settings-box" |
| 121 hidden$="[[!showPreferNetwork_(networkProperties)]]"> | 135 hidden$="[[!showPreferNetwork_(networkProperties)]]"> |
| 122 <paper-checkbox checked="{{preferNetwork_}}" | 136 <paper-checkbox checked="{{preferNetwork_}}" |
| 123 disabled="[[isNetworkPolicyEnforced(networkProperties.Priority)]]"> | 137 disabled="[[isNetworkPolicyEnforced(networkProperties.Pr iority)]]"> |
|
dschuyler
2016/09/01 20:45:13
nit: wrap line or indent less.
stevenjb
2016/09/02 17:07:58
Aha! My editor was doing this and I did some more
| |
| 124 $i18n{networkPrefer} | 138 $i18n{networkPrefer} |
| 125 </paper-checkbox> | 139 </paper-checkbox> |
| 126 <cr-policy-network-indicator property="[[networkProperties.Priority]]"> | 140 <cr-policy-network-indicator property="[[networkProperties.Priority]]"> |
| 127 </cr-policy-network-indicator> | 141 </cr-policy-network-indicator> |
| 128 </div> | 142 </div> |
| 129 <!-- Autoconnect. --> | 143 <!-- Autoconnect. --> |
| 130 <div class="settings-box embedded" | 144 <div class="settings-box" |
| 131 hidden$="[[!showAutoConnect_(networkProperties)]]"> | 145 hidden$="[[!showAutoConnect_(networkProperties)]]"> |
| 132 <paper-checkbox checked="{{autoConnect_}}"> | 146 <paper-checkbox checked="{{autoConnect_}}"> |
| 133 $i18n{networkAutoConnect} | 147 $i18n{networkAutoConnect} |
| 134 </paper-checkbox> | 148 </paper-checkbox> |
| 135 <cr-policy-network-indicator | 149 <cr-policy-network-indicator |
| 136 property="[[getManagedAutoConnect_(networkProperties)]]"> | 150 property="[[getManagedAutoConnect_(networkProperties)]]"> |
| 137 </cr-policy-network-indicator> | 151 </cr-policy-network-indicator> |
| 138 </div> | 152 </div> |
| 153 <!-- SIM Info (Cellular only). --> | |
| 154 <div class="settings-box single-column stretch"> | |
| 155 <network-siminfo | |
| 156 editable on-siminfo-change="onNetworkPropertyChange_" | |
| 157 hidden$="[[!showCellularSim_(networkProperties)]]" | |
| 158 network-properties="[[networkProperties]]" | |
| 159 networking-private="[[networkingPrivate]]"> | |
| 160 </network-siminfo> | |
| 161 </div> | |
| 162 <!-- IP Address. --> | |
| 163 <div class="settings-box two-line single-column stretch" | |
| 164 hidden$="[[!IPAddress_]]"> | |
| 165 <div>$i18n{networkIPAddress}</div> | |
| 166 <div class="secondary">[[IPAddress_]]</div> | |
| 167 </div> | |
| 168 <!-- Properties to always show if present. --> | |
| 169 <network-property-list hidden$="[[!hasInfoFields_(networkProperties)]]" | |
| 170 fields="[[getInfoFields_(networkProperties)]]" | |
| 171 property-dict="[[networkProperties]]"> | |
| 172 </network-property-list> | |
| 139 </div> | 173 </div> |
| 140 | 174 |
| 141 <!-- SIM Info (Cellular only). --> | |
| 142 <network-siminfo | |
| 143 editable on-siminfo-change="onNetworkPropertyChange_" | |
| 144 hidden$="[[!showCellularSim_(networkProperties)]]" | |
| 145 network-properties="[[networkProperties]]" | |
| 146 networking-private="[[networkingPrivate]]"> | |
| 147 </network-siminfo> | |
| 148 | |
| 149 <!-- IP Address. --> | |
| 150 <div class="settings-box two-line single-column" hidden$="[[!IPAddress_]]"> | |
| 151 <div>$i18n{networkIPAddress}</div> | |
| 152 <div class="secondary">[[IPAddress_]]</div> | |
| 153 </div> | |
| 154 | |
| 155 <!-- Properties to always show if present. --> | |
| 156 <network-property-list hidden$="[[!hasInfoFields_(networkProperties)]]" | |
| 157 fields="[[getInfoFields_(networkProperties)]]" | |
| 158 property-dict="[[networkProperties]]"> | |
| 159 </network-property-list> | |
| 160 | |
| 161 <!-- Advanced toggle. --> | 175 <!-- Advanced toggle. --> |
| 162 <div class="settings-box" actionable on-tap="toggleAdvancedExpanded_" | 176 <div class="settings-box" actionable on-tap="toggleAdvancedExpanded_" |
| 163 hidden$="[[!hasAdvancedOrDeviceFields_(networkProperties)]]"> | 177 hidden$="[[!hasAdvancedOrDeviceFields_(networkProperties)]]"> |
| 164 <div class="start">$i18n{networkSectionAdvanced}</div> | 178 <div class="start">$i18n{networkSectionAdvanced}</div> |
| 165 <cr-expand-button id="expandButton" expanded="{{advancedExpanded_}}"> | 179 <cr-expand-button id="expandButton" expanded="{{advancedExpanded_}}"> |
| 166 </cr-expand-button> | 180 </cr-expand-button> |
| 167 </div> | 181 </div> |
| 168 | 182 |
| 169 <!-- Advanced section --> | 183 <!-- Advanced section --> |
| 170 <iron-collapse opened="[[advancedExpanded_]]"> | 184 <iron-collapse opened="[[advancedExpanded_]]"> |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 212 <div class="subtitle">$i18n{networkSectionProxy}</div> | 226 <div class="subtitle">$i18n{networkSectionProxy}</div> |
| 213 <network-proxy editable on-proxy-change="onProxyChange_" | 227 <network-proxy editable on-proxy-change="onProxyChange_" |
| 214 network-properties="[[networkProperties]]"> | 228 network-properties="[[networkProperties]]"> |
| 215 </network-proxy> | 229 </network-proxy> |
| 216 </div> | 230 </div> |
| 217 </div> | 231 </div> |
| 218 </iron-collapse> | 232 </iron-collapse> |
| 219 </template> | 233 </template> |
| 220 <script src="internet_detail_page.js"></script> | 234 <script src="internet_detail_page.js"></script> |
| 221 </dom-module> | 235 </dom-module> |
| OLD | NEW |