better UI feedback for prompt msg
This commit is contained in:
parent
11e5970955
commit
a52a9e56e0
@ -3161,10 +3161,30 @@ function updateCryptoPorftolio() {
|
||||
|
||||
|
||||
// SAVE FEATURES TO DISPLAY PROMPT FUNCTIONS
|
||||
var savePromptTimeout;
|
||||
var isSavePromptRunning = false;
|
||||
function displaySavePrompt() {
|
||||
// Check if the function is already running
|
||||
if (isSavePromptRunning) {
|
||||
return;
|
||||
}
|
||||
isSavePromptRunning = true;
|
||||
document.getElementById('save-prompt-message').style.display = "block";
|
||||
var savePrompt = document.getElementById('save-prompt-p');
|
||||
// Store the original color
|
||||
var originalColor = savePrompt.style.color;
|
||||
// Set the new color for the transition effect
|
||||
savePrompt.style.color = "yellow";
|
||||
// Clear any existing timeout
|
||||
clearTimeout(savePromptTimeout);
|
||||
// Add a delay before reverting back to the original color
|
||||
savePromptTimeout = setTimeout(function() {
|
||||
savePrompt.style.color = originalColor;
|
||||
isSavePromptRunning = false;
|
||||
},300); // 0.3 seconds
|
||||
}
|
||||
|
||||
|
||||
function closeSavePrompt() {
|
||||
document.getElementById('save-prompt-message').style.display = "none";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user