Skip to content

Commit

Permalink
0.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
smallpath committed Jun 19, 2017
1 parent e3dd1d9 commit b00d31d
Show file tree
Hide file tree
Showing 13 changed files with 60 additions and 23 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Psnine第三方安卓客户端, 基于React Native, 支持安卓5.0及以上系
- 支持登录、签到、用户中心、用户游戏、留言板和用户圈子
- 支持奖杯列表、奖杯TIP和奖杯评分
- 支持用户收藏、发布、圈子、图床、图片上传、明细、个性化和修改密码
- 支持主题的切换, 包括首页布局和19种主题颜色, 以及对应的强调色和夜间主题
- 支持主题的切换, 可以切换首页布局和19种主题颜色, 以及对应的强调色和夜间主题

# Download
> [https://fir.im/mf24](https://fir.im/mf24)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "psnine",
"version": "0.5.0",
"version": "0.6.0",
"private": true,
"scripts": {
"start": "node node_modules/react-native/local-cli/cli.js start",
Expand Down
1 change: 0 additions & 1 deletion psnine/container/new/NewBattle.js
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,6 @@ export default class NewTopic extends Component {
onSelectionChange={this.onSelectionChange}
blurOnSubmit={true}
numberOfLines={100}
selection={this.state.selection}
ref={ref => this.content = ref}
onChange={({ nativeEvent }) => { this.setState({ content: nativeEvent.text }) }}
value={this.state.content}
Expand Down
3 changes: 1 addition & 2 deletions psnine/container/new/NewGene.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,7 @@ export default class NewTopic extends Component {
keyboardType="default"
returnKeyType='go'
returnKeyLabel='go'
onSelectionChange={this.onSelectionChange}
selection={this.state.selection}
onSelectionChange={this.onSelectionChange}
blurOnSubmit={true}
numberOfLines={100}
ref={ref => this.content = ref}
Expand Down
1 change: 0 additions & 1 deletion psnine/container/new/NewQa.js
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,6 @@ export default class NewTopic extends Component {
returnKeyType='go'
returnKeyLabel='go'
onSelectionChange={this.onSelectionChange}
selection={this.state.selection}
blurOnSubmit={true}
numberOfLines={100}
ref={ref => this.content = ref}
Expand Down
1 change: 0 additions & 1 deletion psnine/container/new/NewTopic.js
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,6 @@ export default class NewTopic extends Component {
returnKeyType='go'
returnKeyLabel='go'
onSelectionChange={this.onSelectionChange}
selection={this.state.selection}
blurOnSubmit={true}
numberOfLines={100}
ref={ref => this.content = ref}
Expand Down
1 change: 0 additions & 1 deletion psnine/container/new/Reply.js
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,6 @@ export default class Reply extends Component {
returnKeyType='go'
returnKeyLabel='go'
onSelectionChange={this.onSelectionChange}
selection={this.state.selection}
blurOnSubmit={true}
numberOfLines={100}
ref={ref => this.content = ref}
Expand Down
8 changes: 4 additions & 4 deletions psnine/container/shared/ImageUploadItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ export default class PhotoItem extends React.PureComponent {
alignSelf: 'flex-start',
alignContent: 'flex-end',
backgroundColor: modeInfo.backgroundColor,
width: ITEM_HEIGHT,
height: ITEM_HEIGHT,
width: SCREEN_WIDTH / 2,
height: SCREEN_WIDTH / 2,
}}>
<TouchableNativeFeedback
onPress={
Expand Down Expand Up @@ -127,8 +127,8 @@ export default class PhotoItem extends React.PureComponent {
}
<Image
source={{ uri: rowData.node.image.uri || rowData.href }}
resizeMethod={'resize'}
style={[styles.avatar, { width: ITEM_HEIGHT - 2, height: ITEM_HEIGHT - 2 }]}
resizeMethod={'scale'}
style={[styles.avatar, { width: SCREEN_WIDTH / 2 - 10, height: SCREEN_WIDTH / 2 - 10 }]}
/>
</View>
</TouchableNativeFeedback>
Expand Down
8 changes: 4 additions & 4 deletions psnine/container/shared/MessageItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ export default class ComplexComment extends React.PureComponent {
background={TouchableNativeFeedback.SelectableBackgroundBorderless()}
>
<View style={{ flex: 1, flexDirection: 'row', padding: 12 }}>
<Image
source={{ uri: rowData.img }}
style={styles.avatar}
/>
{ rowData.avatar && <Image
source={{ uri: rowData.avatar }}
style={styles.avatar}
/> || undefined }
{
this.state.modalVisible && modalList.length && (
<MyDialog modeInfo={modeInfo}
Expand Down
42 changes: 39 additions & 3 deletions psnine/container/user/Custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,32 @@ export default class Custom extends Component {
</View>
)
}
renderTheme = ({ item: rowData, index}) => {
const { modeInfo } = this.props.screenProps
const { ITEM_HEIGHT } = this
const { navigation } = this.props
// console.log(index, rowData)
const topicopen = this.state.data.form.topicopen
return (
<View style={{ flex: 1, padding: 10 }}>
<Button title={'显示主题'} color={topicopen === '0' ? modeInfo.standardColor : modeInfo.standardTextColor}
onPress={() => {
Alert.alert(
'个性设定',
`是否在个人主页中${topicopen === '0' ? '隐藏' : '显示'}主题?`,
[
{text: '取消', style: 'cancel'},
{text: '确定', onPress: () => this.setSetting({
topicopen: topicopen === '0' ? '1' : '0'
})}
]
)
}} style={{
flex: 1
}}/>
</View>
)
}

renderBG = ({ item: rowData, index}) => {
const { modeInfo } = this.props.screenProps
Expand Down Expand Up @@ -233,7 +259,7 @@ export default class Custom extends Component {

let keys = Object.keys(data);

const sections = data.sections ? data.sections.map((item, index) => ({
let sections = data.sections ? data.sections.map((item, index) => ({
key: item,
modeInfo,
data: (() => {
Expand All @@ -256,16 +282,26 @@ export default class Custom extends Component {
text: '自定义头像'
}
]]
} else if (index === 3) {
return [[
{
text: '显示主题'
}
]]
}
})(),
renderItem: [
this.renderBG,
this.renderShow,
this.renderTheme,
this.renderVIP
][index]
})) : []
if (!this.state.data.isVIP) {
sections.length = 1
if (!this.state.data.isVIP && data.sections) {
sections = [
sections[0],
sections[2]
]
}

let NUM_SECTIONS = sections.length
Expand Down
2 changes: 1 addition & 1 deletion psnine/container/user/ImageUpload.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ export default class Photo extends Component {
onEndReachedThreshold={0.5}
extraData={modeInfo}
windowSize={21}
numColumns={3}
numColumns={2}
columnWrapperStyle={{
flex:1
}}
Expand Down
5 changes: 4 additions & 1 deletion psnine/container/user/UserDiary.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ class UserBoard extends Component {
}
})
if (!params.URL) {
params = { ...screenProps.toolbar[2] }
params = {
text: '日志',
URL: screenProps.toolbar[0].url + '/diary'
}
}
this.URL = params.URL
this.preFetch();
Expand Down
7 changes: 5 additions & 2 deletions psnine/container/user/UserTopic.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ class UserGame extends Component {
}
})
if (!params.URL) {
params = { ...screenProps.toolbar[4] }
params = {
text: '主题',
URL: screenProps.toolbar[0].url
}
}
this.URL = params.URL.includes('?page') ? params.URL : `${params.URL}?page=1`
this.fetchMessages(params.URL, 'jump');
Expand Down Expand Up @@ -118,7 +121,7 @@ class UserGame extends Component {
}
componentDidFocus()
});
})
}).catch(err => {})
})
})
}
Expand Down

0 comments on commit b00d31d

Please sign in to comment.