Procházet zdrojové kódy

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

Remove download logs link
master
yanas před 9 roky
rodič
revize
e7cbacf9a2
7 změnil soubory, kde provedl 24 přidání a 29 odebrání
  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 Zobrazit soubor

@@ -711,6 +711,30 @@ export default {
711 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 739
      * Exposes a Command(s) API on this instance. It is necessitated by (1) the
716 740
      * desire to keep room private to this instance and (2) the need of other

+ 0
- 9
css/_base.scss Zobrazit soubor

@@ -81,15 +81,6 @@ form {
81 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 84
 .active {
94 85
     background-color: #00ccff;
95 86
 }

+ 0
- 6
css/_font-awesome.scss Zobrazit soubor

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

+ 0
- 3
css/_font.scss Zobrazit soubor

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

+ 0
- 1
index.html Zobrazit soubor

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

+ 0
- 1
lang/main.json Zobrazit soubor

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

+ 0
- 9
modules/UI/UI.js Zobrazit soubor

@@ -486,17 +486,8 @@ UI.start = function () {
486 486
             $('#noticeText').text(config.noticeMessage);
487 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 489
     } else {
498 490
         $("#mainToolbarContainer").css("display", "none");
499
-        $("#downloadlog").css("display", "none");
500 491
         FilmStrip.setupFilmStripOnly();
501 492
         messageHandler.enableNotifications(false);
502 493
         JitsiPopover.enabled = false;

Načítá se…
Zrušit
Uložit