Skip to content

Commit

Permalink
TS-86: Added system messages displaying
Browse files Browse the repository at this point in the history
  • Loading branch information
DenVilk committed Dec 15, 2024
1 parent da4bd83 commit 986ec45
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
47 changes: 47 additions & 0 deletions source/web/static/css/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -350,3 +350,50 @@ button{
margin: 15px 0;
}

.system-messages{
position: absolute;
bottom: 0;
right: 0;
list-style-type: none;
padding: 0;
margin: 0;
margin-right: 20px;
}

.system-messages > li{
border: 1px solid black;
background-color: var(--color-gray);
color: black;
border-radius: 7px;
min-width: 400px;
min-height: 20px;
padding: 15px;
margin: 5px 0;
}

.system-messages>li[type='warning']{
color: #ffda6a;
background: #332701e0;
border-color: #997404;

}
.system-messages>li[type='error']{
color: #ea868f;
background: #2c0b0ee0;
border-color: #842029;
}
.system-messages>li[type='info']{
color: #6ea8fe;
background: #031633e0;
border-color: #084298;
}
.system-messages>li[type='success']{
color: #75b798;
background: #051b11e0;
border-color: #0f5132;
}
.system-messages>li[type='debug']{
color: #f8f9fa;
background: #343a40e0;
border-color: #495057;
}
9 changes: 9 additions & 0 deletions source/web/templates/wrapper.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,15 @@ <h1 class="active-text">{% trans "SysName" %}</h1>
<main>
{% block content %}{% endblock %}
</main>
{% if messages %}
<ul class="system-messages">
{% for message in messages %}
<li type="{{message.tags}}">
{{ message }}
</li>
{% endfor %}
</ul>
{% endif %}
{% include "includes/footer.html" %}
<script src="{% static 'js/main.js' %}"></script>
<script
Expand Down

0 comments on commit 986ec45

Please sign in to comment.