1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263
|
<style include="cr-page-host-style cr-shared-style network-shared
iron-flex cros-color-overrides">
cr-policy-network-indicator-mojo {
margin-inline-end: 10px;
}
.cr-row cr-button + cr-button {
margin-inline-start: 8px;
}
.title {
font-size: 107.69%; /* 14px / 13px */
font-weight: 500;
margin-inline-start: 20px;
}
#networkState[connected] {
color: var(--cros-text-color-positive);
}
#networkState[warning] {
color: var(--cros-text-color-warning);
}
.signin-button {
margin-inline-end: 8px;
padding: 8px 16px 8px 8px;
}
.signin-icon {
background-color: var(--text-color);
margin-inline-end: 4px;
margin-inline-start: 0;
}
#apnRow {
height: var(--cr-section-two-line-min-height);
}
#apnRowSublabel:not([warning]) {
color: var(--cros-text-color-positive);
}
.add-apn-operation {
margin-bottom: 10px;
margin-inline-start: 20px;
}
.add-apn-operation iron-icon {
--iron-icon-fill-color: var(--text-color);
margin-inline-end: 8px;
}
.add-apn-operation[disabled] iron-icon {
--iron-icon-fill-color: var(--disabled);
}
#apnTooltip {
--paper-tooltip-background: var(--cros-tooltip-background-color);
--paper-tooltip-text-color: var(--cros-tooltip-label-color);
text-align: center;
}
#apnButtonTitle {
display: inline-block;
}
</style>
<!-- Title section: Icon + name + connection state. -->
<div id="title" class="cr-row first">
<network-icon
show-technology-badge="[[showTechnologyBadge_]]"
network-state="[[getNetworkState_(managedProperties_)]]">
</network-icon>
<div id="networkName" class="title">
[[getNameText_(managedProperties_)]]
</div>
<div id="networkState" class="title flex"
connected$="[[showConnectedState_(managedProperties_)]]"
warning$="[[showRestrictedConnectivity_(managedProperties_)]]">
[[getStateText_(managedProperties_)]]
</div>
<cr-button class="signin-button" id="signinButton" on-click="onSigninClicked_"
hidden$="[[!showSignin_(managedProperties_)]]"
disabled="[[disableSignin_(managedProperties_, disabled_)]]">
<div class="signin-icon cr-icon icon-external"></div>
$i18n{networkButtonSignin}
</cr-button>
<cr-button on-click="onForgetClicked_"
hidden$="[[!showForget_(managedProperties_)]]"
disabled="[[disabled_]]">
$i18n{networkButtonForget}
</cr-button>
<cr-button id="connectDisconnect"
class="action-button" on-click="onConnectDisconnectClick_"
hidden$="[[!showConnectDisconnect_(managedProperties_)]]"
disabled="[[!enableConnectDisconnect_(managedProperties_, disabled_)]]">
[[getConnectDisconnectText_(managedProperties_)]]
</cr-button>
</div>
<template is="dom-if" if="[[showConfigurableSections_]]" restamp>
<!-- SIM Info (Cellular only). -->
<template is="dom-if" if="[[showCellularSim_(managedProperties_)]]"
restamp>
<div class="cr-row">
<network-siminfo class="flex"
network-state="[[getNetworkState_(managedProperties_)]]"
device-state="[[deviceState_]]"
global-policy="[[globalPolicy_]]"
disabled="[[disabled_]]">
</network-siminfo>
</div>
</template>
<!-- Choose Mobile Network (Cellular only) -->
<template is="dom-if"
if="[[showCellularChooseNetwork_(managedProperties_)]]">
<div class="cr-row">
<network-choose-mobile class="flex" device-state="[[deviceState_]]"
managed-properties="[[managedProperties_]]"
disabled="[[disabled_]]">
</network-choose-mobile>
</div>
</template>
<!-- APN (Cellular only) -->
<template is="dom-if"
if="[[shouldShowApnList_(managedProperties_,
isApnRevampEnabled_)]]">
<div class="cr-row">
<network-apnlist class="flex" editable on-apn-change="onApnChange_"
managed-properties="[[managedProperties_]]"
disabled="[[disabled_]]">
</network-apnlist>
</div>
</template>
<template is="dom-if"
if="[[shouldShowApnSection_(managedProperties_,
isApnRevampEnabled_)]]">
<cr-expand-button id="apnRow" class="settings-box cr-row"
expanded="{{apnExpanded_}}">
<div class="property-box two-line">
<div class="flex layout vertical">
<div id="apnRowTitle">$i18n{internetApnPageTitle}</div>
<div id="apnRowSublabel"
class="cr-secondary-text"
warning$="[[showRestrictedConnectivity_(managedProperties_)]]">
[[getApnRowSublabel_(managedProperties_, apnExpanded_)]]
</div>
</div>
<template is="dom-if" if="[[isApnManaged_(globalPolicy_)]]">
<cr-policy-indicator id="apnManagedIcon"
indicator-type="devicePolicy">
</cr-policy-indicator>
</template>
</div>
</cr-expand-button>
<iron-collapse opened="[[apnExpanded_]]">
<apn-list
id="apnList"
managed-cellular-properties="[[managedProperties_.typeProperties.cellular]]"
guid="[[guid]]"
error-state="[[managedProperties_.errorState]]"
portal-state="[[managedProperties_.portalState]]"
should-disallow-apn-modification="[[isApnManaged_(globalPolicy_)]]"
should-omit-links>
</apn-list>
<div id="apnButtonTitle">
<cr-button id="discoverMoreApnsButton"
on-click="onDiscoverMoreApnsClicked_"
class="add-apn-operation cancel-button"
disabled="[[shouldDisableApnButtons_(isNumCustomApnsLimitReached_,
globalPolicy_)]]">
$i18n{apnPageDiscoverMoreApns}
</cr-button>
<cr-button id="createCustomApnButton"
on-click="onCreateCustomApnClicked_"
class="add-apn-operation cancel-button"
disabled="[[shouldDisableApnButtons_(isNumCustomApnsLimitReached_,
globalPolicy_)]]">
$i18n{apnPageCreateNewApn}
</cr-button>
</div>
<!-- TODO(b/162365553) Add a11y support-->
<template is="dom-if" if="[[isNumCustomApnsLimitReached_]]" restamp>
<paper-tooltip
id="apnTooltip"
for="apnButtonTitle"
position="right">
$i18n{customApnLimitReached}
</paper-tooltip>
</template>
</iron-collapse>
</template>
<!-- Proxy -->
<div class="hr">
<template is="dom-if"
if="[[shouldShowProxyPolicyIndicator_(managedProperties_)]]">
<div class="cr-row continuation">
<cr-policy-network-indicator-mojo
property="[[managedProperties_.proxySettings.type]]">
</cr-policy-network-indicator-mojo>
<div>$i18n{networkProxyEnforcedPolicy}</div>
</div>
</template>
<div class="cr-row continuation">
<network-proxy class="flex" use-shared-proxies
on-proxy-change="onProxyChange_"
managed-properties="[[managedProperties_]]"
editable="[[!disabled_]]">
</network-proxy>
</div>
</div>
<template is="dom-if" if="[[isRememberedOrConnected_(managedProperties_)]]">
<!-- IP Config -->
<div class="cr-row">
<network-ip-config class="flex"
editable on-ip-change="onIpConfigChange_"
managed-properties="[[managedProperties_]]"
disabled="[[disabled_]]">
</network-ip-config>
</div>
<!-- Nameservers -->
<div class="cr-row">
<network-nameservers class="flex" editable
on-nameservers-change="onIpConfigChange_"
managed-properties="[[managedProperties_]]"
disabled="[[disabled_]]">
</network-nameservers>
</div>
</template>
<div class="cr-row">
<!-- MAC Address. -->
<div class="property-box single-column two-line"
id="macAddress"
hidden$="[[!shouldShowMacAddress_(deviceState_.macAddress)]]">
<div>$i18n{OncMacAddress}</div>
<div class="secondary">[[deviceState_.macAddress]]</div>
</div>
</div>
<!-- Other properties to show if present. -->
<template is="dom-if" if="[[hasInfoFields_(managedProperties_)]]">
<div class="cr-row continuation">
<network-property-list-mojo class="flex"
fields="[[getInfoFields_(managedProperties_)]]"
property-dict="[[managedProperties_]]"
disabled="[[disabled_]]">
</network-property-list-mojo>
</div>
</template>
</template>
<template is="dom-if" if="[[isApnRevampEnabled_]]" restamp>
<cr-toast id="errorToast" duration="5000">
<span id="errorToastMessage">[[errorToastMessage_]]</span>
</cr-toast>
</template>
|