Skip to content

Commit

Permalink
fix(home): fixed new torrent check issue
Browse files Browse the repository at this point in the history
  • Loading branch information
taobataoma committed Jun 24, 2018
1 parent 461ed2d commit ffaa750
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions modules/core/client/controllers/header.client.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,14 @@
ele.css('display', 'block');
if (vm.newTorrentCount > 0) {
ele.addClass('new-torrent');
} else {
ele.removeClass('new-torrent');
}

if (vm.ticketsCount > 0) {
ele.addClass('opened-tickets');
} else {
ele.removeClass('opened-tickets');
}
}
}
Expand All @@ -280,6 +288,8 @@
badgeEle.css('display', 'block');
badgeEle.addClass('badge_info');
badgeEle.html(vm.newTorrentCount);
} else {
badgeEle.css('display', 'none');
}
}
});
Expand All @@ -305,8 +315,16 @@
ele.css('display', 'none');
} else {
ele.css('display', 'block');
if (vm.newTorrentCount > 0) {
ele.addClass('new-torrent');
} else {
ele.removeClass('new-torrent');
}

if (vm.ticketsCount > 0) {
ele.addClass('opened-tickets');
} else {
ele.removeClass('opened-tickets');
}
}
}
Expand All @@ -317,6 +335,8 @@
badgeEle.css('display', 'block');
badgeEle.addClass('badge_danger');
badgeEle.html(vm.ticketsCount);
} else {
badgeEle.css('display', 'none');
}
}
});
Expand Down

0 comments on commit ffaa750

Please sign in to comment.