浏览代码

fix: bring back the add meeting URL button

Brings back the button for generating meeting URLs for calendar events.
master
paweldomas 6 年前
父节点
当前提交
e4c5968459

+ 23
- 1
react/features/base/react/components/native/NavigateSectionListItem.js 查看文件

@@ -8,6 +8,7 @@ import { ColorPalette } from '../../../styles';
8 8
 import type { Item } from '../../Types';
9 9
 
10 10
 import AvatarListItem from './AvatarListItem';
11
+import Container from './Container';
11 12
 import Text from './Text';
12 13
 import styles from './styles';
13 14
 
@@ -92,6 +93,24 @@ export default class NavigateSectionListItem extends Component<Props> {
92 93
         return lines && lines.length ? lines.map(this._renderItemLine) : null;
93 94
     }
94 95
 
96
+    /**
97
+     * Renders the secondary action label.
98
+     *
99
+     * @private
100
+     * @returns {React$Node}
101
+     */
102
+    _renderSecondaryAction() {
103
+        const { secondaryAction } = this.props;
104
+
105
+        return (
106
+            <Container
107
+                onClick = { secondaryAction }
108
+                style = { styles.secondaryActionContainer }>
109
+                <Text style = { styles.secondaryActionLabel }>+</Text>
110
+            </Container>
111
+        );
112
+    }
113
+
95 114
     /**
96 115
      * Renders the content of this component.
97 116
      *
@@ -124,7 +143,10 @@ export default class NavigateSectionListItem extends Component<Props> {
124 143
                 right = { right }>
125 144
                 <AvatarListItem
126 145
                     item = { item }
127
-                    onPress = { this.props.onPress } />
146
+                    onPress = { this.props.onPress } >
147
+                    { this.props.secondaryAction
148
+                            && this._renderSecondaryAction() }
149
+                </AvatarListItem>
128 150
             </Swipeout>
129 151
         );
130 152
     }

+ 16
- 0
react/features/base/react/components/native/styles.js 查看文件

@@ -3,6 +3,7 @@
3 3
 import { BoxModel, ColorPalette, createStyleSheet } from '../../../styles';
4 4
 
5 5
 const OVERLAY_FONT_COLOR = 'rgba(255, 255, 255, 0.6)';
6
+const SECONDARY_ACTION_BUTTON_SIZE = 30;
6 7
 
7 8
 export const AVATAR_SIZE = 65;
8 9
 export const UNDERLAY_COLOR = 'rgba(255, 255, 255, 0.2)';
@@ -182,6 +183,21 @@ const SECTION_LIST_STYLES = {
182 183
         color: OVERLAY_FONT_COLOR
183 184
     },
184 185
 
186
+    secondaryActionContainer: {
187
+        alignItems: 'center',
188
+        backgroundColor: ColorPalette.blue,
189
+        borderRadius: 3,
190
+        height: SECONDARY_ACTION_BUTTON_SIZE,
191
+        justifyContent: 'center',
192
+        margin: BoxModel.margin * 0.5,
193
+        marginRight: BoxModel.margin,
194
+        width: SECONDARY_ACTION_BUTTON_SIZE
195
+    },
196
+
197
+    secondaryActionLabel: {
198
+        color: ColorPalette.white
199
+    },
200
+
185 201
     touchableView: {
186 202
         flexDirection: 'row'
187 203
     }

正在加载...
取消
保存