Browse Source

show message when there are no visible messages (fixes #67)

Byron Jones 6 years ago
parent
commit
1a6ce2b837
3 changed files with 15 additions and 0 deletions
  1. 10 0
      web/logbot.js
  2. 0 0
      web/public/static/logbot.min.js
  3. 5 0
      web/templates/channel.html.ep

+ 10 - 0
web/logbot.js

@@ -485,6 +485,16 @@ $(function() {
             }
         });
 
+    // no-event messages
+
+    $(document).on('setting:hide-b', function(e, enabled) {
+        if (enabled) {
+            $('#no-visible-events').show();
+        } else {
+            $('#no-visible-events').hide();
+        }
+    });
+
     // settings dialog
 
     function toggle_setting($setting, name) {

File diff suppressed because it is too large
+ 0 - 0
web/public/static/logbot.min.js


+ 5 - 0
web/templates/channel.html.ep

@@ -22,6 +22,11 @@
     No messages for <%= time_to_datestr($date->epoch) %>.
   </div>
 % }
+% if ($event_count - $bot_event_count == 0) {
+  <div class="notification no-events default-display-none" id="no-visible-events">
+    No visible messages for <%= time_to_datestr($date->epoch) %>.
+  </div>
+% }
 
 </div>
 % end

Some files were not shown because too many files changed in this diff