Browse Source

fix(rn,recording) use the same icon as web

factor2
Saúl Ibarra Corretgé 1 year ago
parent
commit
06f434e924

+ 0
- 2
lang/main.json View File

@@ -998,7 +998,6 @@
998 998
         "limitNotificationDescriptionNative": "Due to high demand your recording will be limited to {{limit}} min. For unlimited recordings try <3>{{app}}</3>.",
999 999
         "limitNotificationDescriptionWeb": "Due to high demand your recording will be limited to {{limit}} min. For unlimited recordings try <a href={{url}} rel='noopener noreferrer' target='_blank'>{{app}}</a>.",
1000 1000
         "linkGenerated": "We have generated a link to your recording.",
1001
-        "live": "LIVE",
1002 1001
         "localRecordingNoNotificationWarning": "The recording will not be announced to other participants. You will need to let them know that the meeting is recorded.",
1003 1002
         "localRecordingNoVideo": "Video is not being recorded",
1004 1003
         "localRecordingStartWarning": "Please make sure you stop the recording before exiting the meeting in order to save it.",
@@ -1015,7 +1014,6 @@
1015 1014
         "onBy": "{{name}} started the recording",
1016 1015
         "onlyRecordSelf": "Record only my audio and video streams",
1017 1016
         "pending": "Preparing to record the meeting...",
1018
-        "rec": "REC",
1019 1017
         "recordAudioAndVideo": "Record audio and video",
1020 1018
         "recordTranscription": "Record transcription",
1021 1019
         "saveLocalRecording": "Save recording file locally (Beta)",

+ 3
- 23
react/features/recording/components/AbstractRecordingLabel.ts View File

@@ -21,7 +21,7 @@ interface IProps extends WithTranslation {
21 21
     _iAmRecorder: boolean;
22 22
 
23 23
     /**
24
-     * The status of the highermost priority session.
24
+     * The status of the higher priority session.
25 25
      */
26 26
     _status?: string;
27 27
 
@@ -56,8 +56,7 @@ const STALE_TIMEOUT = 10 * 1000;
56 56
 /**
57 57
  * Abstract class for the {@code RecordingLabel} component.
58 58
  */
59
-export default class AbstractRecordingLabel
60
-    extends Component<IProps, IState> {
59
+export default class AbstractRecordingLabel extends Component<IProps, IState> {
61 60
     _mounted: boolean;
62 61
 
63 62
     /**
@@ -124,24 +123,6 @@ export default class AbstractRecordingLabel
124 123
             ? this._renderLabel() : null;
125 124
     }
126 125
 
127
-    /**
128
-     * Returns the label key that this indicator should render.
129
-     *
130
-     * @protected
131
-     * @returns {?string}
132
-     */
133
-    _getLabelKey() {
134
-        switch (this.props.mode) {
135
-        case JitsiRecordingConstants.mode.STREAM:
136
-            return 'recording.live';
137
-        case JitsiRecordingConstants.mode.FILE:
138
-            return 'recording.rec';
139
-        default:
140
-            // Invalid mode is passed to the component.
141
-            return undefined;
142
-        }
143
-    }
144
-
145 126
     /**
146 127
      * Renders the platform specific label component.
147 128
      *
@@ -169,8 +150,7 @@ export default class AbstractRecordingLabel
169 150
                     }
170 151
 
171 152
                     // Only if it's still OFF.
172
-                    if (this.props._status
173
-                            === JitsiRecordingConstants.status.OFF) {
153
+                    if (this.props._status === JitsiRecordingConstants.status.OFF) {
174 154
                         this.setState({
175 155
                             staleLabel: true
176 156
                         });

+ 5
- 2
react/features/recording/components/native/RecordingLabel.tsx View File

@@ -2,6 +2,7 @@ import React from 'react';
2 2
 import { connect } from 'react-redux';
3 3
 
4 4
 import { translate } from '../../../base/i18n/functions';
5
+import { IconRecord, IconSites } from '../../../base/icons/svg';
5 6
 import Label from '../../../base/label/components/native/Label';
6 7
 import { JitsiRecordingConstants } from '../../../base/lib-jitsi-meet';
7 8
 import { StyleType } from '../../../base/styles/functions.any';
@@ -26,6 +27,8 @@ class RecordingLabel extends AbstractRecordingLabel {
26 27
      */
27 28
     _renderLabel() {
28 29
         let status: 'on' | 'in_progress' | 'off' = 'on';
30
+        const isRecording = this.props.mode === JitsiRecordingConstants.mode.FILE;
31
+        const icon = isRecording ? IconRecord : IconSites;
29 32
 
30 33
         switch (this.props._status) {
31 34
         case JitsiRecordingConstants.status.PENDING:
@@ -38,9 +41,9 @@ class RecordingLabel extends AbstractRecordingLabel {
38 41
 
39 42
         return (
40 43
             <Label
44
+                icon = { icon }
41 45
                 status = { status }
42
-                style = { styles.indicatorStyle as StyleType }
43
-                text = { this.props.t(this._getLabelKey() ?? '') } />
46
+                style = { styles.indicatorStyle as StyleType } />
44 47
         );
45 48
     }
46 49
 }

Loading…
Cancel
Save