31 lines
904 B
HTML
31 lines
904 B
HTML
<html>
|
|
<head>
|
|
<style>body {font-family: sans-serif;} button {float:right; margin-left: 10px;} label { display: block; margin-bottom: 5px; width: 100%; } input {margin-bottom: 10px; padding: 5px; width: 100%; display:block;}</style>
|
|
<script>
|
|
document.addEventListener("DOMContentLoaded" () => {
|
|
document.querySelector("#cancel").addEventListener("click", (e) => {
|
|
debugger
|
|
e.preventDefault()
|
|
e.stopPropagation()
|
|
window.close()
|
|
})
|
|
document.querySelector("form").addEventListener("submit", (e) => {
|
|
e.preventDefault()
|
|
e.stopPropagation()
|
|
debugger
|
|
window.electronAPI.send('prompt-response', document.querySelector("#val").value)
|
|
window.close()
|
|
})
|
|
})
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<form>
|
|
<label for="val">${arg.title}</label>
|
|
<input id="val" value="${arg.val}" autofocus />
|
|
<button id='ok'>OK</button>
|
|
<button id='cancel'>Cancel</button>
|
|
</form>
|
|
</body>
|
|
</html>
|