MCPcopy Create free account
hub / github.com/ampproject/amphtml / SettingsPanel

Function SettingsPanel

build-system/server/app-index/settings.js:141–171  ·  view source on GitHub ↗
({htmlEnvelopePrefix, jsMode})

Source from the content-addressed store, hash-verified

139`;
140
141const SettingsPanel = ({htmlEnvelopePrefix, jsMode}) => html`
142 <div class="settings-panel" hidden [hidden]="${panelKey} == null">
143 ${AmpState(stateId, {
144 documentModes,
145 [panelStateKey]: null,
146 [htmlEnvelopePrefixStateKey]: htmlEnvelopePrefix,
147 [jsModeStateKey]: jsMode,
148 })}
149 ${SettingsSubpanel({
150 type: 'HTML',
151 children: html`
152 <h4>Select an envelope to serve HTML documents.</h4>
153 ${HtmlEnvelopeSelector({htmlEnvelopePrefix})}
154 `,
155 })}
156 ${SettingsSubpanel({
157 type: 'JS',
158 children: html`
159 <h4>Select the JavaScript binaries to use in served documents.</h4>
160 <form
161 action="/serve_mode_change"
162 action-xhr="/serve_mode_change"
163 target="_blank"
164 id="serve-mode-form"
165 >
166 ${JsModeSelector({jsMode})}
167 </form>
168 `,
169 })}
170 </div>
171`;
172
173module.exports = {
174 SettingsPanel,

Callers 1

SettingsPanelButtonsFunction · 0.85

Calls 5

SettingsSubpanelFunction · 0.85
HtmlEnvelopeSelectorFunction · 0.85
JsModeSelectorFunction · 0.85
htmlFunction · 0.70
AmpStateFunction · 0.70

Tested by

no test coverage detected