|
@@ -44,6 +44,7 @@ import {TimeoutService} from '../services/timeout';
|
|
|
import {VersionService} from '../services/version';
|
|
|
import {WebClientService} from '../services/webclient';
|
|
|
import {controllerModelHasMembers, isContactReceiver} from '../typeguards';
|
|
|
+import {Type} from '../types/helpers';
|
|
|
|
|
|
// Type aliases
|
|
|
import ControllerModelMode = threema.ControllerModelMode;
|
|
@@ -906,6 +907,16 @@ class ConversationController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+class AboutDialogController extends DialogController {
|
|
|
+ public readonly config: threema.Config;
|
|
|
+
|
|
|
+ public static readonly $inject = ['$mdDialog', 'CONFIG'];
|
|
|
+ constructor($mdDialog: ng.material.IDialogService, config: threema.Config) {
|
|
|
+ super($mdDialog);
|
|
|
+ this.config = config;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
class NavigationController {
|
|
|
|
|
|
public name = 'navigation';
|
|
@@ -1031,9 +1042,9 @@ class NavigationController {
|
|
|
/**
|
|
|
* Show dialog.
|
|
|
*/
|
|
|
- public showDialog(name, ev) {
|
|
|
+ public showDialog(name: string, ev: Event, controller: Type<DialogController> = DialogController) {
|
|
|
this.$mdDialog.show({
|
|
|
- controller: DialogController,
|
|
|
+ controller: controller,
|
|
|
controllerAs: 'ctrl',
|
|
|
templateUrl: 'partials/dialog.' + name + '.html',
|
|
|
parent: angular.element(document.body),
|
|
@@ -1047,7 +1058,7 @@ class NavigationController {
|
|
|
* Show about dialog.
|
|
|
*/
|
|
|
public about(ev): void {
|
|
|
- this.showDialog('about', ev);
|
|
|
+ this.showDialog('about', ev, AboutDialogController);
|
|
|
}
|
|
|
|
|
|
/**
|