Authored by 于良

导航背景色优化 review by 草莓

... ... @@ -149,7 +149,7 @@ export default function community(platform) {
store.dispatch(setChannel(this.props.channel));
store.dispatch(mergeCachedPosting());
let navBarStyle = this.contanerIsYohoBuy() ? null : {backgroundColor: 'white',};
let navBarStyle = {backgroundColor: 'white',};
let extraTitleStyle = this.contanerIsYohoBuy() ? null : {color: 'black',};
let backImage = this.contanerIsYohoBuy() ? require('./images/home/menu_back1.png') : require('./images/home/menu_back2.png');
... ...
... ... @@ -81,10 +81,10 @@ const styles = StyleSheet.create({
}),
left: 0,
right: 0,
backgroundColor: 'transparent',
backgroundColor: 'white',
},
header: {
backgroundColor: 'transparent',
backgroundColor: 'white',
paddingTop: 0,
top: 0,
...Platform.select({
... ... @@ -496,6 +496,12 @@ class NavBar extends React.Component {
this.props.renderTitle;
let channel = this.props.getChannel();
let opacityStyle = null;
if (channel == 2 || channel == 3 || channel == 4) {
opacityStyle = {opacity: 0.85};
}
// yoho
if (channel == 5) {
return (
... ... @@ -521,6 +527,7 @@ class NavBar extends React.Component {
this.props.navigationBarStyle,
state.navigationBarStyle,
selected.navigationBarStyle,
opacityStyle,
]}
>
<Image
... ...
... ... @@ -166,6 +166,13 @@ class UserNavBar extends React.Component {
outputRange: [0, 1],
extrapolate: 'clamp'
});
let channel = this.props.channel;
if (channel == 2 || channel == 3 || channel == 4) {
interpolatedOpacity = interpolatedOpacity > 0.85 ? 0.85 : interpolatedOpacity;
}
return (
<Animated.View
ref={(c) => {
... ... @@ -173,14 +180,14 @@ class UserNavBar extends React.Component {
}}
style={[
styles.header,
{backgroundColor: interpolatedColor}
{backgroundColor: interpolatedColor},
]}
>
<Animated.Image
ref={(c) => {
this.image = c;
}}
source={this.getNavBarBackgroundImage(this.props.channel)}
source={this.getNavBarBackgroundImage(channel)}
style={[styles.image, {opacity: interpolatedOpacity}]}
>
... ...