{$layout}

{$var "header"}
	<script src="/servers/certs/datajs" type="text/javascript"></script>
	<script src="/js/sortable.min.js" type="text/javascript"></script>
{$end}

{$template "../settings_menu"}
{$template "/left_menu_with_menu"}

<div class="right-box with-menu">
    <p class="comment">提醒：HTTP/2、证书等信息修改后，可能需要清空浏览器缓存后才能浏览效果。</p>

    <div v-if="httpsConfig.isOn && missingCertServerNames !=null && missingCertServerNames.length > 0" class="ui message warning">
        警告：当前网站绑定的以下域名尚未配置证书，将无法通过HTTPS协议访问：{{missingCertServerNames.join("、")}} 。
    </div>

	<form method="post" class="ui form" data-tea-action="$" data-tea-success="success">
		<input type="hidden" name="serverId" :value="serverId"/>
		<input type="hidden" name="serverType" :value="serverType"/>
		<table class="ui table selectable definition">
			<tr>
				<td class="title">启用HTTPS</td>
				<td>
					<div class="ui checkbox">
						<input type="checkbox" name="isOn" value="1" v-model="httpsConfig.isOn"/>
						<label></label>
					</div>
				</td>
			</tr>
		</table>

		<!-- SSL配置 -->
		<ssl-config-box :v-ssl-policy="httpsConfig.sslPolicy" :v-protocol="'https'" v-show="httpsConfig.isOn" :v-server-id="serverId" :v-support-http3="httpsConfig.supportsHTTP3 && http3FeatureEnabled"></ssl-config-box>

		<submit-btn></submit-btn>
	</form>
</div>