浏览代码

feat(rn,ui) get rid of the gradients

j8
Saúl Ibarra Corretgé 4 年前
父节点
当前提交
2f5ab2757f

+ 0
- 1
android/sdk/src/main/java/org/jitsi/meet/sdk/ReactInstanceManagerHolder.java 查看文件

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

+ 0
- 1
ios/Podfile 查看文件

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

+ 1
- 7
ios/Podfile.lock 查看文件

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

+ 0
- 5
package-lock.json 查看文件

@@ -13956,11 +13956,6 @@
13956 13956
       "resolved": "https://registry.npmjs.org/react-native-keep-awake/-/react-native-keep-awake-4.0.0.tgz",
13957 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 13959
     "react-native-sound": {
13965 13960
       "version": "github:jitsi/react-native-sound#3fe5480fce935e888d5089d94a191c7c7e3aa190",
13966 13961
       "from": "github:jitsi/react-native-sound#3fe5480fce935e888d5089d94a191c7c7e3aa190"

+ 0
- 1
package.json 查看文件

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

+ 2
- 25
react/features/conference/components/native/Conference.js 查看文件

@@ -2,7 +2,6 @@
2 2
 
3 3
 import React from 'react';
4 4
 import { NativeModules, SafeAreaView, StatusBar } from 'react-native';
5
-import LinearGradient from 'react-native-linear-gradient';
6 5
 
7 6
 import { appNavigate } from '../../../app/actions';
8 7
 import { PIP_ENABLED, FULLSCREEN_ENABLED, getFeatureFlag } from '../../../base/flags';
@@ -37,7 +36,7 @@ import type { AbstractProps } from '../AbstractConference';
37 36
 import Labels from './Labels';
38 37
 import LonelyMeetingExperience from './LonelyMeetingExperience';
39 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,17 +237,11 @@ class Conference extends AbstractConference<Props, *> {
238 237
      */
239 238
     _renderContent() {
240 239
         const {
241
-            _aspectRatio,
242 240
             _connecting,
243
-            _filmstripVisible,
244 241
             _largeVideoParticipantId,
245 242
             _reducedUI,
246
-            _shouldDisplayTileView,
247
-            _toolboxVisible
243
+            _shouldDisplayTileView
248 244
         } = this.props;
249
-        const showGradient = _toolboxVisible;
250
-        const applyGradientStretching
251
-            = _filmstripVisible && _aspectRatio === ASPECT_RATIO_NARROW && !_shouldDisplayTileView;
252 245
 
253 246
         if (_reducedUI) {
254 247
             return this._renderContentForReducedUi();
@@ -284,22 +277,6 @@ class Conference extends AbstractConference<Props, *> {
284 277
                     pointerEvents = 'box-none'
285 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 280
                     <Labels />
304 281
 
305 282
                     <Captions onPress = { this._onClick } />

+ 32
- 47
react/features/conference/components/native/NavigationBar.js 查看文件

@@ -1,8 +1,7 @@
1 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 6
 import { getConferenceName } from '../../../base/conference';
8 7
 import { getFeatureFlag, CONFERENCE_TIMER_ENABLED, MEETING_NAME_ENABLED } from '../../../base/flags';
@@ -11,7 +10,8 @@ import { PictureInPictureButton } from '../../../mobile/picture-in-picture';
11 10
 import { isToolboxVisible } from '../../../toolbox/functions.native';
12 11
 import ConferenceTimer from '../ConferenceTimer';
13 12
 
14
-import styles, { NAVBAR_GRADIENT_COLORS } from './styles';
13
+import styles from './styles';
14
+
15 15
 
16 16
 type Props = {
17 17
 
@@ -39,54 +39,39 @@ type Props = {
39 39
 /**
40 40
  * Implements a navigation bar component that is rendered on top of the
41 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 57
             <View
65
-                key = { 2 }
66 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 71
             </View>
86
-        ];
87
-    }
88
-
89
-}
72
+        </View>
73
+    );
74
+};
90 75
 
91 76
 /**
92 77
  * Maps part of the Redux store to the props of this component.

+ 0
- 31
react/features/conference/components/native/styles.js 查看文件

@@ -2,28 +2,13 @@ import { ColorSchemeRegistry, schemeColor } from '../../../base/color-scheme';
2 2
 import { BoxModel, ColorPalette, fixAndroidViewClipping } from '../../../base/styles';
3 3
 import { FILMSTRIP_SIZE } from '../../../filmstrip';
4 4
 
5
-export const NAVBAR_GRADIENT_COLORS = [ '#000000FF', '#00000000' ];
6 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 8
  * The styles of the feature conference.
14 9
  */
15 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 13
      * {@code Conference} style.
29 14
      */
@@ -37,22 +22,6 @@ export default {
37 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 26
      * View that contains the indicators.
58 27
      */

+ 1
- 12
react/features/mobile/incoming-call/components/IncomingCallPage.js 查看文件

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

+ 0
- 13
react/features/mobile/incoming-call/components/styles.js 查看文件

@@ -1,9 +1,5 @@
1 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 3
 const BUTTON_SIZE = 56;
8 4
 
9 5
 const CALLER_AVATAR_BORDER_WIDTH = 3;
@@ -85,15 +81,6 @@ export default createStyleSheet({
85 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 84
     buttonsContainer: {
98 85
         alignItems: 'flex-end',
99 86
         flex: 1,

正在加载...
取消
保存