浏览代码

Merge pull request #912 from jitsi/remove-download-logs-link

Remove download logs link
master
yanas 9 年前
父节点
当前提交
e7cbacf9a2
共有 7 个文件被更改,包括 24 次插入29 次删除
  1. 24
    0
      conference.js
  2. 0
    9
      css/_base.scss
  3. 0
    6
      css/_font-awesome.scss
  4. 0
    3
      css/_font.scss
  5. 0
    1
      index.html
  6. 0
    1
      lang/main.json
  7. 0
    9
      modules/UI/UI.js

+ 24
- 0
conference.js 查看文件

711
         return room.getLogs();
711
         return room.getLogs();
712
     },
712
     },
713
 
713
 
714
+    /**
715
+     * Download logs, a function that can be called from console while
716
+     * debugging.
717
+     * @param filename (optional) specify target filename
718
+     */
719
+    saveLogs (filename = 'meetlog.json') {
720
+        // this can be called from console and will not have reference to this
721
+        // that's why we reference the global var
722
+        let logs = APP.conference.getLogs();
723
+        let data = encodeURIComponent(JSON.stringify(logs, null, '  '));
724
+
725
+        let elem = document.createElement('a');
726
+
727
+        elem.download = filename;
728
+        elem.href = 'data:application/json;charset=utf-8,\n' + data;
729
+        elem.dataset.downloadurl
730
+            = ['text/json', elem.download, elem.href].join(':');
731
+        elem.dispatchEvent(new MouseEvent('click', {
732
+            view: window,
733
+            bubbles: true,
734
+            cancelable: false
735
+        }));
736
+    },
737
+
714
     /**
738
     /**
715
      * Exposes a Command(s) API on this instance. It is necessitated by (1) the
739
      * Exposes a Command(s) API on this instance. It is necessitated by (1) the
716
      * desire to keep room private to this instance and (2) the need of other
740
      * desire to keep room private to this instance and (2) the need of other

+ 0
- 9
css/_base.scss 查看文件

81
     display: block;
81
     display: block;
82
 }
82
 }
83
 
83
 
84
-#downloadlog {
85
-    display: none;
86
-    position: absolute;
87
-    bottom: 5;
88
-    left: 5;
89
-    overflow: visible;
90
-    color: rgba(255,255,255,.50);
91
-}
92
-
93
 .active {
84
 .active {
94
     background-color: #00ccff;
85
     background-color: #00ccff;
95
 }
86
 }

+ 0
- 6
css/_font-awesome.scss 查看文件

255
 .fa-road:before {
255
 .fa-road:before {
256
   content: "\f018";
256
   content: "\f018";
257
 }
257
 }
258
-.fa-download:before {
259
-  content: "\f019";
260
-}
261
 .fa-arrow-circle-o-down:before {
258
 .fa-arrow-circle-o-down:before {
262
   content: "\f01a";
259
   content: "\f01a";
263
 }
260
 }
842
 .fa-exchange:before {
839
 .fa-exchange:before {
843
   content: "\f0ec";
840
   content: "\f0ec";
844
 }
841
 }
845
-.fa-cloud-download:before {
846
-  content: "\f0ed";
847
-}
848
 .fa-cloud-upload:before {
842
 .fa-cloud-upload:before {
849
   content: "\f0ee";
843
   content: "\f0ee";
850
 }
844
 }

+ 0
- 3
css/_font.scss 查看文件

42
 .icon-chat:before {
42
 .icon-chat:before {
43
   content: "\e906";
43
   content: "\e906";
44
 }
44
 }
45
-.icon-download:before {
46
-  content: "\e902";
47
-}
48
 .icon-edit:before {
45
 .icon-edit:before {
49
   content: "\e907";
46
   content: "\e907";
50
 }
47
 }

+ 0
- 1
index.html 查看文件

212
                         <input type="checkbox" id="followMeCheckBox">
212
                         <input type="checkbox" id="followMeCheckBox">
213
                         <label class="followMeLabel" for="followMeCheckBox" data-i18n="settings.followMe"></label>
213
                         <label class="followMeLabel" for="followMeCheckBox" data-i18n="settings.followMe"></label>
214
                     </div>
214
                     </div>
215
-                    <a id="downloadlog" data-container="body"><i class="icon-download"></i></a>
216
                 </div>
215
                 </div>
217
             </div>
216
             </div>
218
         </div>
217
         </div>

+ 0
- 1
lang/main.json 查看文件

2
     "contactlist": "On Call (__participants__)",
2
     "contactlist": "On Call (__participants__)",
3
     "connectionsettings": "Connection Settings",
3
     "connectionsettings": "Connection Settings",
4
     "poweredby": "powered by",
4
     "poweredby": "powered by",
5
-    "downloadlogs": "Download logs",
6
     "feedback": "Give us your feedback",
5
     "feedback": "Give us your feedback",
7
     "roomUrlDefaultMsg": "Your conference is currently being created...",
6
     "roomUrlDefaultMsg": "Your conference is currently being created...",
8
     "me": "me",
7
     "me": "me",

+ 0
- 9
modules/UI/UI.js 查看文件

486
             $('#noticeText').text(config.noticeMessage);
486
             $('#noticeText').text(config.noticeMessage);
487
             $('#notice').css({display: 'block'});
487
             $('#notice').css({display: 'block'});
488
         }
488
         }
489
-        $("#downloadlog").click(function (event) {
490
-            let logs = APP.conference.getLogs();
491
-            let data = encodeURIComponent(JSON.stringify(logs, null, '  '));
492
-
493
-            let elem = event.target.parentNode;
494
-            elem.download = 'meetlog.json';
495
-            elem.href = 'data:application/json;charset=utf-8,\n' + data;
496
-        });
497
     } else {
489
     } else {
498
         $("#mainToolbarContainer").css("display", "none");
490
         $("#mainToolbarContainer").css("display", "none");
499
-        $("#downloadlog").css("display", "none");
500
         FilmStrip.setupFilmStripOnly();
491
         FilmStrip.setupFilmStripOnly();
501
         messageHandler.enableNotifications(false);
492
         messageHandler.enableNotifications(false);
502
         JitsiPopover.enabled = false;
493
         JitsiPopover.enabled = false;

正在加载...
取消
保存