Selaa lähdekoodia

feat(rn,ui) get rid of the gradients

master
Saúl Ibarra Corretgé 4 vuotta sitten
vanhempi
commit
2f5ab2757f

+ 0
- 1
android/sdk/src/main/java/org/jitsi/meet/sdk/ReactInstanceManagerHolder.java Näytä tiedosto

178
 
178
 
179
         List<ReactPackage> packages
179
         List<ReactPackage> packages
180
             = new ArrayList<>(Arrays.asList(
180
             = new ArrayList<>(Arrays.asList(
181
-                new com.BV.LinearGradient.LinearGradientPackage(),
182
                 new com.calendarevents.CalendarEventsPackage(),
181
                 new com.calendarevents.CalendarEventsPackage(),
183
                 new com.corbt.keepawake.KCKeepAwakePackage(),
182
                 new com.corbt.keepawake.KCKeepAwakePackage(),
184
                 new com.facebook.react.shell.MainReactPackage(),
183
                 new com.facebook.react.shell.MainReactPackage(),

+ 0
- 1
ios/Podfile Näytä tiedosto

61
   pod 'react-native-splash-screen', :path => '../node_modules/react-native-splash-screen'
61
   pod 'react-native-splash-screen', :path => '../node_modules/react-native-splash-screen'
62
   pod 'react-native-webview', :path => '../node_modules/react-native-webview'
62
   pod 'react-native-webview', :path => '../node_modules/react-native-webview'
63
   pod 'react-native-webrtc', :path => '../node_modules/react-native-webrtc'
63
   pod 'react-native-webrtc', :path => '../node_modules/react-native-webrtc'
64
-  pod 'BVLinearGradient', :path => '../node_modules/react-native-linear-gradient'
65
   pod 'RNCAsyncStorage', :path => '../node_modules/@react-native-async-storage/async-storage'
64
   pod 'RNCAsyncStorage', :path => '../node_modules/@react-native-async-storage/async-storage'
66
   pod 'RNDeviceInfo', :path => '../node_modules/react-native-device-info'
65
   pod 'RNDeviceInfo', :path => '../node_modules/react-native-device-info'
67
   pod 'RNGoogleSignin', :path => '../node_modules/@react-native-community/google-signin'
66
   pod 'RNGoogleSignin', :path => '../node_modules/@react-native-community/google-signin'

+ 1
- 7
ios/Podfile.lock Näytä tiedosto

5
   - AppAuth/Core (1.2.0)
5
   - AppAuth/Core (1.2.0)
6
   - AppAuth/ExternalUserAgent (1.2.0)
6
   - AppAuth/ExternalUserAgent (1.2.0)
7
   - boost-for-react-native (1.63.0)
7
   - boost-for-react-native (1.63.0)
8
-  - BVLinearGradient (2.5.6):
9
-    - React
10
   - CocoaLumberjack (3.5.3):
8
   - CocoaLumberjack (3.5.3):
11
     - CocoaLumberjack/Core (= 3.5.3)
9
     - CocoaLumberjack/Core (= 3.5.3)
12
   - CocoaLumberjack/Core (3.5.3)
10
   - CocoaLumberjack/Core (3.5.3)
371
   - Yoga (1.14.0)
369
   - Yoga (1.14.0)
372
 
370
 
373
 DEPENDENCIES:
371
 DEPENDENCIES:
374
-  - BVLinearGradient (from `../node_modules/react-native-linear-gradient`)
375
   - CocoaLumberjack (~> 3.5.3)
372
   - CocoaLumberjack (~> 3.5.3)
376
   - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
373
   - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
377
   - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector/`)
374
   - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector/`)
442
     - PromisesObjC
439
     - PromisesObjC
443
 
440
 
444
 EXTERNAL SOURCES:
441
 EXTERNAL SOURCES:
445
-  BVLinearGradient:
446
-    :path: "../node_modules/react-native-linear-gradient"
447
   DoubleConversion:
442
   DoubleConversion:
448
     :podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec"
443
     :podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec"
449
   FBLazyVector:
444
   FBLazyVector:
526
 SPEC CHECKSUMS:
521
 SPEC CHECKSUMS:
527
   AppAuth: bce82c76043657c99d91e7882e8a9e1a93650cd4
522
   AppAuth: bce82c76043657c99d91e7882e8a9e1a93650cd4
528
   boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
523
   boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
529
-  BVLinearGradient: e3aad03778a456d77928f594a649e96995f1c872
530
   CocoaLumberjack: 2f44e60eb91c176d471fdba43b9e3eae6a721947
524
   CocoaLumberjack: 2f44e60eb91c176d471fdba43b9e3eae6a721947
531
   DoubleConversion: 5805e889d232975c086db112ece9ed034df7a0b2
525
   DoubleConversion: 5805e889d232975c086db112ece9ed034df7a0b2
532
   FBLazyVector: ca7f56c8ff6cd8590f7a673d7903b06019805581
526
   FBLazyVector: ca7f56c8ff6cd8590f7a673d7903b06019805581
584
   RNWatch: a5320c959c75e72845c07985f3e935e58998f1d3
578
   RNWatch: a5320c959c75e72845c07985f3e935e58998f1d3
585
   Yoga: 96b469c5e81ff51b917b92e8c3390642d4ded30c
579
   Yoga: 96b469c5e81ff51b917b92e8c3390642d4ded30c
586
 
580
 
587
-PODFILE CHECKSUM: 5be5132e41831a98362eeed760558227a4df89ae
581
+PODFILE CHECKSUM: d059cebf82da14a53940a16c24c3330752d4b0c8
588
 
582
 
589
 COCOAPODS: 1.10.1
583
 COCOAPODS: 1.10.1

+ 0
- 5
package-lock.json Näytä tiedosto

13956
       "resolved": "https://registry.npmjs.org/react-native-keep-awake/-/react-native-keep-awake-4.0.0.tgz",
13956
       "resolved": "https://registry.npmjs.org/react-native-keep-awake/-/react-native-keep-awake-4.0.0.tgz",
13957
       "integrity": "sha512-0Fotox+eLXQooeibVs3P60yASYUWjtRw9MZNmbuHt5UZQrgUrAKsE4jm7gTr4tPU1m1RkwGzcgUFpcOkh/ec7g=="
13957
       "integrity": "sha512-0Fotox+eLXQooeibVs3P60yASYUWjtRw9MZNmbuHt5UZQrgUrAKsE4jm7gTr4tPU1m1RkwGzcgUFpcOkh/ec7g=="
13958
     },
13958
     },
13959
-    "react-native-linear-gradient": {
13960
-      "version": "2.5.6",
13961
-      "resolved": "https://registry.npmjs.org/react-native-linear-gradient/-/react-native-linear-gradient-2.5.6.tgz",
13962
-      "integrity": "sha512-HDwEaXcQIuXXCV70O+bK1rizFong3wj+5Q/jSyifKFLg0VWF95xh8XQgfzXwtq0NggL9vNjPKXa016KuFu+VFg=="
13963
-    },
13964
     "react-native-sound": {
13959
     "react-native-sound": {
13965
       "version": "github:jitsi/react-native-sound#3fe5480fce935e888d5089d94a191c7c7e3aa190",
13960
       "version": "github:jitsi/react-native-sound#3fe5480fce935e888d5089d94a191c7c7e3aa190",
13966
       "from": "github:jitsi/react-native-sound#3fe5480fce935e888d5089d94a191c7c7e3aa190"
13961
       "from": "github:jitsi/react-native-sound#3fe5480fce935e888d5089d94a191c7c7e3aa190"

+ 0
- 1
package.json Näytä tiedosto

76
     "react-native-device-info": "8.0.0",
76
     "react-native-device-info": "8.0.0",
77
     "react-native-immersive": "2.0.0",
77
     "react-native-immersive": "2.0.0",
78
     "react-native-keep-awake": "4.0.0",
78
     "react-native-keep-awake": "4.0.0",
79
-    "react-native-linear-gradient": "2.5.6",
80
     "react-native-sound": "github:jitsi/react-native-sound#3fe5480fce935e888d5089d94a191c7c7e3aa190",
79
     "react-native-sound": "github:jitsi/react-native-sound#3fe5480fce935e888d5089d94a191c7c7e3aa190",
81
     "react-native-splash-screen": "3.2.0",
80
     "react-native-splash-screen": "3.2.0",
82
     "react-native-svg": "12.1.0",
81
     "react-native-svg": "12.1.0",

+ 2
- 25
react/features/conference/components/native/Conference.js Näytä tiedosto

2
 
2
 
3
 import React from 'react';
3
 import React from 'react';
4
 import { NativeModules, SafeAreaView, StatusBar } from 'react-native';
4
 import { NativeModules, SafeAreaView, StatusBar } from 'react-native';
5
-import LinearGradient from 'react-native-linear-gradient';
6
 
5
 
7
 import { appNavigate } from '../../../app/actions';
6
 import { appNavigate } from '../../../app/actions';
8
 import { PIP_ENABLED, FULLSCREEN_ENABLED, getFeatureFlag } from '../../../base/flags';
7
 import { PIP_ENABLED, FULLSCREEN_ENABLED, getFeatureFlag } from '../../../base/flags';
37
 import Labels from './Labels';
36
 import Labels from './Labels';
38
 import LonelyMeetingExperience from './LonelyMeetingExperience';
37
 import LonelyMeetingExperience from './LonelyMeetingExperience';
39
 import NavigationBar from './NavigationBar';
38
 import NavigationBar from './NavigationBar';
40
-import styles, { NAVBAR_GRADIENT_COLORS } from './styles';
39
+import styles from './styles';
41
 
40
 
42
 
41
 
43
 /**
42
 /**
238
      */
237
      */
239
     _renderContent() {
238
     _renderContent() {
240
         const {
239
         const {
241
-            _aspectRatio,
242
             _connecting,
240
             _connecting,
243
-            _filmstripVisible,
244
             _largeVideoParticipantId,
241
             _largeVideoParticipantId,
245
             _reducedUI,
242
             _reducedUI,
246
-            _shouldDisplayTileView,
247
-            _toolboxVisible
243
+            _shouldDisplayTileView
248
         } = this.props;
244
         } = this.props;
249
-        const showGradient = _toolboxVisible;
250
-        const applyGradientStretching
251
-            = _filmstripVisible && _aspectRatio === ASPECT_RATIO_NARROW && !_shouldDisplayTileView;
252
 
245
 
253
         if (_reducedUI) {
246
         if (_reducedUI) {
254
             return this._renderContentForReducedUi();
247
             return this._renderContentForReducedUi();
284
                     pointerEvents = 'box-none'
277
                     pointerEvents = 'box-none'
285
                     style = { styles.toolboxAndFilmstripContainer }>
278
                     style = { styles.toolboxAndFilmstripContainer }>
286
 
279
 
287
-                    { showGradient && <LinearGradient
288
-                        colors = { NAVBAR_GRADIENT_COLORS }
289
-                        end = {{
290
-                            x: 0.0,
291
-                            y: 0.0
292
-                        }}
293
-                        pointerEvents = 'none'
294
-                        start = {{
295
-                            x: 0.0,
296
-                            y: 1.0
297
-                        }}
298
-                        style = { [
299
-                            styles.bottomGradient,
300
-                            applyGradientStretching ? styles.gradientStretchBottom : undefined
301
-                        ] } />}
302
-
303
                     <Labels />
280
                     <Labels />
304
 
281
 
305
                     <Captions onPress = { this._onClick } />
282
                     <Captions onPress = { this._onClick } />

+ 32
- 47
react/features/conference/components/native/NavigationBar.js Näytä tiedosto

1
 // @flow
1
 // @flow
2
 
2
 
3
-import React, { Component } from 'react';
4
-import { SafeAreaView, Text, View } from 'react-native';
5
-import LinearGradient from 'react-native-linear-gradient';
3
+import React from 'react';
4
+import { Text, View } from 'react-native';
6
 
5
 
7
 import { getConferenceName } from '../../../base/conference';
6
 import { getConferenceName } from '../../../base/conference';
8
 import { getFeatureFlag, CONFERENCE_TIMER_ENABLED, MEETING_NAME_ENABLED } from '../../../base/flags';
7
 import { getFeatureFlag, CONFERENCE_TIMER_ENABLED, MEETING_NAME_ENABLED } from '../../../base/flags';
11
 import { isToolboxVisible } from '../../../toolbox/functions.native';
10
 import { isToolboxVisible } from '../../../toolbox/functions.native';
12
 import ConferenceTimer from '../ConferenceTimer';
11
 import ConferenceTimer from '../ConferenceTimer';
13
 
12
 
14
-import styles, { NAVBAR_GRADIENT_COLORS } from './styles';
13
+import styles from './styles';
14
+
15
 
15
 
16
 type Props = {
16
 type Props = {
17
 
17
 
39
 /**
39
 /**
40
  * Implements a navigation bar component that is rendered on top of the
40
  * Implements a navigation bar component that is rendered on top of the
41
  * conference screen.
41
  * conference screen.
42
+ *
43
+ * @param {Props} props - The React props passed to this component.
44
+ * @returns {React.Node}
42
  */
45
  */
43
-class NavigationBar extends Component<Props> {
44
-    /**
45
-     * Implements {@Component#render}.
46
-     *
47
-     * @inheritdoc
48
-     */
49
-    render() {
50
-        if (!this.props._visible) {
51
-            return null;
52
-        }
46
+const NavigationBar = (props: Props) => {
47
+    if (!props._visible) {
48
+        return null;
49
+    }
53
 
50
 
54
-        return [
55
-            <LinearGradient
56
-                colors = { NAVBAR_GRADIENT_COLORS }
57
-                key = { 1 }
58
-                pointerEvents = 'none'
59
-                style = { styles.gradient }>
60
-                <SafeAreaView>
61
-                    <View style = { styles.gradientStretchTop } />
62
-                </SafeAreaView>
63
-            </LinearGradient>,
51
+    return (
52
+        <View
53
+            pointerEvents = 'box-none'
54
+            style = { styles.navBarWrapper }>
55
+            <PictureInPictureButton
56
+                styles = { styles.navBarButton } />
64
             <View
57
             <View
65
-                key = { 2 }
66
                 pointerEvents = 'box-none'
58
                 pointerEvents = 'box-none'
67
-                style = { styles.navBarWrapper }>
68
-                <PictureInPictureButton
69
-                    styles = { styles.navBarButton } />
70
-                <View
71
-                    pointerEvents = 'box-none'
72
-                    style = { styles.roomNameWrapper }>
73
-                    {
74
-                        this.props._meetingNameEnabled
75
-                        && <Text
76
-                            numberOfLines = { 1 }
77
-                            style = { styles.roomName }>
78
-                            { this.props._meetingName }
79
-                        </Text>
80
-                    }
81
-                    {
82
-                        this.props._conferenceTimerEnabled && <ConferenceTimer />
83
-                    }
84
-                </View>
59
+                style = { styles.roomNameWrapper }>
60
+                {
61
+                    props._meetingNameEnabled
62
+                    && <Text
63
+                        numberOfLines = { 1 }
64
+                        style = { styles.roomName }>
65
+                        { props._meetingName }
66
+                    </Text>
67
+                }
68
+                {
69
+                    props._conferenceTimerEnabled && <ConferenceTimer />
70
+                }
85
             </View>
71
             </View>
86
-        ];
87
-    }
88
-
89
-}
72
+        </View>
73
+    );
74
+};
90
 
75
 
91
 /**
76
 /**
92
  * Maps part of the Redux store to the props of this component.
77
  * Maps part of the Redux store to the props of this component.

+ 0
- 31
react/features/conference/components/native/styles.js Näytä tiedosto

2
 import { BoxModel, ColorPalette, fixAndroidViewClipping } from '../../../base/styles';
2
 import { BoxModel, ColorPalette, fixAndroidViewClipping } from '../../../base/styles';
3
 import { FILMSTRIP_SIZE } from '../../../filmstrip';
3
 import { FILMSTRIP_SIZE } from '../../../filmstrip';
4
 
4
 
5
-export const NAVBAR_GRADIENT_COLORS = [ '#000000FF', '#00000000' ];
6
 export const INSECURE_ROOM_NAME_LABEL_COLOR = ColorPalette.warning;
5
 export const INSECURE_ROOM_NAME_LABEL_COLOR = ColorPalette.warning;
7
 
6
 
8
-// From brand guideline
9
-const BOTTOM_GRADIENT_HEIGHT = 290;
10
-const DEFAULT_GRADIENT_SIZE = 140;
11
-
12
 /**
7
 /**
13
  * The styles of the feature conference.
8
  * The styles of the feature conference.
14
  */
9
  */
15
 export default {
10
 export default {
16
 
11
 
17
-    bottomGradient: {
18
-        bottom: 0,
19
-        flexDirection: 'column',
20
-        justifyContent: 'flex-end',
21
-        minHeight: DEFAULT_GRADIENT_SIZE,
22
-        left: 0,
23
-        position: 'absolute',
24
-        right: 0
25
-    },
26
-
27
     /**
12
     /**
28
      * {@code Conference} style.
13
      * {@code Conference} style.
29
      */
14
      */
37
         margin: 10
22
         margin: 10
38
     },
23
     },
39
 
24
 
40
-    gradient: {
41
-        position: 'absolute',
42
-        top: 0,
43
-        left: 0,
44
-        right: 0,
45
-        flex: 1
46
-    },
47
-
48
-    gradientStretchBottom: {
49
-        height: BOTTOM_GRADIENT_HEIGHT
50
-    },
51
-
52
-    gradientStretchTop: {
53
-        height: DEFAULT_GRADIENT_SIZE
54
-    },
55
-
56
     /**
25
     /**
57
      * View that contains the indicators.
26
      * View that contains the indicators.
58
      */
27
      */

+ 1
- 12
react/features/mobile/incoming-call/components/IncomingCallPage.js Näytä tiedosto

2
 
2
 
3
 import React, { Component } from 'react';
3
 import React, { Component } from 'react';
4
 import { Image, Text, View } from 'react-native';
4
 import { Image, Text, View } from 'react-native';
5
-import LinearGradient from 'react-native-linear-gradient';
6
 
5
 
7
 import { Avatar } from '../../../base/avatar';
6
 import { Avatar } from '../../../base/avatar';
8
 import { translate } from '../../../base/i18n';
7
 import { translate } from '../../../base/i18n';
10
 
9
 
11
 import AnswerButton from './AnswerButton';
10
 import AnswerButton from './AnswerButton';
12
 import DeclineButton from './DeclineButton';
11
 import DeclineButton from './DeclineButton';
13
-import styles, {
14
-    AVATAR_BORDER_GRADIENT,
15
-    BACKGROUND_OVERLAY_GRADIENT,
16
-    CALLER_AVATAR_SIZE
17
-} from './styles';
12
+import styles, { CALLER_AVATAR_SIZE } from './styles';
18
 
13
 
19
 /**
14
 /**
20
  * The type of React {@code Component} props of {@link IncomingCallPage}.
15
  * The type of React {@code Component} props of {@link IncomingCallPage}.
66
                         source = {{ uri: this.props._callerAvatarURL }}
61
                         source = {{ uri: this.props._callerAvatarURL }}
67
                         style = { styles.backgroundAvatarImage } />
62
                         style = { styles.backgroundAvatarImage } />
68
                 </View>
63
                 </View>
69
-                <LinearGradient
70
-                    colors = { BACKGROUND_OVERLAY_GRADIENT }
71
-                    style = { styles.backgroundOverlayGradient } />
72
                 <Text style = { styles.title }>
64
                 <Text style = { styles.title }>
73
                     { callTitle }
65
                     { callTitle }
74
                 </Text>
66
                 </Text>
124
     _renderCallerAvatar() {
116
     _renderCallerAvatar() {
125
         return (
117
         return (
126
             <View style = { styles.avatarContainer }>
118
             <View style = { styles.avatarContainer }>
127
-                <LinearGradient
128
-                    colors = { AVATAR_BORDER_GRADIENT }
129
-                    style = { styles.avatarBorder } />
130
                 <View style = { styles.avatar }>
119
                 <View style = { styles.avatar }>
131
                     <Avatar
120
                     <Avatar
132
                         size = { CALLER_AVATAR_SIZE }
121
                         size = { CALLER_AVATAR_SIZE }

+ 0
- 13
react/features/mobile/incoming-call/components/styles.js Näytä tiedosto

1
 import { ColorPalette, createStyleSheet } from '../../../base/styles';
1
 import { ColorPalette, createStyleSheet } from '../../../base/styles';
2
 
2
 
3
-export const AVATAR_BORDER_GRADIENT = [ '#4C9AFF', '#0052CC' ];
4
-
5
-export const BACKGROUND_OVERLAY_GRADIENT = [ '#0052CC', '#4C9AFF' ];
6
-
7
 const BUTTON_SIZE = 56;
3
 const BUTTON_SIZE = 56;
8
 
4
 
9
 const CALLER_AVATAR_BORDER_WIDTH = 3;
5
 const CALLER_AVATAR_BORDER_WIDTH = 3;
85
         flex: 1
81
         flex: 1
86
     },
82
     },
87
 
83
 
88
-    backgroundOverlayGradient: {
89
-        bottom: 0,
90
-        left: 0,
91
-        opacity: 0.9,
92
-        position: 'absolute',
93
-        right: 0,
94
-        top: 0
95
-    },
96
-
97
     buttonsContainer: {
84
     buttonsContainer: {
98
         alignItems: 'flex-end',
85
         alignItems: 'flex-end',
99
         flex: 1,
86
         flex: 1,

Loading…
Peruuta
Tallenna