[feature] prompt box background cover

This commit is contained in:
zhangtianli2006 2021-03-26 19:43:50 +08:00
parent fb9c81ec3c
commit 0df3539173
3 changed files with 13 additions and 0 deletions

View File

@ -19,6 +19,8 @@
<span class="note">Press Ctrl + Enter to send </span> <span class="note">Press Ctrl + Enter to send </span>
<button class="send-button" onclick="send()">Send</button> <button class="send-button" onclick="send()">Send</button>
</div> </div>
<div id="prompt-background"></div>
<div id="prompt-box" hidden> <div id="prompt-box" hidden>
<div id="prompt-box-title"></div> <div id="prompt-box-title"></div>
<div id="prompt-box-content"> <div id="prompt-box-content">

View File

@ -169,6 +169,7 @@ function open_prompt(title) {
$('#confirm-prompt').one('click', () => { $('#confirm-prompt').one('click', () => {
if (resolve_callback) { if (resolve_callback) {
$('#prompt-box').hide('fast'); $('#prompt-box').hide('fast');
$('#prompt-background').hide();
resolve_callback($('#prompt-data').val()); resolve_callback($('#prompt-data').val());
} }
}); });

View File

@ -166,6 +166,16 @@ pre {
border: #0a84ff 2px solid; border: #0a84ff 2px solid;
} }
#prompt-background {
position: fixed;
top: 0;
right: 0;
height: 100vh;
width: 100vw;
background-color:#38383dCC;
}
#confirm-prompt { #confirm-prompt {
float: right; float: right;
margin-top: 15px; margin-top: 15px;