summaryrefslogtreecommitdiff
path: root/lib/VNWeb
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2019-11-06 16:11:56 +0100
committerYorhel <git@yorhel.nl>2019-11-10 12:44:55 +0100
commit194d9d43593937d835cca00719a2b0639213ebb3 (patch)
tree18cffaa4032c44f2069e11cc0388990f088cdf77 /lib/VNWeb
parent27b1c8315c58e0f37baad991283e66b92e033a94 (diff)
ulist: Dynamically update releases summary on change
Diffstat (limited to 'lib/VNWeb')
-rw-r--r--lib/VNWeb/User/Lists.pm7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/VNWeb/User/Lists.pm b/lib/VNWeb/User/Lists.pm
index 5e2f8977..1514e72f 100644
--- a/lib/VNWeb/User/Lists.pm
+++ b/lib/VNWeb/User/Lists.pm
@@ -291,10 +291,9 @@ sub vn_ {
label_ for => 'collapse_vid'.$v->{id}, sub {
my $obtained = grep $_->{status} == 2, $v->{rels}->@*;
my $total = $v->{rels}->@*;
- my $txt = sprintf '%d/%d', $obtained, $total;
- if($total && $obtained == $total) { b_ class => 'done', $txt }
- elsif($obtained < $total) { b_ class => 'todo', $txt }
- else { txt_ $txt }
+ b_ id => 'ulist_relsum_'.$v->{id},
+ mkclass(done => $total && $obtained == $total, todo => $obtained < $total, neutral => 1),
+ sprintf '%d/%d', $obtained, $total;
span_ id => 'ulist_noteflag_'.$v->{id}, mkclass(blurred => !$v->{notes}), ' 💬';
if($own) {
my $public = List::Util::any { $labels{$_->{id}} && !$_->{private} } @$labels;