liquid_feedback_frontend
changeset 1854:220653575083
Show token weight correctly
author | bsw |
---|---|
date | Tue Mar 22 13:55:02 2022 +0100 (2022-03-22) |
parents | 9c298b5832e7 |
children | 080f4112b8a9 |
files | app/main/delegation/_info.lua |
line diff
1.1 --- a/app/main/delegation/_info.lua Tue Mar 22 13:52:26 2022 +0100 1.2 +++ b/app/main/delegation/_info.lua Tue Mar 22 13:55:02 2022 +0100 1.3 @@ -233,9 +233,13 @@ 1.4 local own_weight = privilege and privilege.weight or 0 1.5 1.6 if not issue.closed and info.own_participation and info.weight and info.weight > own_weight then 1.7 + local weight = info.weight - own_weight 1.8 + if config.token and config.token.unit_id == issue.area.unit_id then 1.9 + weight = weight / 100 .. " " .. config.token.token_name 1.10 + end 1.11 slot.put(" ") 1.12 ui.link { 1.13 - attr = { class = "right" }, content = "+" .. (info.weight - own_weight), 1.14 + attr = { class = "right" }, content = "+" .. weight, 1.15 module = "interest", view = "show_incoming", params = { 1.16 issue_id = issue.id, member_id = member.id 1.17 }