소스 검색

Add troubleshooting dialog to options menu (#869)

Lennart Grahl 6 년 전
부모
커밋
d66c684fc5
2개의 변경된 파일21개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      src/partials/messenger.navigation.html
  2. 15 0
      src/partials/messenger.ts

+ 6 - 0
src/partials/messenger.navigation.html

@@ -31,6 +31,12 @@
                     <span translate>messenger.SETTINGS</span>
                 </md-button>
             </md-menu-item>
+            <md-menu-item>
+                <md-button ng-click="ctrl.troubleshooting()">
+                    <md-icon aria-hidden="true" class="material-icons md-24">bug_report</md-icon>
+                    <span translate>troubleshooting.TROUBLESHOOTING</span>
+                </md-button>
+            </md-menu-item>
             <md-menu-item>
                 <md-button ng-click="ctrl.about()">
                     <md-icon aria-hidden="true" class="material-icons md-24">info</md-icon>

+ 15 - 0
src/partials/messenger.ts

@@ -26,6 +26,7 @@ import {Logger} from 'ts-log';
 
 import {ContactControllerModel} from '../controller_model/contact';
 import {DialogController} from '../controllers/dialog';
+import {TroubleshootingController} from '../controllers/troubleshooting';
 import {bufferToUrl, hasValue, supportsPassive, throttle, u8aToHex} from '../helpers';
 import {emojify} from '../helpers/emoji';
 import {ContactService} from '../services/contact';
@@ -1049,6 +1050,20 @@ class NavigationController {
         this.showDialog('about', ev);
     }
 
+    /**
+     * Show troubleshooting dialog.
+     */
+    public troubleshooting(): void {
+        this.$mdDialog.show({
+            controller: TroubleshootingController,
+            controllerAs: 'ctrl',
+            templateUrl: 'partials/dialog.troubleshooting.html',
+            parent: angular.element(document.body),
+            clickOutsideToClose: true,
+            fullscreen: true,
+        });
+    }
+
     /**
      * Show settings dialog.
      */