mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Add flashing frontend notification
Co-authored-by: andrew.charles.mcmanus@gmail.com <andrew.charles.mcmanus@gmail.com>
This commit is contained in:
parent
59174110ab
commit
390d995f53
@ -284,7 +284,7 @@ class PanelHandler(BaseHandler):
|
||||
|
||||
page_data: t.Dict[str, t.Any] = {
|
||||
# todo: make this actually pull and compare version data
|
||||
"update_available": False,
|
||||
"update_available": self.helper.update_available,
|
||||
"serverTZ": tz,
|
||||
"version_data": self.helper.get_version_string(),
|
||||
"user_data": exec_user,
|
||||
|
@ -92,6 +92,7 @@ class ServerHandler(BaseHandler):
|
||||
template = "public/404.html"
|
||||
|
||||
page_data = {
|
||||
"update_available": self.helper.update_available,
|
||||
"version_data": self.helper.get_version_string(),
|
||||
"user_data": exec_user,
|
||||
"user_role": exec_user_role,
|
||||
|
@ -1,12 +1,27 @@
|
||||
<!-- partial:partials/_footer.html -->
|
||||
<footer class="footer">
|
||||
<div class="container-fluid ">
|
||||
|
||||
<span class="text-muted d-block text-center text-sm-left d-sm-inline-block">{{ translate('footer', 'copyright', data['lang']) }} © 2021 - <span x-data x-text="new Date().getFullYear()"></span> <a href="https://craftycontrol.com/" target="_blank">Crafty Controller</a>. {{ translate('footer', 'allRightsReserved', data['lang']) }}.</span>
|
||||
|
||||
<span class="float-none float-sm-right d-block mt-1 mt-sm-0 text-center">{{ translate('footer', 'version', data['lang']) }}: {{ data['version_data'] }}
|
||||
</span>
|
||||
<span class="text-muted d-block text-center text-sm-left d-sm-inline-block">{{ translate('footer', 'copyright', data['lang']) }} © 2021 - <span x-data x-text="new Date().getFullYear()"></span> <a href="https://craftycontrol.com/" target="_blank">Crafty Controller</a>. {{ translate('footer', 'allRightsReserved', data['lang']) }}.</span>
|
||||
<span class="float-none float-sm-right d-block mt-1 mt-sm-0"> {{ translate('footer', 'version', data['lang']) }}: {{ data['version_data'] }}</span>
|
||||
{% if data['update_available'] %}
|
||||
<span class="float-none float-sm-right d-block mt-1 mt-sm-0"><a class="blink-text" href="https://gitlab.com/crafty-controller/crafty-4/-/releases">Update Available!</a></span>
|
||||
{% end %}
|
||||
</div>
|
||||
|
||||
<style>
|
||||
a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
.blink-text{
|
||||
color: #000;
|
||||
font-weight: bold;
|
||||
font-size: 2rem;
|
||||
animation: blinkingText 2s infinite;
|
||||
}
|
||||
@keyframes blinkingText{
|
||||
0% { color: grey;}
|
||||
50% { color: red;}
|
||||
100% { color: grey;}
|
||||
}
|
||||
</style>
|
||||
</footer>
|
||||
<!-- partial -->
|
||||
|
Loading…
Reference in New Issue
Block a user