Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(keyboard-shortcuts): Rename .web/.native files.

Hristo Terezovb0a050b66a56
diff --git a/react/features/keyboard-shortcuts/actions.any.ts b/react/features/keyboard-shortcuts/actions.any.ts
deleted file mode 100644
index 34e0e82dc4..0000000000
--- a/react/features/keyboard-shortcuts/actions.any.ts
+++ /dev/null
@@ -1,60 +0,0 @@
-import { AnyAction } from 'redux';
-
-import {
- DISABLE_KEYBOARD_SHORTCUTS,
- ENABLE_KEYBOARD_SHORTCUTS,
- REGISTER_KEYBOARD_SHORTCUT,
- UNREGISTER_KEYBOARD_SHORTCUT
-} from './actionTypes';
-import { IKeyboardShortcut } from './types';
-
-/**
- * Action to register a new shortcut.
- *
- * @param {IKeyboardShortcut} shortcut - The shortcut to register.
- * @returns {AnyAction}
-*/
-export const registerShortcut = (shortcut: IKeyboardShortcut): AnyAction => {
- return {
- type: REGISTER_KEYBOARD_SHORTCUT,
- shortcut
- };
-};
-
-/**
-* Action to unregister a shortcut.
-*
-* @param {string} character - The character of the shortcut to unregister.
-* @param {boolean} altKey - Whether the shortcut used altKey.
-* @returns {AnyAction}
-*/
-export const unregisterShortcut = (character: string, altKey = false): AnyAction => {
- return {
- alt: altKey,
- type: UNREGISTER_KEYBOARD_SHORTCUT,
- character
- };
-};
-
-/**
- * Action to enable keyboard shortcuts.
- *
- * @returns {AnyAction}
- */
-export const enableKeyboardShortcuts = (): AnyAction => {
- return {
- type: ENABLE_KEYBOARD_SHORTCUTS
- };
-};
-
-
-/**
- * Action to enable keyboard shortcuts.
- *
- * @returns {AnyAction}
- */
-export const disableKeyboardShortcuts = (): AnyAction => {
- return {
- type: DISABLE_KEYBOARD_SHORTCUTS
- };
-};
diff --git a/react/features/keyboard-shortcuts/actions.web.ts b/react/features/keyboard-shortcuts/actions.ts
similarity index 83%
rename from react/features/keyboard-shortcuts/actions.web.ts
rename to react/features/keyboard-shortcuts/actions.ts
index a2ce7522bc..9b28a1af7a 100644
--- a/react/features/keyboard-shortcuts/actions.web.ts
+++ b/react/features/keyboard-shortcuts/actions.ts
@@ -1,4 +1,5 @@
import { batch } from 'react-redux';
+import { AnyAction } from 'redux';
import { ACTION_SHORTCUT_PRESSED, ACTION_SHORTCUT_RELEASED, createShortcutEvent } from '../analytics/AnalyticsEvents';
import { sendAnalytics } from '../analytics/functions';
@@ -8,13 +9,67 @@ import { openSettingsDialog } from '../settings/actions.web';
import { SETTINGS_TABS } from '../settings/constants';
import { iAmVisitor } from '../visitors/functions';
-import { registerShortcut, unregisterShortcut } from './actions.any';
+import {
+ DISABLE_KEYBOARD_SHORTCUTS,
+ ENABLE_KEYBOARD_SHORTCUTS,
+ REGISTER_KEYBOARD_SHORTCUT,
+ UNREGISTER_KEYBOARD_SHORTCUT
+} from './actionTypes';
import { areKeyboardShortcutsEnabled, getKeyboardShortcuts } from './functions';
import logger from './logger';
+import { IKeyboardShortcut } from './types';
import { getKeyboardKey, getPriorityFocusedElement } from './utils';
-export * from './actions.any';
+/**
+ * Action to register a new shortcut.
+ *
+ * @param {IKeyboardShortcut} shortcut - The shortcut to register.
+ * @returns {AnyAction}
+*/
+export const registerShortcut = (shortcut: IKeyboardShortcut): AnyAction => {
+ return {
+ type: REGISTER_KEYBOARD_SHORTCUT,
+ shortcut
+ };
+};
+
+/**
+* Action to unregister a shortcut.
+*
+* @param {string} character - The character of the shortcut to unregister.
+* @param {boolean} altKey - Whether the shortcut used altKey.
+* @returns {AnyAction}
+*/
+export const unregisterShortcut = (character: string, altKey = false): AnyAction => {
+ return {
+ alt: altKey,
+ type: UNREGISTER_KEYBOARD_SHORTCUT,
+ character
+ };
+};
+
+/**
+ * Action to enable keyboard shortcuts.
+ *
+ * @returns {AnyAction}
+ */
+export const enableKeyboardShortcuts = (): AnyAction => {
+ return {
+ type: ENABLE_KEYBOARD_SHORTCUTS
+ };
+};
+
+/**
+ * Action to enable keyboard shortcuts.
+ *
+ * @returns {AnyAction}
+ */
+export const disableKeyboardShortcuts = (): AnyAction => {
+ return {
+ type: DISABLE_KEYBOARD_SHORTCUTS
+ };
+};
type KeyHandler = ((e: KeyboardEvent) => void) | undefined;
diff --git a/react/features/keyboard-shortcuts/components/web/KeyboardShortcutsButton.ts b/react/features/keyboard-shortcuts/components/KeyboardShortcutsButton.ts
similarity index 64%
rename from react/features/keyboard-shortcuts/components/web/KeyboardShortcutsButton.ts
rename to react/features/keyboard-shortcuts/components/KeyboardShortcutsButton.ts
index 87c5996b04..9552cc99a3 100644
--- a/react/features/keyboard-shortcuts/components/web/KeyboardShortcutsButton.ts
+++ b/react/features/keyboard-shortcuts/components/KeyboardShortcutsButton.ts
@@ -1,15 +1,15 @@
import { connect } from 'react-redux';
-import { createToolbarEvent } from '../../../analytics/AnalyticsEvents';
-import { sendAnalytics } from '../../../analytics/functions';
-import { IReduxState } from '../../../app/types';
-import { isMobileBrowser } from '../../../base/environment/utils';
-import { translate } from '../../../base/i18n/functions';
-import { IconShortcuts } from '../../../base/icons/svg';
-import AbstractButton, { IProps as AbstractButtonProps } from '../../../base/toolbox/components/AbstractButton';
-import { openSettingsDialog } from '../../../settings/actions';
-import { SETTINGS_TABS } from '../../../settings/constants';
-import { areKeyboardShortcutsEnabled } from '../../functions';
+import { createToolbarEvent } from '../../analytics/AnalyticsEvents';
+import { sendAnalytics } from '../../analytics/functions';
+import { IReduxState } from '../../app/types';
+import { isMobileBrowser } from '../../base/environment/utils';
+import { translate } from '../../base/i18n/functions';
+import { IconShortcuts } from '../../base/icons/svg';
+import AbstractButton, { IProps as AbstractButtonProps } from '../../base/toolbox/components/AbstractButton';
+import { openSettingsDialog } from '../../settings/actions.web';
+import { SETTINGS_TABS } from '../../settings/constants';
+import { areKeyboardShortcutsEnabled } from '../functions';
/**
* Implementation of a button for opening keyboard shortcuts dialog.
diff --git a/react/features/keyboard-shortcuts/hooks.web.ts b/react/features/keyboard-shortcuts/hooks.ts
similarity index 88%
rename from react/features/keyboard-shortcuts/hooks.web.ts
rename to react/features/keyboard-shortcuts/hooks.ts
index 7c02225da7..97abc4b3e5 100644
--- a/react/features/keyboard-shortcuts/hooks.web.ts
+++ b/react/features/keyboard-shortcuts/hooks.ts
@@ -2,7 +2,7 @@ import { useSelector } from 'react-redux';
import { isMobileBrowser } from '../base/environment/utils';
-import KeyboardShortcutsButton from './components/web/KeyboardShortcutsButton';
+import KeyboardShortcutsButton from './components/KeyboardShortcutsButton';
import { areKeyboardShortcutsEnabled } from './functions';
const shortcuts = {
diff --git a/react/features/settings/actions.web.ts b/react/features/settings/actions.web.ts
index ed4b2d2966..954a521e6c 100644
--- a/react/features/settings/actions.web.ts
+++ b/react/features/settings/actions.web.ts
@@ -17,7 +17,7 @@ import { getNormalizedDisplayName } from '../base/participants/functions';
import { updateSettings } from '../base/settings/actions';
import { getLocalVideoTrack } from '../base/tracks/functions.web';
import { appendURLHashParam } from '../base/util/uri';
-import { disableKeyboardShortcuts, enableKeyboardShortcuts } from '../keyboard-shortcuts/actions.web';
+import { disableKeyboardShortcuts, enableKeyboardShortcuts } from '../keyboard-shortcuts/actions';
import { toggleBackgroundEffect } from '../virtual-background/actions';
import virtualBackgroundLogger from '../virtual-background/logger';
diff --git a/react/features/toolbox/hooks.web.ts b/react/features/toolbox/hooks.web.ts
index a6ce469f77..7aeeaa94de 100644
--- a/react/features/toolbox/hooks.web.ts
+++ b/react/features/toolbox/hooks.web.ts
@@ -20,8 +20,8 @@ import { useFeedbackButton } from '../feedback/hooks.web';
import { setGifMenuVisibility } from '../gifs/actions';
import { isGifEnabled } from '../gifs/function.any';
import InviteButton from '../invite/components/add-people-dialog/web/InviteButton';
-import { registerShortcut, unregisterShortcut } from '../keyboard-shortcuts/actions.web';
-import { useKeyboardShortcutsButton } from '../keyboard-shortcuts/hooks.web';
+import { registerShortcut, unregisterShortcut } from '../keyboard-shortcuts/actions';
+import { useKeyboardShortcutsButton } from '../keyboard-shortcuts/hooks';
import NoiseSuppressionButton from '../noise-suppression/components/NoiseSuppressionButton';
import {
close as closeParticipantsPane,