浏览代码

locked rooms only visible to admins

Akira 9 年之前
父节点
当前提交
65173ef06d
共有 1 个文件被更改,包括 12 次插入0 次删除
  1. 12 0
      app/client/client.js

+ 12 - 0
app/client/client.js

@@ -351,6 +351,18 @@ Template.dashboard.onCreated(function() {
     Session.set("type", undefined);
 });
 
+Template.dashboard.onRendered(function(){
+    Rooms.find().fetch().forEach(function(room){
+        if(room.private === true){
+            $(".station h3").each(function(i, el){
+                if($(el).text() === room.display){
+                    $(el).parent().css("display", "none");
+                }
+            })
+        }
+    })
+})
+
 function executeCommand(command, params){
     if (command === "help" || command === "commands") {
         $('#helpModal').modal('show');