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
|
<style include="cr-shared-style">
.body-1 {
font-size: 14px;
line-height: 20px;
}
.title-1 {
font-size: 16px;
line-height: 24px;
}
.button-image {
margin-inline-end: 8px;
}
.center-content {
display: flex;
justify-content: center;
width: 100%;
}
.space-1 {
height: 8px;
}
.space-2 {
height: 32px;
}
.text-button:not(:focus) {
border: none;
box-shadow: none;
}
.text-button:hover {
background-color: transparent;
}
#buttons cr-button {
margin-inline-start: 8px;
}
#error-message-container {
min-height: 16px;
}
#remembered-device-footnote {
align-items: center;
display: flex;
font-size: 12px;
line-height: 18px;
justify-content: center;
}
#remembered-device-icon {
align-self: flex-start;
flex-shrink: 0;
height: 20px;
padding-inline-end: 16px;
width: 20px;
}
a[href] {
color: var(--color-link-foreground);
text-decoration: none;
}
cr-dialog::part(dialog) {
border-radius: 0;
height: 100%;
width: 100%;
}
cr-dialog [slot=body] {
height: 480px;
}
</style>
<cr-dialog id="dialog">
<div slot="title" class="title-1">$i18n{dialogTitle}</div>
<div slot="body">
<div id="codeInputView">
<div class="body-1">
$i18n{accessCodeMessage}
<a href="$i18n{learnMoreUrl}" target="_blank">$i18n{learnMore}</a>
</div>
<div class="space-2"></div>
<div class="center-content">
<c2c-passcode-input
aria-label="[[inputLabel]]"
disabled="[[!canCast]]"
id="codeInput"
length="6"
value="{{accessCode}}"
></c2c-passcode-input>
</div>
<div class="space-1"></div>
<template is="dom-if" if="[[qrScannerEnabled]]" class="center-content">
<div class="center-content">
<cr-button on-click="switchToQrInput" class="center text-button">
<cr-icon class="button-image" icon="cr:videocam"></cr-icon>
$i18n{useCamera}
</cr-button>
</div>
</template>
</div>
<div id="qrInputView">
<div>Camera input view</div>
</div>
<div id="error-message-container">
<c2c-error-message id="errorMessage"></c2c-error-message>
</div>
<div class="space-1"></div>
<template is="dom-if" if="[[rememberDevices]]">
<div id="remembered-device-footnote">
<cr-icon icon="cr:domain" id="remembered-device-icon"></cr-icon>
<div id="remembered-device-content">
[[managedFootnote]]
</div>
</div>
</template>
</div>
<div slot="button-container" id="buttons">
<template is="dom-if" if="[[!isWin]]">
<cr-button on-click="cancelButtonPressed">
$i18n{cancel}
</cr-button>
</template>
<cr-button id="castButton" on-click="addSinkAndCast" class="action-button"
disabled="[[submitDisabled]]">
$i18n{cast}
</cr-button>
<cr-button id="backButton" on-click="switchToCodeInput"
class="action-button">
$i18n{back}
</cr-button>
<template is="dom-if" if="[[isWin]]">
<cr-button on-click="cancelButtonPressed">
$i18n{cancel}
</cr-button>
</template>
</div>
</cr-dialog>
|