added a loading indicator in the menu when sending a prompt
This commit is contained in:
parent
7e3a2dca83
commit
bc341ec188
3 changed files with 7 additions and 0 deletions
|
|
@ -46,6 +46,10 @@ body {
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#mzta_sending_prompt{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
.mzta_autocomplete-item {
|
.mzta_autocomplete-item {
|
||||||
padding: 4px;
|
padding: 4px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@
|
||||||
<body>
|
<body>
|
||||||
<div id="mzta_search_banner">
|
<div id="mzta_search_banner">
|
||||||
<div id="_spacer_div"> </div>
|
<div id="_spacer_div"> </div>
|
||||||
|
<div id="mzta_sending_prompt"><img src="mzta-loading.svg" title="__MSG_SendingPrompt__"></div>
|
||||||
<input type="text" id="mzta_search_input" placeholder="__MSG_SearchPrompt__">
|
<input type="text" id="mzta_search_input" placeholder="__MSG_SearchPrompt__">
|
||||||
<div id="mzta_autocomplete-items-loading"><img src="mzta-loading.svg" title="__MSG_Loading__"></div>
|
<div id="mzta_autocomplete-items-loading"><img src="mzta-loading.svg" title="__MSG_Loading__"></div>
|
||||||
<div id="mzta_autocomplete-items" style="display: none;"></div>
|
<div id="mzta_autocomplete-items" style="display: none;"></div>
|
||||||
|
|
|
||||||
|
|
@ -228,6 +228,8 @@ document.body.insertBefore(banner, document.body.firstChild);
|
||||||
|
|
||||||
function sendPrompt(prompt_id, tabId){
|
function sendPrompt(prompt_id, tabId){
|
||||||
taLog.log("sendPrompt: " + prompt_id);
|
taLog.log("sendPrompt: " + prompt_id);
|
||||||
|
document.getElementById('mzta_search_input').style.display = 'none';
|
||||||
|
document.getElementById('mzta_sending_prompt').style.display = 'block';
|
||||||
browser.runtime.sendMessage({command: "shortcut_do_prompt", tabId: tabId, promptId: prompt_id});
|
browser.runtime.sendMessage({command: "shortcut_do_prompt", tabId: tabId, promptId: prompt_id});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue