Some style fixes.

This commit is contained in:
aforge
2023-05-09 14:23:26 -07:00
parent 981ef684a7
commit f7120d824d
37 changed files with 23592 additions and 391 deletions
+3
View File
@@ -6,3 +6,6 @@ export const CALL_STATE_IN_PROGRESS = 3;
// Video call message headers representing call state.
export const CALL_HEAD_STARTED = 'started';
// Gap between video conference carousel items.
export const VC_CAROUSEL_ITEM_GAP = 16;
+1 -1
View File
File diff suppressed because one or more lines are too long
+7
View File
@@ -1647,5 +1647,12 @@
"description": "Menu item [Unpin] for un-pinning the message.",
"missing": true,
"obsolete": false
},
"calls_conference": {
"translation": "",
"defaultMessage": "Conference call",
"description": "Conference call label",
"missing": true,
"obsolete": false
}
}
+7
View File
@@ -1647,5 +1647,12 @@
"description": "Menu item [Unpin] for un-pinning the message.",
"missing": false,
"obsolete": false
},
"calls_conference": {
"translation": "Conference call",
"defaultMessage": "Conference call",
"description": "Conference call label",
"missing": false,
"obsolete": false
}
}
+7
View File
@@ -1647,5 +1647,12 @@
"description": "Error message when audio is not available",
"missing": false,
"obsolete": false
},
"calls_conference": {
"translation": "",
"defaultMessage": "Conference call",
"description": "Conference call label",
"missing": true,
"obsolete": false
}
}
+4
View File
@@ -143,6 +143,10 @@
"defaultMessage": "missed",
"description": "Label for missed incoming call"
},
"calls_conference": {
"defaultMessage": "Conference call",
"description": "Conference call label"
},
"calls_incoming": {
"defaultMessage": "Incoming call",
"description": "Incoming call label"
+7
View File
@@ -1647,5 +1647,12 @@
"description": "Error message when audio is not available",
"missing": false,
"obsolete": false
},
"calls_conference": {
"translation": "",
"defaultMessage": "Conference call",
"description": "Conference call label",
"missing": true,
"obsolete": false
}
}
+7
View File
@@ -1647,5 +1647,12 @@
"description": "Error message when audio is not available",
"missing": false,
"obsolete": false
},
"calls_conference": {
"translation": "",
"defaultMessage": "Conference call",
"description": "Conference call label",
"missing": true,
"obsolete": false
}
}
+7
View File
@@ -1647,5 +1647,12 @@
"description": "Error message when audio is not available",
"missing": false,
"obsolete": false
},
"calls_conference": {
"translation": "",
"defaultMessage": "Conference call",
"description": "Conference call label",
"missing": true,
"obsolete": false
}
}
+7
View File
@@ -1647,5 +1647,12 @@
"description": "Error message when audio is not available",
"missing": false,
"obsolete": false
},
"calls_conference": {
"translation": "",
"defaultMessage": "Conference call",
"description": "Conference call label",
"missing": true,
"obsolete": false
}
}
+7
View File
@@ -1647,5 +1647,12 @@
"description": "Error message when audio is not available",
"missing": false,
"obsolete": false
},
"calls_conference": {
"translation": "",
"defaultMessage": "Conference call",
"description": "Conference call label",
"missing": true,
"obsolete": false
}
}
+7
View File
@@ -1647,5 +1647,12 @@
"description": "Error message when audio is not available",
"missing": false,
"obsolete": false
},
"calls_conference": {
"translation": "",
"defaultMessage": "Conference call",
"description": "Conference call label",
"missing": true,
"obsolete": false
}
}
+1 -1
View File
@@ -1442,7 +1442,7 @@ class MessagesView extends React.Component {
);
} else if (this.state.rtcPanel) {
// P2P call.
if (this.state.rtcPanel.startsWith("usr")) {
if (Tinode.isP2PTopicName(this.state.rtcPanel)) {
component2 = (
<CallPanel
topic={this.state.topic}
+2 -2
View File
@@ -1776,7 +1776,7 @@ class TinodeWeb extends React.Component {
switch (callState) {
case CALL_STATE_OUTGOING_INITATED:
const head = { webrtc: CALL_HEAD_STARTED, aonly: !!audioOnly };
let msg = Drafty.videoCall(audioOnly);
const msg = Drafty.videoCall(audioOnly);
if (Tinode.isGroupTopicName(callTopic)) {
// Video conference.
head.vc = true;
@@ -1873,7 +1873,7 @@ class TinodeWeb extends React.Component {
}
if (topic.isSubscribed()) {
this.handleTopicSelected(setCallTopic ? topicName : this.state.callTopic);
let upd = {
const upd = {
callState: CALL_STATE_IN_PROGRESS
}
if (setCallTopic) {
+5 -11
View File
@@ -1,13 +1,10 @@
// Video conference carousel item.
import React from 'react';
import { injectIntl } from 'react-intl';
import {
Track,
} from 'livekit-client';
import Track from 'livekit-client';
import LetterTile from './letter-tile.jsx';
class VCCarouselItem extends React.PureComponent {
export default class VCCarouselItem extends React.PureComponent {
constructor(props) {
super(props);
@@ -54,16 +51,15 @@ class VCCarouselItem extends React.PureComponent {
}
render() {
const name = this.props.name;
let classes = "call-party carousel-item";
let classes = 'call-party carousel-item';
if (this.props.isSpeaking) {
classes += " call-party-speaking";
classes += ' call-party-speaking';
}
const micPub = this.props.micPub;
const cameraPub = this.props.cameraPub;
return (
<div className={classes} key={this.props.key}>
<div className={classes}>
<>
<video ref={this.handleVideoRefChange}></video>
<audio ref={this.handleAudioRefChange}></audio>
@@ -90,5 +86,3 @@ class VCCarouselItem extends React.PureComponent {
);
}
}
export default injectIntl(VCCarouselItem);
+11 -13
View File
@@ -1,13 +1,13 @@
import React from 'react';
import { injectIntl } from 'react-intl';
import {
Track,
} from 'livekit-client';
import { Track } from 'livekit-client';
import LetterTile from './letter-tile.jsx';
import VCCarouselItem from './vc-carousel-item.jsx';
class VCCarousel extends React.Component {
import { VC_CAROUSEL_ITEM_GAP } from '../constants.js';
export default class VCCarousel extends React.Component {
constructor(props) {
super(props);
this.handlePrevClick = this.handlePrevClick.bind(this);
@@ -20,26 +20,26 @@ class VCCarousel extends React.Component {
}
handlePrevClick() {
const gap = 16;
const gap = VC_CAROUSEL_ITEM_GAP;
const width = this.carouselRef.current.offsetWidth;
this.carouselRef.current.scrollBy(-(width + gap), 0);
if (this.carouselRef.current.scrollLeft - width - gap <= 0) {
this.prevRef.current.style.display = "none";
this.prevRef.current.style.display = 'none';
}
if (!this.contentRef.current.scrollWidth - width - gap <= this.carouselRef.current.scrollLeft + width) {
this.nextRef.current.style.display = "flex";
this.nextRef.current.style.display = 'flex';
}
}
handleNextClick() {
const gap = 16;
const gap = VC_CAROUSEL_ITEM_GAP;
const width = this.carouselRef.current.offsetWidth;
this.carouselRef.current.scrollBy(width + gap, 0);
if (this.carouselRef.current.scrollWidth !== 0) {
this.prevRef.current.style.display = "flex";
this.prevRef.current.style.display = 'flex';
}
if (this.contentRef.current.scrollWidth - width - gap <= this.carouselRef.current.scrollLeft + width) {
this.nextRef.current.style.display = "none";
this.nextRef.current.style.display = 'none';
}
}
@@ -98,5 +98,3 @@ class VCCarousel extends React.Component {
);
}
}
export default injectIntl(VCCarousel);
+4 -6
View File
@@ -14,7 +14,7 @@ import {
Room,
RoomEvent,
Track,
VideoPresets,
VideoPresets
} from 'livekit-client';
import LetterTile from './letter-tile.jsx';
@@ -50,7 +50,6 @@ class VCPanel extends React.PureComponent {
this.start = this.start.bind(this);
this.stop = this.stop.bind(this);
this.reportError = this.reportError.bind(this);
this.handleCloseClick = this.handleCloseClick.bind(this);
@@ -85,7 +84,6 @@ class VCPanel extends React.PureComponent {
const topic = this.props.tinode.getTopic(this.props.topic);
topic.onInfo = this.previousOnInfo;
this.stop();
}
onInfo(info) {
@@ -362,19 +360,19 @@ class VCPanel extends React.PureComponent {
const peerTitle = this.state.activeSpeaker ? this.state.activeSpeaker : clipStr(this.props.title, MAX_PEER_TITLE_LENGTH);
const remoteActive = this.remoteRef.current && (this.remoteRef.current.src != '' || this.remoteRef.current.srcObject)
const remoteActive = this.remoteRef.current && (this.remoteRef.current.src || this.remoteRef.current.srcObject)
return (
<>
<div id="video-container">
{ !this.isBroadcast && Object.keys(this.state.participants).length > 0 ?
{!this.isBroadcast && Object.keys(this.state.participants).length > 0 ?
<VCCarousel
tinode={this.props.tinode}
participants={this.state.participants} /> :
null
}
<div id="video-container-panel">
{ isPublishing ?
{isPublishing ?
<div className="call-party self" disabled={this.state.audioOnly}>
<video ref={this.localRef} autoPlay muted playsInline />
<div className="caller-name inactive">