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;
|
||||
}
|
||||
|
||||
.navbar-logo, .login-logo {
|
||||
.navbar-logo {
|
||||
height: 35px;
|
||||
width: auto;
|
||||
object-fit: contain;
|
||||
max-width: 100%;
|
||||
image-rendering: -webkit-optimize-contrast;
|
||||
image-rendering: crisp-edges;
|
||||
width: 35px;
|
||||
}
|
||||
|
||||
.login-logo {
|
||||
height: 100px;
|
||||
margin: 0 auto 1rem;
|
||||
height: 80px;
|
||||
width: 80px;
|
||||
}
|
||||
|
||||
.nav-link {
|
||||
|
||||
@@ -96,6 +96,7 @@
|
||||
{% with messages = get_flashed_messages(with_categories=true) %}
|
||||
{% if 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">
|
||||
{% if category == 'success' %}
|
||||
<i class="fas fa-check-circle"></i>
|
||||
@@ -109,6 +110,7 @@
|
||||
{{ message }}
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
@@ -121,9 +123,21 @@
|
||||
<script src="{{ url_for('static', filename='js/forms.js') }}"></script>
|
||||
{% block extra_js %}{% endblock %}
|
||||
|
||||
{% if current_user is defined and current_user.is_authenticated %}
|
||||
<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() {
|
||||
fetch('/check_session')
|
||||
.then(response => response.json())
|
||||
@@ -144,7 +158,7 @@
|
||||
checkSession();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
{% endif %}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user