mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
ref(TS) Require interfaces to start with I (#12424)
This commit is contained in:
@@ -8,7 +8,7 @@ import { updateSettings } from '../../base/settings/actions';
|
||||
* The type of the React {@code Component} props of
|
||||
* {@link AbstractDisplayNamePrompt}.
|
||||
*/
|
||||
export interface Props extends WithTranslation {
|
||||
export interface IProps extends WithTranslation {
|
||||
|
||||
/**
|
||||
* Invoked to update the local participant's display name.
|
||||
@@ -25,13 +25,13 @@ export interface Props extends WithTranslation {
|
||||
* Implements an abstract class for {@code DisplayNamePrompt}.
|
||||
*/
|
||||
export default class AbstractDisplayNamePrompt<S>
|
||||
extends Component<Props, S> {
|
||||
extends Component<IProps, S> {
|
||||
/**
|
||||
* Instantiates a new component.
|
||||
*
|
||||
* @inheritdoc
|
||||
*/
|
||||
constructor(props: Props) {
|
||||
constructor(props: IProps) {
|
||||
super(props);
|
||||
|
||||
this._onSetDisplayName = this._onSetDisplayName.bind(this);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import * as React from 'react';
|
||||
import { Text, View } from 'react-native';
|
||||
|
||||
import { IState } from '../../../app/types';
|
||||
import { IReduxState } from '../../../app/types';
|
||||
import {
|
||||
getParticipantById,
|
||||
getParticipantDisplayName,
|
||||
@@ -68,7 +68,7 @@ class DisplayNameLabel extends React.Component<Props> {
|
||||
* @param {Props} ownProps - The own props of the component.
|
||||
* @returns {Props}
|
||||
*/
|
||||
function _mapStateToProps(state: IState, ownProps: Partial<Props>) {
|
||||
function _mapStateToProps(state: IReduxState, ownProps: Partial<Props>) {
|
||||
const participant = getParticipantById(state, ownProps.participantId ?? '');
|
||||
|
||||
return {
|
||||
|
||||
@@ -5,7 +5,7 @@ import { useTranslation } from 'react-i18next';
|
||||
import { useDispatch, useSelector } from 'react-redux';
|
||||
import { makeStyles } from 'tss-react/mui';
|
||||
|
||||
import { IState } from '../../../app/types';
|
||||
import { IReduxState } from '../../../app/types';
|
||||
import {
|
||||
getParticipantById,
|
||||
getParticipantDisplayName
|
||||
@@ -21,7 +21,7 @@ import { appendSuffix } from '../../functions';
|
||||
/**
|
||||
* The type of the React {@code Component} props of {@link DisplayName}.
|
||||
*/
|
||||
interface Props {
|
||||
interface IProps {
|
||||
|
||||
/**
|
||||
* Whether or not the display name should be editable on click.
|
||||
@@ -78,10 +78,11 @@ const DisplayName = ({
|
||||
elementID,
|
||||
participantID,
|
||||
thumbnailType
|
||||
}: Props) => {
|
||||
}: IProps) => {
|
||||
const { classes } = useStyles();
|
||||
const configuredDisplayName = useSelector((state: IState) => getParticipantById(state, participantID))?.name ?? '';
|
||||
const nameToDisplay = useSelector((state: IState) => getParticipantDisplayName(state, participantID));
|
||||
const configuredDisplayName = useSelector((state: IReduxState) =>
|
||||
getParticipantById(state, participantID))?.name ?? '';
|
||||
const nameToDisplay = useSelector((state: IReduxState) => getParticipantDisplayName(state, participantID));
|
||||
const [ editDisplayNameValue, setEditDisplayNameValue ] = useState('');
|
||||
const [ isEditing, setIsEditing ] = useState(false);
|
||||
const dispatch = useDispatch();
|
||||
|
||||
@@ -4,7 +4,7 @@ import { translate } from '../../../base/i18n/functions';
|
||||
import { connect } from '../../../base/redux/functions';
|
||||
import Dialog from '../../../base/ui/components/web/Dialog';
|
||||
import Input from '../../../base/ui/components/web/Input';
|
||||
import AbstractDisplayNamePrompt, { Props } from '../AbstractDisplayNamePrompt';
|
||||
import AbstractDisplayNamePrompt, { IProps } from '../AbstractDisplayNamePrompt';
|
||||
|
||||
/**
|
||||
* The type of the React {@code Component} props of {@link DisplayNamePrompt}.
|
||||
@@ -30,7 +30,7 @@ class DisplayNamePrompt extends AbstractDisplayNamePrompt<State> {
|
||||
* @param {Object} props - The read-only properties with which the new
|
||||
* instance is to be initialized.
|
||||
*/
|
||||
constructor(props: Props) {
|
||||
constructor(props: IProps) {
|
||||
super(props);
|
||||
|
||||
this.state = {
|
||||
|
||||
@@ -5,14 +5,14 @@ import React from 'react';
|
||||
import { useSelector } from 'react-redux';
|
||||
import { makeStyles } from 'tss-react/mui';
|
||||
|
||||
import { IState } from '../../../app/types';
|
||||
import { IReduxState } from '../../../app/types';
|
||||
import { isDisplayNameVisible } from '../../../base/config/functions.any';
|
||||
import {
|
||||
getLocalParticipant,
|
||||
getParticipantDisplayName,
|
||||
isWhiteboardParticipant
|
||||
} from '../../../base/participants/functions';
|
||||
import { Participant } from '../../../base/participants/types';
|
||||
import { IParticipant } from '../../../base/participants/types';
|
||||
import { withPixelLineHeight } from '../../../base/styles/functions.web';
|
||||
// @ts-ignore
|
||||
import { getLargeVideoParticipant } from '../../../large-video/functions';
|
||||
@@ -51,9 +51,9 @@ const useStyles = makeStyles()((theme: Theme) => {
|
||||
*/
|
||||
const StageParticipantNameLabel = () => {
|
||||
const { classes, cx } = useStyles();
|
||||
const largeVideoParticipant: Participant = useSelector(getLargeVideoParticipant);
|
||||
const largeVideoParticipant: IParticipant = useSelector(getLargeVideoParticipant);
|
||||
const selectedId = largeVideoParticipant?.id;
|
||||
const nameToDisplay = useSelector((state: IState) => getParticipantDisplayName(state, selectedId));
|
||||
const nameToDisplay = useSelector((state: IReduxState) => getParticipantDisplayName(state, selectedId));
|
||||
|
||||
const localParticipant = useSelector(getLocalParticipant);
|
||||
const localId = localParticipant?.id;
|
||||
|
||||
Reference in New Issue
Block a user