fix lint
parent
ba8efb19ff
commit
a1d348eefc
|
|
@ -49,27 +49,39 @@ export default class Spotlights extends EventEmitter
|
|||
setNextAsSelected()
|
||||
{
|
||||
let peerId = null;
|
||||
if (this._selectedSpotlights.length > 0) {
|
||||
|
||||
if (this._selectedSpotlights.length > 0)
|
||||
{
|
||||
peerId = this._selectedSpotlights[0];
|
||||
} else if (this._unmutablePeerList.length > 0) {
|
||||
}
|
||||
else if (this._unmutablePeerList.length > 0)
|
||||
{
|
||||
peerId = this._unmutablePeerList[0];
|
||||
}
|
||||
|
||||
if (peerId != null && this._currentSpotlights.length < this._unmutablePeerList.length) {
|
||||
let oldIndex = this._unmutablePeerList.indexOf(peerId);
|
||||
if (peerId != null && this._currentSpotlights.length < this._unmutablePeerList.length)
|
||||
{
|
||||
const oldIndex = this._unmutablePeerList.indexOf(peerId);
|
||||
|
||||
let index = oldIndex;
|
||||
|
||||
index++;
|
||||
do {
|
||||
if (index >= this._unmutablePeerList.length) {
|
||||
do
|
||||
{
|
||||
if (index >= this._unmutablePeerList.length)
|
||||
{
|
||||
index = 0;
|
||||
}
|
||||
let newSelectedPeer = this._unmutablePeerList[index];
|
||||
if (!this._currentSpotlights.includes(newSelectedPeer)) {
|
||||
const newSelectedPeer = this._unmutablePeerList[index];
|
||||
|
||||
if (!this._currentSpotlights.includes(newSelectedPeer))
|
||||
{
|
||||
this.setPeerSpotlight(newSelectedPeer);
|
||||
break;
|
||||
}
|
||||
index++;
|
||||
if (index === oldIndex) {
|
||||
if (index === oldIndex)
|
||||
{
|
||||
break;
|
||||
}
|
||||
} while (true);
|
||||
|
|
@ -79,27 +91,39 @@ export default class Spotlights extends EventEmitter
|
|||
setPrevAsSelected()
|
||||
{
|
||||
let peerId = null;
|
||||
if (this._selectedSpotlights.length > 0) {
|
||||
|
||||
if (this._selectedSpotlights.length > 0)
|
||||
{
|
||||
peerId = this._selectedSpotlights[0];
|
||||
} else if (this._unmutablePeerList.length > 0) {
|
||||
}
|
||||
else if (this._unmutablePeerList.length > 0)
|
||||
{
|
||||
peerId = this._unmutablePeerList[0];
|
||||
}
|
||||
|
||||
if (peerId != null && this._currentSpotlights.length < this._unmutablePeerList.length) {
|
||||
let oldIndex = this._unmutablePeerList.indexOf(peerId);
|
||||
if (peerId != null && this._currentSpotlights.length < this._unmutablePeerList.length)
|
||||
{
|
||||
const oldIndex = this._unmutablePeerList.indexOf(peerId);
|
||||
|
||||
let index = oldIndex;
|
||||
|
||||
index--;
|
||||
do {
|
||||
if (index < 0) {
|
||||
do
|
||||
{
|
||||
if (index < 0)
|
||||
{
|
||||
index = this._unmutablePeerList.length - 1;
|
||||
}
|
||||
let newSelectedPeer = this._unmutablePeerList[index];
|
||||
if (!this._currentSpotlights.includes(newSelectedPeer)) {
|
||||
const newSelectedPeer = this._unmutablePeerList[index];
|
||||
|
||||
if (!this._currentSpotlights.includes(newSelectedPeer))
|
||||
{
|
||||
this.setPeerSpotlight(newSelectedPeer);
|
||||
break;
|
||||
}
|
||||
index--;
|
||||
if (index === oldIndex) {
|
||||
if (index === oldIndex)
|
||||
{
|
||||
break;
|
||||
}
|
||||
} while (true);
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ const shortcuts=[
|
|||
{ key: '2', label: 'label.filmstrip', defaultMessage: 'Filmstrip View' },
|
||||
{ key: 'space', label: 'me.mutedPTT', defaultMessage: 'Push SPACE to talk' },
|
||||
{ key: 'a', label: 'label.advanced', defaultMessage: 'Show advanced information' },
|
||||
{ key: String.fromCharCode(8592)+' '+String.fromCharCode(8594), label: 'room.browsePeersSpotlight', defaultMessage: 'Browse participants into Spotlight' }
|
||||
{ key: `${String.fromCharCode(8592)} ${String.fromCharCode(8594)}`, label: 'room.browsePeersSpotlight', defaultMessage: 'Browse participants into Spotlight' }
|
||||
];
|
||||
const styles = (theme) =>
|
||||
({
|
||||
|
|
|
|||
|
|
@ -50,34 +50,36 @@ const cache = createIntlCache();
|
|||
const messages =
|
||||
{
|
||||
// 'en' : messagesEnglish,
|
||||
'nb' : messagesNorwegian,
|
||||
'de' : messagesGerman,
|
||||
'hu' : messagesHungarian,
|
||||
'pl' : messagesPolish,
|
||||
'dk' : messagesDanish,
|
||||
'fr' : messagesFrench,
|
||||
'el' : messagesGreek,
|
||||
'ro' : messagesRomanian,
|
||||
'pt' : messagesPortuguese,
|
||||
'nb' : messagesNorwegian,
|
||||
'de' : messagesGerman,
|
||||
'hu' : messagesHungarian,
|
||||
'pl' : messagesPolish,
|
||||
'dk' : messagesDanish,
|
||||
'fr' : messagesFrench,
|
||||
'el' : messagesGreek,
|
||||
'ro' : messagesRomanian,
|
||||
'pt' : messagesPortuguese,
|
||||
'zh-hans' : messagesChineseSimplified,
|
||||
'zh-hant' : messagesChineseTraditional,
|
||||
'es' : messagesSpanish,
|
||||
'hr' : messagesCroatian,
|
||||
'cs' : messagesCzech,
|
||||
'it' : messagesItalian,
|
||||
'uk' : messagesUkrainian,
|
||||
'tr' : messagesTurkish,
|
||||
'lv' : messagesLatvian
|
||||
'es' : messagesSpanish,
|
||||
'hr' : messagesCroatian,
|
||||
'cs' : messagesCzech,
|
||||
'it' : messagesItalian,
|
||||
'uk' : messagesUkrainian,
|
||||
'tr' : messagesTurkish,
|
||||
'lv' : messagesLatvian
|
||||
};
|
||||
|
||||
let browserLanguage = (navigator.language || navigator.browserLanguage).toLowerCase()
|
||||
const browserLanguage = (navigator.language || navigator.browserLanguage).toLowerCase();
|
||||
|
||||
let locale = browserLanguage.split(/[-_]/)[0]; // language without region code
|
||||
|
||||
if (locale === 'zh')
|
||||
{
|
||||
if (browserLanguage === 'zh-cn')
|
||||
locale = 'zh-hans'
|
||||
locale = 'zh-hans';
|
||||
else
|
||||
locale = 'zh-hant'
|
||||
locale = 'zh-hant';
|
||||
}
|
||||
|
||||
const intl = createIntl({
|
||||
|
|
|
|||
Loading…
Reference in New Issue