Mercurial > libervia-templates
changeset 408:44439110247f
chat: Add a Data Policy badge:
A badge with data policy score is shown in chat header. It's colored according to the
score (red, yellow or green).
rel 460
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 26 Jun 2025 17:03:51 +0200 |
parents | f45c311710b1 |
children | c2ac3dae1084 |
files | sat_templates/templates/bulma/chat/chat.html |
diffstat | 1 files changed, 14 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/sat_templates/templates/bulma/chat/chat.html Sun Jun 08 17:31:38 2025 +0200 +++ b/sat_templates/templates/bulma/chat/chat.html Thu Jun 26 17:03:51 2025 +0200 @@ -49,8 +49,21 @@ </button> </div> <div class="level-item"> - <h1 class="title is-5 mb-0">{{target_jid}}</h1> + <h1 class="title is-5 mb-0 pt-1">{{target_jid}}</h1> </div> + {% if data_policy is defined and data_policy_score is defined %} + {# Data Policy badge #} + <div class="level-item"> + {% set color_class = + 'success' if data_policy_score >= 8 else + 'warning' if data_policy_score >= 5 else + 'danger' %} + <div class="data-policy-badge tag is-{{ color_class }} is-clickable p-3"> + <span class="icon fa fa-file-shield"></span> + <span class="pt-1">{{ data_policy_score }}</span> + </div> + </div> + {% endif %} </div> <div class="level-right"> <div class="level-item">