fix: correções no logo, remoção de mensagem de login e auto-dismiss de alertas
This commit is contained in:
@@ -39,18 +39,14 @@ body {
|
|||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar-logo, .login-logo {
|
.navbar-logo {
|
||||||
height: 35px;
|
height: 35px;
|
||||||
width: auto;
|
width: 35px;
|
||||||
object-fit: contain;
|
|
||||||
max-width: 100%;
|
|
||||||
image-rendering: -webkit-optimize-contrast;
|
|
||||||
image-rendering: crisp-edges;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-logo {
|
.login-logo {
|
||||||
height: 100px;
|
height: 80px;
|
||||||
margin: 0 auto 1rem;
|
width: 80px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-link {
|
.nav-link {
|
||||||
|
|||||||
@@ -96,6 +96,7 @@
|
|||||||
{% with messages = get_flashed_messages(with_categories=true) %}
|
{% with messages = get_flashed_messages(with_categories=true) %}
|
||||||
{% if messages %}
|
{% if messages %}
|
||||||
{% for category, message in messages %}
|
{% for category, message in messages %}
|
||||||
|
{% if not (category == 'success' and message == 'Login realizado com sucesso!') %}
|
||||||
<div class="alert alert-{{ category }} alert-dismissible fade show" role="alert">
|
<div class="alert alert-{{ category }} alert-dismissible fade show" role="alert">
|
||||||
{% if category == 'success' %}
|
{% if category == 'success' %}
|
||||||
<i class="fas fa-check-circle"></i>
|
<i class="fas fa-check-circle"></i>
|
||||||
@@ -109,6 +110,7 @@
|
|||||||
{{ message }}
|
{{ message }}
|
||||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
@@ -121,9 +123,21 @@
|
|||||||
<script src="{{ url_for('static', filename='js/forms.js') }}"></script>
|
<script src="{{ url_for('static', filename='js/forms.js') }}"></script>
|
||||||
{% block extra_js %}{% endblock %}
|
{% block extra_js %}{% endblock %}
|
||||||
|
|
||||||
{% if current_user is defined and current_user.is_authenticated %}
|
|
||||||
<script>
|
<script>
|
||||||
// Verificar status da sessão a cada 5 minutos
|
// Auto-dismiss para alertas após 5 segundos
|
||||||
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
|
const alerts = document.querySelectorAll('.alert');
|
||||||
|
alerts.forEach(function(alert) {
|
||||||
|
setTimeout(function() {
|
||||||
|
if (alert) {
|
||||||
|
bootstrap.Alert.getOrCreateInstance(alert).close();
|
||||||
|
}
|
||||||
|
}, 5000);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
{% if current_user is defined and current_user.is_authenticated %}
|
||||||
|
// Verificar a sessão a cada 5 minutos
|
||||||
function checkSession() {
|
function checkSession() {
|
||||||
fetch('/check_session')
|
fetch('/check_session')
|
||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
@@ -144,7 +158,7 @@
|
|||||||
checkSession();
|
checkSession();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
{% endif %}
|
||||||
</script>
|
</script>
|
||||||
{% endif %}
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
Reference in New Issue
Block a user