agora-appbuilder-core 1.0.6 → 1.0.10
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 +4 -2
- package/template/electron/main/index.js +34 -16
- package/template/package.json +6 -4
- package/template/src/components/Precall.native.tsx +22 -14
- package/template/src/components/Precall.tsx +21 -19
- package/template/src/components/StorageContext.tsx +2 -0
- package/template/src/pages/Authenticate.tsx +5 -4
- package/template/src/pages/Create.tsx +19 -15
- package/template/src/pages/Join.tsx +13 -30
- package/template/src/pages/VideoCall.tsx +70 -52
- package/template/src/subComponents/ChatBubble.tsx +13 -13
- package/template/src/subComponents/LogoutButton.tsx +1 -1
- package/template/src/subComponents/OpenInNativeButton.tsx +1 -1
- package/template/src/subComponents/ScreenshareButton.tsx +7 -5
- package/template/src/subComponents/SelectOAuth.tsx +25 -12
- package/template/src/utils/hasBrandLogo.tsx +3 -0
- package/template/webpack.commons.js +1 -0
- package/template/agora-rn-uikit/.git/HEAD +0 -1
- package/template/agora-rn-uikit/.git/config +0 -14
- package/template/agora-rn-uikit/.git/description +0 -1
- package/template/agora-rn-uikit/.git/hooks/applypatch-msg.sample +0 -15
- package/template/agora-rn-uikit/.git/hooks/commit-msg.sample +0 -24
- package/template/agora-rn-uikit/.git/hooks/fsmonitor-watchman.sample +0 -173
- package/template/agora-rn-uikit/.git/hooks/post-update.sample +0 -8
- package/template/agora-rn-uikit/.git/hooks/pre-applypatch.sample +0 -14
- package/template/agora-rn-uikit/.git/hooks/pre-commit.sample +0 -49
- package/template/agora-rn-uikit/.git/hooks/pre-merge-commit.sample +0 -13
- package/template/agora-rn-uikit/.git/hooks/pre-push.sample +0 -53
- package/template/agora-rn-uikit/.git/hooks/pre-rebase.sample +0 -169
- package/template/agora-rn-uikit/.git/hooks/pre-receive.sample +0 -24
- package/template/agora-rn-uikit/.git/hooks/prepare-commit-msg.sample +0 -42
- package/template/agora-rn-uikit/.git/hooks/update.sample +0 -128
- package/template/agora-rn-uikit/.git/index +0 -0
- package/template/agora-rn-uikit/.git/info/exclude +0 -6
- package/template/agora-rn-uikit/.git/logs/HEAD +0 -2
- package/template/agora-rn-uikit/.git/logs/refs/heads/ab-dev-auto +0 -1
- package/template/agora-rn-uikit/.git/logs/refs/heads/master +0 -1
- package/template/agora-rn-uikit/.git/logs/refs/remotes/origin/HEAD +0 -1
- package/template/agora-rn-uikit/.git/objects/pack/pack-8e10fb79871759752a059f8fc882cba207d4713a.idx +0 -0
- package/template/agora-rn-uikit/.git/objects/pack/pack-8e10fb79871759752a059f8fc882cba207d4713a.pack +0 -0
- package/template/agora-rn-uikit/.git/packed-refs +0 -8
- package/template/agora-rn-uikit/.git/refs/heads/ab-dev-auto +0 -1
- package/template/agora-rn-uikit/.git/refs/heads/master +0 -1
- package/template/agora-rn-uikit/.git/refs/remotes/origin/HEAD +0 -1
- package/template/agora-rn-uikit/.gitignore +0 -63
- package/template/agora-rn-uikit/package-lock.json +0 -7612
- package/template/react-native-toast-message/.gitignore +0 -5
- package/template/react-native-toast-message/.npmignore +0 -5
- package/template/react-native-toast-message/package-lock.json +0 -10553
- package/template/src/.DS_Store +0 -0
- package/template/src/subComponents/.DS_Store +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agora-appbuilder-core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10",
|
|
4
4
|
"description": "React Native template for RTE app builder",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"files": [
|
|
@@ -10,7 +10,9 @@
|
|
|
10
10
|
"scripts": {
|
|
11
11
|
"uikit": "rm -rf template/agora-rn-uikit && git clone https://github.com/AgoraIO-Community/ReactNative-UIKit template/agora-rn-uikit && cd template/agora-rn-uikit && git checkout ab-dev-auto",
|
|
12
12
|
"deps": "cd template && npm i",
|
|
13
|
-
"dev-setup": "npm run uikit && npm run deps && node devSetup.js"
|
|
13
|
+
"dev-setup": "npm run uikit && npm run deps && node devSetup.js",
|
|
14
|
+
"web-build": "cd template && npm run web:build && cd .. && npm run copy-vercel",
|
|
15
|
+
"copy-vercel": "cp vercel.json template/dist"
|
|
14
16
|
},
|
|
15
17
|
"author": {
|
|
16
18
|
"email": "svineth.face@gmail.com",
|
|
@@ -62,24 +62,42 @@ autoUpdater.on('update-downloaded', (info) => {
|
|
|
62
62
|
});
|
|
63
63
|
|
|
64
64
|
const createWindow = () => {
|
|
65
|
-
let template = [];
|
|
66
65
|
const name = app.getName();
|
|
67
|
-
template
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
{
|
|
75
|
-
label: 'Quit',
|
|
76
|
-
accelerator: 'Command+Q',
|
|
77
|
-
click() {
|
|
78
|
-
app.quit();
|
|
66
|
+
const template = [
|
|
67
|
+
{
|
|
68
|
+
label: name,
|
|
69
|
+
submenu: [
|
|
70
|
+
{
|
|
71
|
+
label: 'About ' + name,
|
|
72
|
+
role: 'about',
|
|
79
73
|
},
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
74
|
+
{type: 'separator'},
|
|
75
|
+
{
|
|
76
|
+
label: 'Quit',
|
|
77
|
+
accelerator: 'Command+Q',
|
|
78
|
+
click() {
|
|
79
|
+
app.quit();
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
],
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
label: 'Edit',
|
|
86
|
+
submenu: [
|
|
87
|
+
{label: 'Undo', accelerator: 'CmdOrCtrl+Z', selector: 'undo:'},
|
|
88
|
+
{label: 'Redo', accelerator: 'Shift+CmdOrCtrl+Z', selector: 'redo:'},
|
|
89
|
+
{type: 'separator'},
|
|
90
|
+
{label: 'Cut', accelerator: 'CmdOrCtrl+X', selector: 'cut:'},
|
|
91
|
+
{label: 'Copy', accelerator: 'CmdOrCtrl+C', selector: 'copy:'},
|
|
92
|
+
{label: 'Paste', accelerator: 'CmdOrCtrl+V', selector: 'paste:'},
|
|
93
|
+
{
|
|
94
|
+
label: 'Select All',
|
|
95
|
+
accelerator: 'CmdOrCtrl+A',
|
|
96
|
+
selector: 'selectAll:',
|
|
97
|
+
},
|
|
98
|
+
],
|
|
99
|
+
},
|
|
100
|
+
];
|
|
83
101
|
autoUpdater.checkForUpdatesAndNotify();
|
|
84
102
|
const menu = Menu.buildFromTemplate(template);
|
|
85
103
|
Menu.setApplicationMenu(menu);
|
package/template/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "HelloWorld",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"private": true,
|
|
5
5
|
"main": ".electron/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@sentry/react-native": "2.4.3",
|
|
50
50
|
"@sentry/tracing": "6.2.1",
|
|
51
51
|
"agora-react-native-rtm": "1.2.2-alpha.3",
|
|
52
|
-
"agora-rtc-sdk-ng": "4.
|
|
52
|
+
"agora-rtc-sdk-ng": "4.6.3",
|
|
53
53
|
"agora-rtm-sdk": "1.4.3",
|
|
54
54
|
"electron-log": "^4.3.5",
|
|
55
55
|
"electron-squirrel-startup": "1.0.0",
|
|
@@ -70,11 +70,13 @@
|
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@babel/core": "7.14.3",
|
|
73
|
+
"@babel/plugin-proposal-class-properties": "7.14.5",
|
|
74
|
+
"@babel/plugin-proposal-optional-chaining": "^7.16.0",
|
|
73
75
|
"@babel/preset-env": "7.14.4",
|
|
74
76
|
"@babel/preset-react": "7.13.13",
|
|
75
77
|
"@babel/preset-typescript": "7.13.0",
|
|
76
78
|
"@babel/runtime": "7.14.0",
|
|
77
|
-
"@bam.tech/react-native-make": "3.0.
|
|
79
|
+
"@bam.tech/react-native-make": "3.0.3",
|
|
78
80
|
"@pmmmwh/react-refresh-webpack-plugin": "0.3.3",
|
|
79
81
|
"@react-native-community/eslint-config": "1.1.0",
|
|
80
82
|
"@types/jest": "25.2.3",
|
|
@@ -91,7 +93,7 @@
|
|
|
91
93
|
"babel-plugin-transform-define": "2.0.0",
|
|
92
94
|
"cross-env": "7.0.3",
|
|
93
95
|
"del": "5.1.0",
|
|
94
|
-
"electron": "
|
|
96
|
+
"electron": "16.0.1",
|
|
95
97
|
"electron-builder": "22.10.5",
|
|
96
98
|
"electron-notarize": "1.0.0",
|
|
97
99
|
"eslint": "6.8.0",
|
|
@@ -46,24 +46,29 @@ const Precall = (props: any) => {
|
|
|
46
46
|
<View style={style.heading}>
|
|
47
47
|
<Text style={style.headingText}>Precall </Text>
|
|
48
48
|
</View>
|
|
49
|
-
<View
|
|
49
|
+
<View
|
|
50
|
+
style={{
|
|
51
|
+
zIndex: 50,
|
|
52
|
+
position: 'absolute',
|
|
53
|
+
width: '100%',
|
|
54
|
+
left: '18%',
|
|
55
|
+
top: 10,
|
|
56
|
+
alignSelf: 'center',
|
|
57
|
+
}}>
|
|
50
58
|
{error ? <Error error={error} showBack={true} /> : <></>}
|
|
51
59
|
</View>
|
|
52
60
|
<View style={style.full}>
|
|
53
61
|
<MaxVideoView user={maxUsers[0]} key={maxUsers[0].uid} />
|
|
54
62
|
</View>
|
|
55
63
|
{Platform.OS === 'ios' ? (
|
|
56
|
-
<View
|
|
57
|
-
style={style.textInputHolder}>
|
|
64
|
+
<View style={style.textInputHolder}>
|
|
58
65
|
<TextInput
|
|
59
66
|
value={username}
|
|
60
67
|
onChangeText={(text) => {
|
|
61
|
-
|
|
62
|
-
setUsername(text);
|
|
63
|
-
}
|
|
68
|
+
setUsername(text);
|
|
64
69
|
}}
|
|
65
70
|
onSubmitEditing={() => {}}
|
|
66
|
-
placeholder=
|
|
71
|
+
placeholder={queryComplete ? 'Display name*' : 'Getting name...'}
|
|
67
72
|
/>
|
|
68
73
|
</View>
|
|
69
74
|
) : (
|
|
@@ -71,12 +76,11 @@ const Precall = (props: any) => {
|
|
|
71
76
|
<TextInput
|
|
72
77
|
value={username}
|
|
73
78
|
onChangeText={(text) => {
|
|
74
|
-
|
|
75
|
-
setUsername(text);
|
|
76
|
-
}
|
|
79
|
+
setUsername(text);
|
|
77
80
|
}}
|
|
78
81
|
onSubmitEditing={() => {}}
|
|
79
|
-
placeholder=
|
|
82
|
+
placeholder={queryComplete ? 'Display name*' : 'Getting name...'}
|
|
83
|
+
editable={queryComplete}
|
|
80
84
|
/>
|
|
81
85
|
</View>
|
|
82
86
|
)}
|
|
@@ -95,10 +99,14 @@ const Precall = (props: any) => {
|
|
|
95
99
|
// disabled={!queryComplete}
|
|
96
100
|
style={{marginBottom: 50}}>
|
|
97
101
|
{/* <Text style={style.buttonText}> */}
|
|
98
|
-
|
|
102
|
+
{/* {queryComplete ? 'Join Room' : 'Loading...'} */}
|
|
99
103
|
{/* </Text> */}
|
|
100
|
-
|
|
101
|
-
|
|
104
|
+
{/* </TouchableOpacity> */}
|
|
105
|
+
<PrimaryButton
|
|
106
|
+
text={'Join Room'}
|
|
107
|
+
disabled={!queryComplete || username.trim() === ''}
|
|
108
|
+
onPress={() => setCallActive(true)}
|
|
109
|
+
/>
|
|
102
110
|
</View>
|
|
103
111
|
{/* </ImageBackground> */}
|
|
104
112
|
</View>
|
|
@@ -10,13 +10,7 @@
|
|
|
10
10
|
*********************************************
|
|
11
11
|
*/
|
|
12
12
|
import React, {useState, useContext} from 'react';
|
|
13
|
-
import {
|
|
14
|
-
View,
|
|
15
|
-
Text,
|
|
16
|
-
StyleSheet,
|
|
17
|
-
Dimensions,
|
|
18
|
-
Platform,
|
|
19
|
-
} from 'react-native';
|
|
13
|
+
import {View, Text, StyleSheet, Dimensions, Platform} from 'react-native';
|
|
20
14
|
import TextInput from '../atoms/TextInput';
|
|
21
15
|
import PrimaryButton from '../atoms/PrimaryButton';
|
|
22
16
|
import {MaxUidConsumer} from '../../agora-rn-uikit/src/MaxUidContext';
|
|
@@ -25,6 +19,7 @@ import {LocalAudioMute, LocalVideoMute} from '../../agora-rn-uikit/Components';
|
|
|
25
19
|
import LocalUserContext from '../../agora-rn-uikit/src/LocalUserContext';
|
|
26
20
|
import SelectDevice from '../subComponents/SelectDevice';
|
|
27
21
|
import Logo from '../subComponents/Logo';
|
|
22
|
+
import hasBrandLogo from '../utils/hasBrandLogo';
|
|
28
23
|
// import OpenInNativeButton from '../subComponents/OpenInNativeButton';
|
|
29
24
|
import ColorContext from './ColorContext';
|
|
30
25
|
// import {useHistory} from './Router';
|
|
@@ -39,6 +34,7 @@ const Precall = (props: any) => {
|
|
|
39
34
|
Dimensions.get('window').height,
|
|
40
35
|
Dimensions.get('window').width > Dimensions.get('window').height,
|
|
41
36
|
]);
|
|
37
|
+
|
|
42
38
|
let onLayout = (e: any) => {
|
|
43
39
|
setDim([e.nativeEvent.layout.width, e.nativeEvent.layout.height]);
|
|
44
40
|
};
|
|
@@ -50,7 +46,7 @@ const Precall = (props: any) => {
|
|
|
50
46
|
// resizeMode={'cover'}>
|
|
51
47
|
<View style={style.main} onLayout={onLayout}>
|
|
52
48
|
<View style={style.nav}>
|
|
53
|
-
<Logo />
|
|
49
|
+
{hasBrandLogo && <Logo />}
|
|
54
50
|
{error ? <Error error={error} showBack={true} /> : <></>}
|
|
55
51
|
{/* <OpenInNativeButton /> */}
|
|
56
52
|
</View>
|
|
@@ -94,17 +90,18 @@ const Precall = (props: any) => {
|
|
|
94
90
|
<TextInput
|
|
95
91
|
value={username}
|
|
96
92
|
onChangeText={(text) => {
|
|
97
|
-
|
|
98
|
-
setUsername(text);
|
|
99
|
-
}
|
|
93
|
+
setUsername(text);
|
|
100
94
|
}}
|
|
101
95
|
onSubmitEditing={() => {}}
|
|
102
|
-
placeholder=
|
|
96
|
+
placeholder={
|
|
97
|
+
queryComplete ? 'Display name*' : 'Getting name...'
|
|
98
|
+
}
|
|
99
|
+
editable={queryComplete}
|
|
103
100
|
/>
|
|
104
101
|
<View style={style.margin5Btm} />
|
|
105
102
|
<PrimaryButton
|
|
106
103
|
onPress={() => setCallActive(true)}
|
|
107
|
-
disabled={!queryComplete}
|
|
104
|
+
disabled={!queryComplete || username.trim() === ''}
|
|
108
105
|
text={queryComplete ? 'Join Room' : 'Loading...'}
|
|
109
106
|
/>
|
|
110
107
|
</View>
|
|
@@ -140,7 +137,11 @@ const Precall = (props: any) => {
|
|
|
140
137
|
</Text>
|
|
141
138
|
{/* </View> */}
|
|
142
139
|
<View style={{height: 20}} />
|
|
143
|
-
<View
|
|
140
|
+
<View
|
|
141
|
+
style={{
|
|
142
|
+
flex: 1,
|
|
143
|
+
maxWidth: Platform.OS === 'web' ? '25vw' : 'auto',
|
|
144
|
+
}}>
|
|
144
145
|
<SelectDevice />
|
|
145
146
|
</View>
|
|
146
147
|
<View
|
|
@@ -154,17 +155,18 @@ const Precall = (props: any) => {
|
|
|
154
155
|
<TextInput
|
|
155
156
|
value={username}
|
|
156
157
|
onChangeText={(text) => {
|
|
157
|
-
|
|
158
|
-
setUsername(text);
|
|
159
|
-
}
|
|
158
|
+
setUsername(text);
|
|
160
159
|
}}
|
|
161
160
|
onSubmitEditing={() => {}}
|
|
162
|
-
placeholder=
|
|
161
|
+
placeholder={
|
|
162
|
+
queryComplete ? 'Display name*' : 'Getting name...'
|
|
163
|
+
}
|
|
164
|
+
editable={queryComplete}
|
|
163
165
|
/>
|
|
164
166
|
<View style={{height: 20}} />
|
|
165
167
|
<PrimaryButton
|
|
166
168
|
onPress={() => setCallActive(true)}
|
|
167
|
-
disabled={!queryComplete}
|
|
169
|
+
disabled={!queryComplete || username.trim() === ''}
|
|
168
170
|
text={queryComplete ? 'Join Room' : 'Loading...'}
|
|
169
171
|
/>
|
|
170
172
|
</View>
|
|
@@ -15,6 +15,7 @@ import useMount from './useMount';
|
|
|
15
15
|
|
|
16
16
|
interface StoreInterface {
|
|
17
17
|
token: null | string;
|
|
18
|
+
displayName: null | string;
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
interface StorageContextInterface {
|
|
@@ -24,6 +25,7 @@ interface StorageContextInterface {
|
|
|
24
25
|
|
|
25
26
|
const initStoreValue: StoreInterface = {
|
|
26
27
|
token: null,
|
|
28
|
+
displayName: '',
|
|
27
29
|
};
|
|
28
30
|
|
|
29
31
|
const initStorageContextValue = {
|
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
import Logo from '../subComponents/Logo';
|
|
21
21
|
import OAuth from '../components/OAuth';
|
|
22
22
|
import Illustration from '../subComponents/Illustration';
|
|
23
|
+
import hasBrandLogo from '../utils/hasBrandLogo';
|
|
23
24
|
|
|
24
25
|
const Authenticate = () => {
|
|
25
26
|
const [dim, setDim] = useState([
|
|
@@ -37,13 +38,13 @@ const Authenticate = () => {
|
|
|
37
38
|
style={style.full}
|
|
38
39
|
resizeMode={'cover'}>
|
|
39
40
|
<View style={style.main}>
|
|
40
|
-
<View style={style.nav}>
|
|
41
|
-
<Logo />
|
|
42
|
-
</View>
|
|
41
|
+
<View style={style.nav}>{hasBrandLogo && <Logo />}</View>
|
|
43
42
|
<View style={style.content}>
|
|
44
43
|
<View style={style.leftContent}>
|
|
45
44
|
<Text style={style.heading}>Login using OAuth</Text>
|
|
46
|
-
<Text style={style.headline}>
|
|
45
|
+
<Text style={style.headline}>
|
|
46
|
+
Please select an OAuth provider to login.
|
|
47
|
+
</Text>
|
|
47
48
|
<OAuth />
|
|
48
49
|
</View>
|
|
49
50
|
{dim[0] > dim[1] + 150 ? (
|
|
@@ -10,12 +10,7 @@
|
|
|
10
10
|
*********************************************
|
|
11
11
|
*/
|
|
12
12
|
import React, {useState} from 'react';
|
|
13
|
-
import {
|
|
14
|
-
View,
|
|
15
|
-
Text,
|
|
16
|
-
StyleSheet,
|
|
17
|
-
Dimensions,
|
|
18
|
-
} from 'react-native';
|
|
13
|
+
import {View, Text, StyleSheet, Dimensions, ScrollView} from 'react-native';
|
|
19
14
|
import {useHistory} from '../components/Router';
|
|
20
15
|
import Checkbox from '../subComponents/Checkbox';
|
|
21
16
|
import {gql, useMutation} from '@apollo/client';
|
|
@@ -31,6 +26,7 @@ import HorizontalRule from '../atoms/HorizontalRule';
|
|
|
31
26
|
import TextInput from '../atoms/TextInput';
|
|
32
27
|
import Error from '../subComponents/Error';
|
|
33
28
|
import Toast from '../../react-native-toast-message';
|
|
29
|
+
import hasBrandLogo from '../utils/hasBrandLogo';
|
|
34
30
|
|
|
35
31
|
type PasswordInput = {
|
|
36
32
|
host: string;
|
|
@@ -38,8 +34,16 @@ type PasswordInput = {
|
|
|
38
34
|
};
|
|
39
35
|
|
|
40
36
|
const CREATE_CHANNEL = gql`
|
|
41
|
-
mutation CreateChannel(
|
|
42
|
-
|
|
37
|
+
mutation CreateChannel(
|
|
38
|
+
$title: String!
|
|
39
|
+
$backendURL: String!
|
|
40
|
+
$enablePSTN: Boolean
|
|
41
|
+
) {
|
|
42
|
+
createChannel(
|
|
43
|
+
title: $title
|
|
44
|
+
backendURL: $backendURL
|
|
45
|
+
enablePSTN: $enablePSTN
|
|
46
|
+
) {
|
|
43
47
|
passphrase {
|
|
44
48
|
host
|
|
45
49
|
view
|
|
@@ -111,9 +115,9 @@ const Create = () => {
|
|
|
111
115
|
// style={style.full}
|
|
112
116
|
// resizeMode={'cover'}>
|
|
113
117
|
// <KeyboardAvoidingView behavior={'height'} style={style.main}>
|
|
114
|
-
<
|
|
118
|
+
<ScrollView contentContainerStyle={style.main}>
|
|
115
119
|
<View style={style.nav}>
|
|
116
|
-
<Logo />
|
|
120
|
+
{hasBrandLogo && <Logo />}
|
|
117
121
|
{error ? <Error error={error} /> : <></>}
|
|
118
122
|
{/* <OpenInNativeButton /> */}
|
|
119
123
|
</View>
|
|
@@ -179,17 +183,17 @@ const Create = () => {
|
|
|
179
183
|
roomTitle={roomTitle}
|
|
180
184
|
/>
|
|
181
185
|
)}
|
|
182
|
-
</
|
|
186
|
+
</ScrollView>
|
|
183
187
|
);
|
|
184
188
|
};
|
|
185
189
|
|
|
186
190
|
const style = StyleSheet.create({
|
|
187
|
-
full: {flex: 1},
|
|
188
191
|
main: {
|
|
189
|
-
|
|
190
|
-
justifyContent: 'space-evenly',
|
|
192
|
+
paddingVertical: '8%',
|
|
191
193
|
marginHorizontal: '8%',
|
|
192
|
-
|
|
194
|
+
display: 'flex',
|
|
195
|
+
justifyContent: 'space-evenly',
|
|
196
|
+
flexGrow: 1,
|
|
193
197
|
},
|
|
194
198
|
nav: {
|
|
195
199
|
flex: 1,
|
|
@@ -10,15 +10,12 @@
|
|
|
10
10
|
*********************************************
|
|
11
11
|
*/
|
|
12
12
|
import React, {useContext, useState} from 'react';
|
|
13
|
-
import {
|
|
14
|
-
View,
|
|
15
|
-
Text,
|
|
16
|
-
StyleSheet,
|
|
17
|
-
} from 'react-native';
|
|
13
|
+
import {View, Text, StyleSheet, ScrollView} from 'react-native';
|
|
18
14
|
import {useHistory} from '../components/Router';
|
|
19
15
|
import SessionContext from '../components/SessionContext';
|
|
20
16
|
// import OpenInNativeButton from '../subComponents/OpenInNativeButton';
|
|
21
17
|
import Logo from '../subComponents/Logo';
|
|
18
|
+
import hasBrandLogo from '../utils/hasBrandLogo';
|
|
22
19
|
import LogoutButton from '../subComponents/LogoutButton';
|
|
23
20
|
import ColorContext from '../components/ColorContext';
|
|
24
21
|
// import Illustration from '../subComponents/Illustration';
|
|
@@ -38,8 +35,9 @@ const Join = (props: joinProps) => {
|
|
|
38
35
|
const history = useHistory();
|
|
39
36
|
const {primaryColor} = useContext(ColorContext);
|
|
40
37
|
const {joinSession} = useContext(SessionContext);
|
|
41
|
-
const [error, setError] =
|
|
42
|
-
|
|
38
|
+
const [error, setError] = useState<null | {name: string; message: string}>(
|
|
39
|
+
null,
|
|
40
|
+
);
|
|
43
41
|
// const [dim, setDim] = useState([
|
|
44
42
|
// Dimensions.get('window').width,
|
|
45
43
|
// Dimensions.get('window').height,
|
|
@@ -57,18 +55,12 @@ const Join = (props: joinProps) => {
|
|
|
57
55
|
const startCall = async () => {
|
|
58
56
|
joinSession({phrase});
|
|
59
57
|
};
|
|
60
|
-
|
|
58
|
+
|
|
61
59
|
return (
|
|
62
|
-
|
|
63
|
-
// // onLayout={onLayout}
|
|
64
|
-
// style={style.full}
|
|
65
|
-
// resizeMode={'cover'}>
|
|
66
|
-
<View style={style.main}>
|
|
67
|
-
{/* <KeyboardAvoidingView behavior={'height'} style={style.main}> */}
|
|
60
|
+
<ScrollView contentContainerStyle={style.main}>
|
|
68
61
|
<View style={style.nav}>
|
|
69
|
-
<Logo />
|
|
62
|
+
{hasBrandLogo && <Logo />}
|
|
70
63
|
{error ? <Error error={error} /> : <></>}
|
|
71
|
-
{/* <OpenInNativeButton /> */}
|
|
72
64
|
</View>
|
|
73
65
|
<View style={style.content}>
|
|
74
66
|
<View style={style.leftContent}>
|
|
@@ -99,28 +91,19 @@ const Join = (props: joinProps) => {
|
|
|
99
91
|
)}
|
|
100
92
|
</View>
|
|
101
93
|
</View>
|
|
102
|
-
{/* {dim[0] > dim[1] + 150 ? (
|
|
103
|
-
<View style={style.full}>
|
|
104
|
-
<Illustration />
|
|
105
|
-
</View>
|
|
106
|
-
) : (
|
|
107
|
-
<></>
|
|
108
|
-
)} */}
|
|
109
94
|
</View>
|
|
110
|
-
|
|
111
|
-
</View>
|
|
112
|
-
// </ImageBackground>
|
|
95
|
+
</ScrollView>
|
|
113
96
|
);
|
|
114
97
|
};
|
|
115
98
|
|
|
116
99
|
const style = StyleSheet.create({
|
|
117
|
-
full: {flex: 1},
|
|
118
100
|
illustration: {flex: 1, alignSelf: 'flex-end'},
|
|
119
101
|
main: {
|
|
120
|
-
|
|
121
|
-
justifyContent: 'space-evenly',
|
|
102
|
+
paddingVertical: '8%',
|
|
122
103
|
marginHorizontal: '8%',
|
|
123
|
-
|
|
104
|
+
display: 'flex',
|
|
105
|
+
justifyContent: 'space-evenly',
|
|
106
|
+
flexGrow: 1,
|
|
124
107
|
},
|
|
125
108
|
nav: {
|
|
126
109
|
flex: 1,
|