agora-appbuilder-core 4.0.0-api.3 → 4.0.0-api.4
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/customization-api/typeDefinition.ts +1 -2
- package/template/src/atoms/ImageIcon.tsx +12 -2
- package/template/src/pages/video-call/DefaultLayouts.ts +9 -3
- package/template/src/subComponents/LayoutIconButton.tsx +2 -7
- package/template/src/subComponents/LayoutIconDropdown.tsx +1 -4
package/package.json
CHANGED
|
@@ -55,8 +55,7 @@ export type layoutComponent = React.ComponentType<{
|
|
|
55
55
|
export interface layoutItem {
|
|
56
56
|
name: string;
|
|
57
57
|
label: string;
|
|
58
|
-
|
|
59
|
-
iconName: keyof IconsInterface;
|
|
58
|
+
icon: string;
|
|
60
59
|
component: layoutComponent;
|
|
61
60
|
}
|
|
62
61
|
|
|
@@ -17,7 +17,8 @@ import hexadecimalTransparency from '../utils/hexadecimalTransparency';
|
|
|
17
17
|
|
|
18
18
|
export interface ImageIconProps {
|
|
19
19
|
tintColor?: string;
|
|
20
|
-
name
|
|
20
|
+
name?: keyof IconsInterface;
|
|
21
|
+
icon?: string;
|
|
21
22
|
iconSize?: number;
|
|
22
23
|
iconContainerStyle?: ViewStyle;
|
|
23
24
|
iconBackgroundColor?: string;
|
|
@@ -33,6 +34,7 @@ export interface ImageIconProps {
|
|
|
33
34
|
const ImageIcon = (props: ImageIconProps) => {
|
|
34
35
|
const {
|
|
35
36
|
name,
|
|
37
|
+
icon = undefined,
|
|
36
38
|
iconSize = 26,
|
|
37
39
|
tintColor,
|
|
38
40
|
base64 = false,
|
|
@@ -80,8 +82,16 @@ const ImageIcon = (props: ImageIconProps) => {
|
|
|
80
82
|
name={name}
|
|
81
83
|
style={{width: iconSize, height: iconSize}}
|
|
82
84
|
/>
|
|
83
|
-
) : (
|
|
85
|
+
) : icon ? (
|
|
86
|
+
<UIKitImageIcon
|
|
87
|
+
tintColor={tintColor}
|
|
88
|
+
icon={icon}
|
|
89
|
+
style={{width: iconSize, height: iconSize}}
|
|
90
|
+
/>
|
|
91
|
+
) : name ? (
|
|
84
92
|
<CustomIcon name={name} color={tintColor} size={iconSize} />
|
|
93
|
+
) : (
|
|
94
|
+
<></>
|
|
85
95
|
)}
|
|
86
96
|
</View>
|
|
87
97
|
</View>
|
|
@@ -3,18 +3,24 @@ import GridVideo from '../../components/GridVideo';
|
|
|
3
3
|
import PinnedVideo from '../../components/PinnedVideo';
|
|
4
4
|
import useLayoutsData from './useLayoutsData';
|
|
5
5
|
import {useLayout} from '../../utils/useLayout';
|
|
6
|
-
|
|
6
|
+
import {isMobileUA} from '../../utils/common';
|
|
7
|
+
const isMobileView = isMobileUA();
|
|
7
8
|
export const DefaultLayouts: layoutItem[] = [
|
|
8
9
|
{
|
|
9
10
|
name: 'grid',
|
|
10
11
|
label: 'Grid',
|
|
11
|
-
iconName: 'grid',
|
|
12
|
+
//iconName: 'grid',
|
|
13
|
+
icon: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAYAAABV7bNHAAAACXBIWXMAACE4AAAhOAFFljFgAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAFOSURBVHgB7drBTcNAEIXhWVeQEkwJVIDohA6gA2iBigIVhA6cEuhgGGNfd1+kZK1x9H/SyidbT0/ry+6YAQBwt9z9EOs91tFv4xTrZW8ZasHGWJP3Mc3fz56hiHBTPEbr5xzrsZTya0kzDLW3fNmCo/U1xnqzxBmG+nv2att4ssQZqr/Y/IPaRmJ7l6wZBkMTBQkUJFCQQEECBQkUJFCQQEECBQkUJFCQQEECBQkUJFCQ0Croy7bxY4kztAr6tm18WuIMrSPXQzxO1vlGIU46HyxxhuoOWq9Bnm25FunhvH7fMme4yHz94stt5C0cY32su2NXGQAAuDPOAFUzGANUIhwDVLW3nAGqfwxQiQwMUIkMnCgKFCRQkEBBAgUJFCRQkEBBAgUJFCRQkEBBAgUJFCRQkEBBAgNUIgMDVCIDA1QMUF2X4SLOABUAADv0Bxz9l6sMoGOZAAAAAElFTkSuQmCC',
|
|
12
14
|
component: GridVideo,
|
|
13
15
|
},
|
|
14
16
|
{
|
|
15
17
|
name: 'pinned',
|
|
16
18
|
label: 'Pinned',
|
|
17
|
-
iconName: 'pinned',
|
|
19
|
+
//iconName: 'pinned',
|
|
20
|
+
//for mobile view top pinned icon and desktop left pinned icon
|
|
21
|
+
icon: isMobileView
|
|
22
|
+
? 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAYAAABV7bNHAAAACXBIWXMAACE4AAAhOAFFljFgAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAFFSURBVHgB7dzhTcJQFEDhWybQDeoIjuAoTqKO4ASOAk6gG9gNZIN6TTUhhvdOAo9Iy/mSF3689JKeFH40lAhJkhZpHMc+1zrX53igP/OaaDjzJVdfa9DV4uTLOlcfR+jSzswxGmg8c8h1myO3+zZXlQMf4sg4M9Hneixt1q6gj2gQaAZX0Ldtjrze+16lI874ZE4+c9cqVGUgYCBgIGAgYCBgIGAgYCBgIGAgYCBgIEn/6eQ3zObCG2YHMhAwEDAQMBAwEDAQMBAwEDAQMBAwEDAQMBAwEDAQMBAwEDAQMBAwEDAQMBAwEDAQMBAwEDAQMBAwEDAQMBAwEKgF2sTleC9t1AK9xuV4Lm3UfqN4lS9vsfxHw4eu625Km8Ur6OdB+7uYHrxfqiGmcyyqfklnpN+691H5nM7QJtdTTP+4MIQkSYv0BZfkCSDYSwACAAAAAElFTkSuQmCC'
|
|
23
|
+
: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAYAAABV7bNHAAAACXBIWXMAACE4AAAhOAFFljFgAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAGCSURBVHgB7drdTYRAFIbhM1SwJWAJVmC2E61AO1BLsCKwgrUDKMEOxkPAS+a7YeCweZ9ksle7OXn3jzBjBgDA3co5X3y9++ryNm6+ns82w9pgra8h1zFMrx99hiSGG/yhtXpGX48ppV8LOkOz9qw8fwRbq6v19WaBZ2jWn2evto8nCzzD6lds+oLaTvzjnaLO0BiKCCQQSCCQQCCBQAKBBAIJBBIIJBBIIJBAIIFAAoEEAgmlQL3t48cCKwX6tn18WWClW64Xf7hZ5R0Fv9P5YOszxL3lumyDXG3eFqlhXF4/tOKPtEf6f4dfbLvfit7Xp817UaMFlywwdjVOgEACgQQCCQQSZKAc9fDSTtT5oNYfOqtzNT36upauhSL8zYc+QBX6OijC4aUIoh+gOhwHqMQM/M0LBBIIJBBIIJBAIIFAAoEEAgkEEggkEEggkEAggUACgYToB6h6O3iG6AeoDp8h+gGqw2cIfYDqNIe4pi2gZUd0C52vj+XTcaoZAAA4lz9x+tmcZ0GmbAAAAABJRU5ErkJggg==',
|
|
18
24
|
component: PinnedVideo,
|
|
19
25
|
},
|
|
20
26
|
];
|
|
@@ -67,12 +67,7 @@ const LayoutIconButton = (props: LayoutIconButtonInterface) => {
|
|
|
67
67
|
textColor: $config.FONT_COLOR,
|
|
68
68
|
},
|
|
69
69
|
};
|
|
70
|
-
const iconName =
|
|
71
|
-
layouts[layout]?.iconName === 'pinned' && isMobileView
|
|
72
|
-
? 'list-view'
|
|
73
|
-
: layouts[layout]?.iconName;
|
|
74
|
-
|
|
75
|
-
renderContent.push(
|
|
70
|
+
const iconName = renderContent.push(
|
|
76
71
|
props?.render ? (
|
|
77
72
|
props.render(onPress)
|
|
78
73
|
) : (
|
|
@@ -105,7 +100,7 @@ const LayoutIconButton = (props: LayoutIconButtonInterface) => {
|
|
|
105
100
|
}}
|
|
106
101
|
key={'defaultLayoutIconWithName'}
|
|
107
102
|
iconProps={{
|
|
108
|
-
|
|
103
|
+
icon: layouts[layout]?.icon,
|
|
109
104
|
tintColor: $config.SECONDARY_ACTION_COLOR,
|
|
110
105
|
}}
|
|
111
106
|
{...iconButtonProps}
|
|
@@ -80,10 +80,7 @@ const LayoutIconDropdown = (props: LayoutIconDropdownProps) => {
|
|
|
80
80
|
padding: 10,
|
|
81
81
|
},
|
|
82
82
|
iconType: 'plain',
|
|
83
|
-
|
|
84
|
-
item.iconName === 'pinned' && isMobileView
|
|
85
|
-
? 'list-view'
|
|
86
|
-
: item.iconName,
|
|
83
|
+
icon: item.icon,
|
|
87
84
|
tintColor: $config.SECONDARY_ACTION_COLOR,
|
|
88
85
|
},
|
|
89
86
|
btnTextProps: {
|