mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-23 23:48:56 +01:00
Add a notification banner to show temporary messages
This commit is contained in:
parent
5ff9df9d4c
commit
aa23da60a3
2 changed files with 26 additions and 1 deletions
|
@ -296,6 +296,20 @@
|
||||||
height: 32px;
|
height: 32px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
div#notification-banner {
|
||||||
|
background-color: var(--primary);
|
||||||
|
border: 1px solid var(--primary-hover);
|
||||||
|
padding: 8px;
|
||||||
|
box-shadow: 0px 1px 3px 0px rgba(0,0,0,0.1),0px 1px 2px -1px rgba(0,0,0,0.8);
|
||||||
|
}
|
||||||
|
|
||||||
|
div#notification-banner-parent {
|
||||||
|
position: fixed;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
margin: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
select#search-models,
|
select#search-models,
|
||||||
select#chat-models {
|
select#chat-models {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
|
|
|
@ -150,7 +150,7 @@
|
||||||
<div class="card-title-row">
|
<div class="card-title-row">
|
||||||
<img class="card-icon" src="/static/assets/icons/matrix_blob.svg" alt="Chat">
|
<img class="card-icon" src="/static/assets/icons/matrix_blob.svg" alt="Chat">
|
||||||
<h3 class="card-title">
|
<h3 class="card-title">
|
||||||
Text Model
|
Language
|
||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-description-row">
|
<div class="card-description-row">
|
||||||
|
@ -259,6 +259,10 @@
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="section"></div>
|
<div class="section"></div>
|
||||||
|
</div>
|
||||||
|
<div class="section" id="notification-banner-parent">
|
||||||
|
<div id="notification-banner"></div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
@ -307,6 +311,13 @@
|
||||||
saveSearchModelButton.innerHTML = "Error";
|
saveSearchModelButton.innerHTML = "Error";
|
||||||
saveSearchModelButton.disabled = false;
|
saveSearchModelButton.disabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let notificationBanner = document.getElementById("notification-banner");
|
||||||
|
notificationBanner.innerHTML = "When updating the search model, be sure to delete all your data and reindex.";
|
||||||
|
notificationBanner.style.display = "block";
|
||||||
|
setTimeout(function() {
|
||||||
|
notificationBanner.style.display = "none";
|
||||||
|
}, 5000);
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue