analytics: keyboard shortcut
This commit is contained in:
parent
cc38fcc5d0
commit
8ebf2b7e47
|
@ -1,5 +1,6 @@
|
||||||
/* @flow */
|
/* @flow */
|
||||||
|
|
||||||
|
import { createShortcutEvent, sendAnalytics } from '../analytics';
|
||||||
import { APP_WILL_MOUNT, APP_WILL_UNMOUNT } from '../base/app';
|
import { APP_WILL_MOUNT, APP_WILL_UNMOUNT } from '../base/app';
|
||||||
import { CONFERENCE_JOINED } from '../base/conference';
|
import { CONFERENCE_JOINED } from '../base/conference';
|
||||||
import { toggleDialog } from '../base/dialog';
|
import { toggleDialog } from '../base/dialog';
|
||||||
|
@ -36,27 +37,24 @@ MiddlewareRegistry.register(({ getState, dispatch }) => next => action => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
recordingController.onWarning = function(messageKey, messageParams) {
|
recordingController.onWarning = (messageKey, messageParams) => {
|
||||||
dispatch(showNotification({
|
dispatch(showNotification({
|
||||||
title: i18next.t('localRecording.localRecording'),
|
title: i18next.t('localRecording.localRecording'),
|
||||||
description: i18next.t(messageKey, messageParams)
|
description: i18next.t(messageKey, messageParams)
|
||||||
}, 10000));
|
}, 10000));
|
||||||
};
|
};
|
||||||
|
|
||||||
recordingController.onNotify = function(messageKey, messageParams) {
|
recordingController.onNotify = (messageKey, messageParams) => {
|
||||||
dispatch(showNotification({
|
dispatch(showNotification({
|
||||||
title: i18next.t('localRecording.localRecording'),
|
title: i18next.t('localRecording.localRecording'),
|
||||||
description: i18next.t(messageKey, messageParams)
|
description: i18next.t(messageKey, messageParams)
|
||||||
}, 10000));
|
}, 10000));
|
||||||
};
|
};
|
||||||
|
|
||||||
// register shortcut
|
APP.keyboardshortcut.registerShortcut('L', null, () => {
|
||||||
APP.keyboardshortcut.registerShortcut(
|
sendAnalytics(createShortcutEvent('local.recording'));
|
||||||
'L',
|
dispatch(toggleDialog(LocalRecordingInfoDialog));
|
||||||
null,
|
}, 'keyboardShortcuts.localRecording');
|
||||||
() => dispatch(toggleDialog(LocalRecordingInfoDialog)),
|
|
||||||
'keyboardShortcuts.localRecording'
|
|
||||||
);
|
|
||||||
break;
|
break;
|
||||||
case APP_WILL_UNMOUNT:
|
case APP_WILL_UNMOUNT:
|
||||||
recordingController.onStateChanged = null;
|
recordingController.onStateChanged = null;
|
||||||
|
|
Loading…
Reference in New Issue