configui/templates/components/kconfig.tmpl

42 lines
1.1 KiB
Cheetah

{{define "components/kconfig"}}
<div class="modal" id="kconfig">
<div class="modal-background"></div>
<div class="modal-card">
<header class="modal-card-head">
<p class="modal-card-title">{{.AppName}} Config</p>
<button class="delete" aria-label="close" onclick="KconfigViewTog()"></button>
</header>
<section class="modal-card-body">
<iframe src="{{.BaseUrl}}kconfig/" style="border:none;width:100%;height:80vh;"></iframe>
</section>
<footer class="modal-card-foot">
<div class="level">
<div class="level-left"></div>
<div class="level-left">
<button class="button" onclick="KconfigViewTog()">OK</button>
</div>
</div>
</footer>
</div>
</div>
<script>
document.addEventListener('keydown', function (e) {
if (e.key === "Escape"){
let el = document.getElementById('kconfig')
el.classList.remove('is-active')
}
})
function KSubmit(){
window.location.reload();
window.ContentChanged = false
}
function KconfigViewTog(){
let el = document.getElementById('kconfig')
el.classList.toggle('is-active')
}
</script>
{{end}}