From 2692f5222d692376a8fc764722eb396a2587e312 Mon Sep 17 00:00:00 2001 From: Diego Mello Date: Mon, 19 Nov 2018 16:18:15 -0200 Subject: [PATCH] [FIX] Upload buttons on Android (#541) --- .../main/res/drawable-hdpi/mention_header.png | Bin 0 -> 1386 bytes .../main/res/drawable-mdpi/mention_header.png | Bin 0 -> 792 bytes .../res/drawable-xhdpi/mention_header.png | Bin 0 -> 1835 bytes .../res/drawable-xxhdpi/mention_header.png | Bin 0 -> 3005 bytes .../res/drawable-xxxhdpi/mention_header.png | Bin 0 -> 3848 bytes app/containers/Button/index.js | 12 +-- app/containers/MessageBox/UploadModal.js | 95 +++++++++++++----- app/containers/MessageBox/index.js | 2 +- app/i18n/locales/en.js | 1 + app/i18n/locales/pt-BR.js | 1 + app/views/RoomView/Header/index.js | 29 +++--- .../mention_header.imageset/Contents.json | 23 +++++ .../mention_header.png | Bin 0 -> 792 bytes .../mention_header@2x.png | Bin 0 -> 1835 bytes .../mention_header@3x.png | Bin 0 -> 3005 bytes 15 files changed, 114 insertions(+), 49 deletions(-) create mode 100644 android/app/src/main/res/drawable-hdpi/mention_header.png create mode 100644 android/app/src/main/res/drawable-mdpi/mention_header.png create mode 100644 android/app/src/main/res/drawable-xhdpi/mention_header.png create mode 100644 android/app/src/main/res/drawable-xxhdpi/mention_header.png create mode 100644 android/app/src/main/res/drawable-xxxhdpi/mention_header.png create mode 100644 ios/RocketChatRN/Images.xcassets/Icons/mention_header.imageset/Contents.json create mode 100644 ios/RocketChatRN/Images.xcassets/Icons/mention_header.imageset/mention_header.png create mode 100644 ios/RocketChatRN/Images.xcassets/Icons/mention_header.imageset/mention_header@2x.png create mode 100644 ios/RocketChatRN/Images.xcassets/Icons/mention_header.imageset/mention_header@3x.png diff --git a/android/app/src/main/res/drawable-hdpi/mention_header.png b/android/app/src/main/res/drawable-hdpi/mention_header.png new file mode 100644 index 0000000000000000000000000000000000000000..01cc741aba1fe42dac06d65393003562cf1dc885 GIT binary patch literal 1386 zcmV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nDGO9%JG*B~EeFwqQ6?%ltCh0mAG z0&Y}3II+Kgk3HAbh+Xqi-1KA5$62pmp_mIE^m&UgGXF&WIqiT3L%4lgjT6+Rq7 sf7*}+r;&W8RK9(=?Qrw0u>4x|e`c;}cnN_a8UO$Q07*qoM6N<$f*4z-S^xk5 literal 0 HcmV?d00001 diff --git a/android/app/src/main/res/drawable-mdpi/mention_header.png b/android/app/src/main/res/drawable-mdpi/mention_header.png new file mode 100644 index 0000000000000000000000000000000000000000..f278d456bd888125a7a26a3dd2dbd887f50a3d78 GIT binary patch literal 792 zcmV+z1LypSP)}g2mNq7(ZC28P z(t`)_ALxG|=)r@uDM>3f{ehqef;T}d;z5fiy%id)f=K+4Hr*ZPTX)MQL_1P4>;r$iK&}J{)Erm zqr45hmM=;vPuS`6;O6p+x0QFJEyi8OFAWO`z$OMx=82J1A|$7>_Q)}Om}__y{Z1&& z^2qp6UsMFN4C)M}5zZ#U#K|H|sZ3_%ZQzJGFy+S->kM%CLIYYxLqO36b>?xrJJT@3 zVu3R-5&EU;_5kzk2DH4S)NTCZk}G=34x^!MszP^I1=%D`K%wxkKa67zjG0>X9)H&C ziF;JnhmESPp`E-A@EIr#WOG-j7#77Gm}Xr&ggWOQEce32w{gW+IiFumI9%OSfu_r* z#iDCFF6C69LnC>wwpZ;}Et`I0+e2F_HmkKYg?91}Nw%F_i<)>J3*8dtH~26IHa3=i z24^vRN24pjVvQH*zgjQ&^RP8opa+fNVKh2=Gknr8xtY0l!hqQ9^Ti^^ua2jdG@*J^ zwWCH5TTMN%M3q>i_0Z_(gqWfvA_3$r(X zy}P&FYS&4&=ggTiXTE!8=FFL?sQ*y3)=p>dC(FvjUF?qQ#Y)s-V@|7Kr%Z;&wKLq( zQ1iWrxc_z-nQq5)Iz9JBRy_%D8?{o^O6f(D+mI_5Bm|D_0i4AR=pZnR$g0vt&58T%btGMnV_AizOAm74-f?s zv`0@aTu|{ubh@43U;riFn)9X=;L6lfGYyVo(k5*KT9$P>#2Y*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IDggdTI z^O8N4p;EPnJZJ|g<JjvjycH?R|#M>8^K*4^t|4h5A#U}W8-Mf(*raH9K&O^hCRl{wfXp=EXe(E<&RM-;=#(Ce8exE) z&LcWL@OOYeiBlqj2yr_4ycV?|txp?Z&;U0}p?^bQdPndwHsZK4+}K!q2_Oq59zk1i Z{6FTPV!dbZOSJ$1002ovPDHLkV1f=>e2xGB literal 0 HcmV?d00001 diff --git a/android/app/src/main/res/drawable-xxhdpi/mention_header.png b/android/app/src/main/res/drawable-xxhdpi/mention_header.png new file mode 100644 index 0000000000000000000000000000000000000000..f20b27aea50b911f2490f635995ed1a014534212 GIT binary patch literal 3005 zcmV;u3qtgXP) z6UTe+^gH+NU1sLqUEf{*1V&olnKS2{Ip6%xnK5T`6b>Ig9KUqw+HJNyxk$#uA}W?= zohz1AaizL?!N(gnZk(74Q}}EYlF4M|jZeze(qZeNe>Hw9q?EPziUQ?1obxltJB{B6 z7wl+d1s_Qy5}y^|FPl7LfB{JK4(xwGN~eu6xmik9Rkl?SZ# z`0dj%BC0G}`5b5R@%Ch658^VaoXS@g;B-3kwMi*o1kn3bWnpp7_{ZqtZ*sv;Gl&0+ zae0|>amD48&LSrHElkKSOGmCi7hWToye&+RN(0zGS8)DFGMV_NN{B zMoEBs(wWC$)Kg?wh%N@=J|2th>}cNhc36I?w4UAj@0Ho?69C>2CQB8G-_JXeiKoNz z!)T#~n~Ydy7K}~EE&y#Z^Sm@aZdrUsdrRW2@cijfdj~S#vTgYchQ|G2ngDulRh)NX z8M_viuhOOjoCEtBz|wlE2hPr0-1=dAvf*VtV|G%#>3y4QY5yLp!BVpXfF1$p4O4+G zv=PYb%e8C}EMucAHvgM*1(pnQ%R-rmj^+)_MW{i@R+Da~ivsTI8~j;lH|BhQO?B0G zIv?KrA5-CMr>RUT8#XxuV0(yKO(heF&l{|7CxPxxXEIpAw)r&oizRCw z=c~fj=|GnzCElhYuooV!xuvrGMgdE}$QH5*QGHBfkC59K1sXI!=;_~^awO9SKW1Z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XRWpKlAg1nh` z&)j%D@2-xvzs3@phfShksYj+K&u+?Q87_^UR`{yNx1s=%GAN5OUHN>MbYT+cM3}R4 ze_*)$!2$M-P;gZ_J!~A~l0~lt=it3jA3@ADIbEW~$B%DIy6oP)yXl|Lym$}NuJs=i zrJRm|LkCp%UpRB>_0kYl0U*WTPTW6WzGqd4go`hJ<@2NPQl)Iy#TOd3Sw4vK-dE6FAB`)$DV0i!OI)vf5kNA)Wp*oCgg6g!JgUa& zjZAOl#v)u|L`n*b#g?P1jFiv{5ezh|oXaUv;t59c1+Z{42lGPdF$s)9n|SL{NK$iT4l za7^TtQSQ-6=^s>@?>tbdFjoq_gF|bKt-7Rimxk6lu0DI>>NOhgPykW^f_S`qcxN;K zE0-A>Kvw`(DuF-!#Jgv_J|!*2U3tgryKVqk;qmtIF@B-Qyl0Y_8GH`g5^v~O{8xTg z^`rX18Um0?yx*U{!^XfgoX5f=!L(s`xeO{54I{?lqfJ`3c6227QrFRV8U~O`VIn=M zA7Dfg6Ec}tOWMwSoF8DsuE}&*{h9Q|25_=}cL6Pa539Rlad#ma`706tU9HCBCqVHH zhDW+P+rH-N81=i@+@lc8@doq7%Po913Cq7dQOImm2F60^sJ2nD#r%=Bz@pSbU>tk~ zc^$UmJ4e&{k1BvJpu8rJlbB9k=*E~;aqjH$Me&B=fP1ld(2BkmmRD9X9PIA zIGlGUgExUv2QaQZXW6*YWm(Uj+S0sp{`~olt691H597xH0{;j7-Y=iY1;d2^0000< KMNUMnLSTYF{dGS8 literal 0 HcmV?d00001 diff --git a/app/containers/Button/index.js b/app/containers/Button/index.js index b632abc58..f7d610aa2 100644 --- a/app/containers/Button/index.js +++ b/app/containers/Button/index.js @@ -25,8 +25,7 @@ const styles = StyleSheet.create({ }, text: { fontSize: 18, - textAlign: 'center', - fontWeight: '500' + textAlign: 'center' }, background_primary: { backgroundColor: colors.background_primary @@ -54,7 +53,8 @@ export default class Button extends React.PureComponent { onPress: PropTypes.func, disabled: PropTypes.bool, backgroundColor: PropTypes.string, - loading: PropTypes.bool + loading: PropTypes.bool, + style: PropTypes.any } static defaultProps = { @@ -67,7 +67,7 @@ export default class Button extends React.PureComponent { render() { const { - title, type, onPress, disabled, backgroundColor, loading, ...otherProps + title, type, onPress, disabled, backgroundColor, loading, style, ...otherProps } = this.props; return ( diff --git a/app/containers/MessageBox/UploadModal.js b/app/containers/MessageBox/UploadModal.js index c33eb6b07..aa4ec42e0 100644 --- a/app/containers/MessageBox/UploadModal.js +++ b/app/containers/MessageBox/UploadModal.js @@ -1,6 +1,6 @@ import React, { Component } from 'react'; import { - View, Text, StyleSheet, Image, ScrollView, Platform + View, Text, StyleSheet, Image, ScrollView, Platform, TouchableHighlight } from 'react-native'; import PropTypes from 'prop-types'; import Modal from 'react-native-modal'; @@ -10,20 +10,24 @@ import equal from 'deep-equal'; import TextInput from '../TextInput'; import Button from '../Button'; import I18n from '../../i18n'; +import sharedStyles from '../../views/Styles'; const cancelButtonColor = '#f7f8fa'; const styles = StyleSheet.create({ + modal: { + alignItems: 'center' + }, titleContainer: { flexDirection: 'row', paddingHorizontal: 16, paddingTop: 16 }, title: { - fontWeight: 'bold' + ...sharedStyles.textBold }, container: { - height: Platform.OS === 'ios' ? 404 : 430, + height: 430, backgroundColor: '#ffffff', flexDirection: 'column' }, @@ -43,9 +47,20 @@ const styles = StyleSheet.create({ padding: 16, backgroundColor: '#f7f8fa' }, - buttonMargin: { - margin: 0 + button: { + marginBottom: 0 + }, + androidButton: { + paddingHorizontal: 15, + justifyContent: 'center', + height: 48, + borderRadius: 2 + }, + androidButtonText: { + fontSize: 18, + textAlign: 'center' } + }); @responsive @@ -75,21 +90,65 @@ export default class UploadModal extends Component { return null; } - _submit = () => { + submit = () => { const { file, submit } = this.props; const { name, description } = this.state; submit({ ...file, name, description }); } + renderButtons = () => { + const { close } = this.props; + if (Platform.OS === 'ios') { + return ( + +