agora-appbuilder-core 4.1.8-beta.8 → 4.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/template/defaultConfig.js +3 -3
- package/template/src/components/recordings/RecordingItemRow.tsx +18 -14
- package/template/src/components/recordings/RecordingsDateTable.tsx +9 -2
- package/template/src/components/text-tracks/TextTracksTable.tsx +7 -2
- package/template/src/components/text-tracks/useFetchSTTTranscript.tsx +0 -4
package/package.json
CHANGED
|
@@ -77,8 +77,8 @@ const DefaultConfig = {
|
|
|
77
77
|
CHAT_ORG_NAME: '',
|
|
78
78
|
CHAT_APP_NAME: '',
|
|
79
79
|
CHAT_URL: '',
|
|
80
|
-
CLI_VERSION: '3.1.8
|
|
81
|
-
CORE_VERSION: '4.1.8
|
|
80
|
+
CLI_VERSION: '3.1.8',
|
|
81
|
+
CORE_VERSION: '4.1.8',
|
|
82
82
|
DISABLE_LANDSCAPE_MODE: false,
|
|
83
83
|
STT_AUTO_START: false,
|
|
84
84
|
CLOUD_RECORDING_AUTO_START: false,
|
|
@@ -90,7 +90,7 @@ const DefaultConfig = {
|
|
|
90
90
|
SDK_CODEC: 'vp8',
|
|
91
91
|
ENABLE_WAITING_ROOM_AUTO_APPROVAL: false,
|
|
92
92
|
ENABLE_WAITING_ROOM_AUTO_REQUEST: false,
|
|
93
|
-
ENABLE_TEXT_TRACKS:
|
|
93
|
+
ENABLE_TEXT_TRACKS: false,
|
|
94
94
|
};
|
|
95
95
|
|
|
96
96
|
module.exports = DefaultConfig;
|
|
@@ -16,11 +16,13 @@ interface RecordingItemRowProps {
|
|
|
16
16
|
item: FetchRecordingData['recordings'][0];
|
|
17
17
|
onDeleteAction: (id: string) => void;
|
|
18
18
|
onTextTrackDownload: (textTrackLink: string) => void;
|
|
19
|
+
showTextTracks: boolean;
|
|
19
20
|
}
|
|
20
21
|
export default function RecordingItemRow({
|
|
21
22
|
item,
|
|
22
23
|
onDeleteAction,
|
|
23
24
|
onTextTrackDownload,
|
|
25
|
+
showTextTracks = false,
|
|
24
26
|
}: RecordingItemRowProps) {
|
|
25
27
|
const [expanded, setIsExpanded] = useState(false);
|
|
26
28
|
|
|
@@ -70,20 +72,22 @@ export default function RecordingItemRow({
|
|
|
70
72
|
<View>
|
|
71
73
|
{/* ========== PARENT ROW ========== */}
|
|
72
74
|
<View style={style.tbrow} key={item.id}>
|
|
73
|
-
|
|
74
|
-
<
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
75
|
+
{showTextTracks && (
|
|
76
|
+
<View style={style.tdIconCell}>
|
|
77
|
+
<IconButtonWithToolTip
|
|
78
|
+
hoverEffect={true}
|
|
79
|
+
hoverEffectStyle={style.iconButtonHoverEffect}
|
|
80
|
+
containerStyle={style.iconButton}
|
|
81
|
+
iconProps={{
|
|
82
|
+
name: expanded ? 'arrow-up' : 'arrow-down',
|
|
83
|
+
iconType: 'plain',
|
|
84
|
+
iconSize: 20,
|
|
85
|
+
tintColor: `${$config.FONT_COLOR}`,
|
|
86
|
+
}}
|
|
87
|
+
onPress={() => setIsExpanded(prev => !prev)}
|
|
88
|
+
/>
|
|
89
|
+
</View>
|
|
90
|
+
)}
|
|
87
91
|
<View style={[style.td, style.plzero]}>
|
|
88
92
|
<Text style={style.ttime}>
|
|
89
93
|
{date}
|
|
@@ -13,6 +13,7 @@ import ImageIcon from '../../atoms/ImageIcon';
|
|
|
13
13
|
import RecordingItemRow from './RecordingItemRow';
|
|
14
14
|
import GenericPopup from '../common/GenericPopup';
|
|
15
15
|
import {downloadS3Link} from '../../utils/common';
|
|
16
|
+
import {useControlPermissionMatrix} from '../controls/useControlPermissionMatrix';
|
|
16
17
|
|
|
17
18
|
function EmptyRecordingState() {
|
|
18
19
|
return (
|
|
@@ -34,7 +35,6 @@ function EmptyRecordingState() {
|
|
|
34
35
|
);
|
|
35
36
|
}
|
|
36
37
|
|
|
37
|
-
const headers = ['', 'Date/Time', 'Duration', 'Actions'];
|
|
38
38
|
const defaultPageNumber = 1;
|
|
39
39
|
|
|
40
40
|
function RecordingsDateTable(props) {
|
|
@@ -57,6 +57,8 @@ function RecordingsDateTable(props) {
|
|
|
57
57
|
const [currentPage, setCurrentPage] = useState(defaultPageNumber);
|
|
58
58
|
|
|
59
59
|
const {fetchRecordings} = useRecording();
|
|
60
|
+
const canAccessAllTextTracks =
|
|
61
|
+
useControlPermissionMatrix('viewAllTextTracks');
|
|
60
62
|
|
|
61
63
|
// message for any download‐error popup
|
|
62
64
|
const [errorSnack, setErrorSnack] = React.useState<string | undefined>();
|
|
@@ -111,11 +113,15 @@ function RecordingsDateTable(props) {
|
|
|
111
113
|
});
|
|
112
114
|
};
|
|
113
115
|
|
|
116
|
+
const headers = canAccessAllTextTracks
|
|
117
|
+
? ['', 'Date/Time', 'Duration', 'Actions']
|
|
118
|
+
: ['Date/Time', 'Duration', 'Actions'];
|
|
119
|
+
|
|
114
120
|
return (
|
|
115
121
|
<View style={style.ttable}>
|
|
116
122
|
<TableHeader
|
|
117
123
|
columns={headers}
|
|
118
|
-
firstCellStyle={style.thIconCell}
|
|
124
|
+
firstCellStyle={canAccessAllTextTracks ? style.thIconCell : {}}
|
|
119
125
|
lastCellStyle={style.alignCellToRight}
|
|
120
126
|
/>
|
|
121
127
|
<TableBody
|
|
@@ -130,6 +136,7 @@ function RecordingsDateTable(props) {
|
|
|
130
136
|
item={item}
|
|
131
137
|
onDeleteAction={props?.onDeleteAction}
|
|
132
138
|
onTextTrackDownload={onTextTrackDownload}
|
|
139
|
+
showTextTracks={canAccessAllTextTracks}
|
|
133
140
|
/>
|
|
134
141
|
)}
|
|
135
142
|
emptyComponent={<EmptyRecordingState />}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, {useEffect} from 'react';
|
|
2
2
|
import {View, Text, TouchableOpacity} from 'react-native';
|
|
3
3
|
import Tooltip from '../../atoms/Tooltip';
|
|
4
4
|
import Clipboard from '../../subComponents/Clipboard';
|
|
@@ -204,7 +204,7 @@ function ErrorTextTrackState({message}: {message: string}) {
|
|
|
204
204
|
}
|
|
205
205
|
|
|
206
206
|
function TextTracksTable() {
|
|
207
|
-
const {sttState, currentPage, setCurrentPage, deleteTranscript} =
|
|
207
|
+
const {getSTTs, sttState, currentPage, setCurrentPage, deleteTranscript} =
|
|
208
208
|
useFetchSTTTranscript();
|
|
209
209
|
|
|
210
210
|
const {
|
|
@@ -212,6 +212,11 @@ function TextTracksTable() {
|
|
|
212
212
|
data: {stts, pagination},
|
|
213
213
|
error: fetchTranscriptError,
|
|
214
214
|
} = sttState;
|
|
215
|
+
|
|
216
|
+
useEffect(() => {
|
|
217
|
+
getSTTs(currentPage);
|
|
218
|
+
}, [currentPage, getSTTs]);
|
|
219
|
+
|
|
215
220
|
// id of text-tracj to delete
|
|
216
221
|
const [textTrackIdToDelete, setTextTrackIdToDelete] = React.useState<
|
|
217
222
|
string | undefined
|
|
@@ -119,10 +119,6 @@ export function useFetchSTTTranscript() {
|
|
|
119
119
|
[roomId.host, store.token],
|
|
120
120
|
);
|
|
121
121
|
|
|
122
|
-
useEffect(() => {
|
|
123
|
-
getSTTs(currentPage);
|
|
124
|
-
}, [currentPage, getSTTs]);
|
|
125
|
-
|
|
126
122
|
// Delete stts
|
|
127
123
|
const deleteTranscript = useCallback(
|
|
128
124
|
async (id: string) => {
|