Skip to content

Commit

Permalink
v0.6.1
Browse files Browse the repository at this point in the history
- [x] 修复了安卓文字显示不全的问题
- [x] 修复了bgm表情看不全的问题
- [x] 添加了帖子展开引用的设置
  • Loading branch information
czy0729 committed Jun 18, 2019
1 parent 089395b commit b7e2fb6
Show file tree
Hide file tree
Showing 13 changed files with 80 additions and 34 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.MD
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
##CHANGELOG
## CHANGELOG

v0.6.1 - 2019/06/18

- [x] 修复了安卓文字显示不全的问题
- [x] 修复了 bgm 表情看不全的问题
- [x] 添加了帖子展开引用的设置

v0.6 - 2019/06/18

Expand Down
14 changes: 12 additions & 2 deletions components/button.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author: czy0729
* @Date: 2019-03-15 02:32:29
* @Last Modified by: czy0729
* @Last Modified time: 2019-06-02 21:05:24
* @Last Modified time: 2019-06-18 20:53:57
*/
import React from 'react'
import { StyleSheet, View } from 'react-native'
Expand Down Expand Up @@ -54,7 +54,17 @@ const _Button = ({
<ActivityIndicator color='white' size='small' />
</View>
)}
<Text style={_text}>{children}</Text>
<Text
style={[
_text,
size === 'sm' && {
width: 32
}
]}
align='center'
>
{children}
</Text>
</Flex>
)
if (onPress) {
Expand Down
15 changes: 8 additions & 7 deletions components/render-html.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
* @Author: czy0729
* @Date: 2019-04-29 19:54:57
* @Last Modified by: czy0729
* @Last Modified time: 2019-06-17 14:19:06
* @Last Modified time: 2019-06-18 20:22:32
*/
import React from 'react'
import { StyleSheet, View, Image as RNImage, Text } from 'react-native'
import HTML from 'react-native-render-html'
import { systemStore } from '@stores'
import { open } from '@utils'
import { HOST } from '@constants'
import _ from '@styles'
Expand Down Expand Up @@ -108,8 +109,8 @@ export default class RenderHtml extends React.Component {
if (alt.indexOf('(bgm') !== -1) {
const index = parseInt(alt.replace(/\(bgm|\)/g, '')) - 23 // 偏移量
props.style = {
width: 20,
height: 20
width: 16,
height: 16
}
props.source =
parseInt(index) <= 100 ? bgm[index] : { uri: `${HOST}/${src}` }
Expand Down Expand Up @@ -142,7 +143,7 @@ export default class RenderHtml extends React.Component {
</Text>
)}
{_bgmImagesTemp}
<RNImage {...props} />
<RNImage {...props} />{' '}
</Text>
)
}
Expand Down Expand Up @@ -290,7 +291,7 @@ class MaskText extends React.Component {

class QuoteText extends React.Component {
state = {
show: false
show: systemStore.setting.quote || false
}

show = () =>
Expand Down Expand Up @@ -330,8 +331,8 @@ const styles = StyleSheet.create({
backgroundColor: _.colorDesc
},
quoteTextPlaceholder: {
paddingBottom: 8,
marginTop: -8,
paddingBottom: 10,
marginTop: -6,
color: _.colorSub,
textAlign: 'center'
},
Expand Down
19 changes: 12 additions & 7 deletions components/text.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
* @Author: czy0729
* @Date: 2019-03-15 06:11:55
* @Last Modified by: czy0729
* @Last Modified time: 2019-06-17 01:28:52
* @Last Modified time: 2019-06-18 19:49:08
*/
import React from 'react'
import { StyleSheet, Text as RNText } from 'react-native'
import { IOS } from '@constants'
import _ from '@styles'

const Text = ({
Expand Down Expand Up @@ -66,18 +67,22 @@ Text.defaultProps = {
export default Text

const styles = StyleSheet.create({
text: {
fontWeight: 'normal'
},
text: IOS
? {
fontWeight: 'normal'
}
: {},
alignCenter: {
textAlign: 'center'
},
alignRight: {
textAlign: 'right'
},
bold: {
fontWeight: 'bold'
},
bold: IOS
? {
fontWeight: 'bold'
}
: {},
10: _.fontSize(10),
11: _.fontSize(11),
12: _.fontSize(12),
Expand Down
4 changes: 2 additions & 2 deletions constants/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @Author: czy0729
* @Date: 2019-02-22 01:25:31
* @Last Modified by: czy0729
* @Last Modified time: 2019-06-18 01:11:33
* @Last Modified time: 2019-06-18 20:26:49
*/
import { Platform } from 'react-native'
import Constants from 'expo-constants'
Expand All @@ -30,7 +30,7 @@ export const GITHUB_URL = 'https://github.com/czy0729/Bangumi'
export const GITHUB_RELEASE_URL = `${GITHUB_URL}/releases`
export const GITHUB_RELEASE_REPOS_URL =
'https://api.github.com/repos/czy0729/Bangumi/releases'
export const GITHUB_RELEASE_VERSION = '0.6-alpha' // since 20190618
export const GITHUB_RELEASE_VERSION = '0.6.1-alpha' // since 20190618

// 图片
// 白
Expand Down
4 changes: 2 additions & 2 deletions navigations.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
* @Author: czy0729
* @Date: 2019-06-02 14:42:28
* @Last Modified by: czy0729
* @Last Modified time: 2019-06-18 00:35:07
* @Last Modified time: 2019-06-18 20:27:01
*/
export default {
initialRouteName: 'HomeTab' // HomeTab
// initialRouteParams: {
// subjectId: 18007, // 238923 100444 204135
// topicId: 'group/346386', // ep/768491
// topicId: 'group/351138', // ep/768491
// userId: 419012,
// monoId: 'character/7454', // character/70323 person/5745
// type: 'anime',
Expand Down
4 changes: 2 additions & 2 deletions screens/_/eps.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author: czy0729
* @Date: 2019-03-15 02:19:02
* @Last Modified by: czy0729
* @Last Modified time: 2019-06-08 22:12:22
* @Last Modified time: 2019-06-18 19:41:48
*/
import React from 'react'
import { StyleSheet, View } from 'react-native'
Expand Down Expand Up @@ -256,7 +256,7 @@ export default class Eps extends React.Component {
style={[
_style,
{
marginBottom: -this.style.margin // 抵消最后一行的marginBottom
marginBottom: this.style.margin ? -this.style.margin : 0 // 抵消最后一行的marginBottom
}
]}
onLayout={this.onLayout}
Expand Down
10 changes: 8 additions & 2 deletions screens/setting/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author: czy0729
* @Date: 2019-05-24 01:34:26
* @Last Modified by: czy0729
* @Last Modified time: 2019-06-14 22:08:23
* @Last Modified time: 2019-06-18 20:05:04
*/
import React from 'react'
import { ScrollView, AsyncStorage, Alert } from 'react-native'
Expand Down Expand Up @@ -81,7 +81,7 @@ class Setting extends React.Component {
}

render() {
const { quality, cnFirst, autoFetch, speech } = systemStore.setting
const { quality, cnFirst, autoFetch, quote, speech } = systemStore.setting
const data = MODEL_SETTING_QUALITY.data.map(({ label }) => label)
const popoverProps = IOS
? {
Expand Down Expand Up @@ -129,6 +129,12 @@ class Setting extends React.Component {
}
withoutFeedback
/>
<Item
border
hd='帖子展开引用'
ft={<Switch checked={quote} onChange={systemStore.switchQuote} />}
withoutFeedback
/>
<Item
border
hd='Bangumi娘话语'
Expand Down
5 changes: 3 additions & 2 deletions screens/subject/book-ep.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author: czy0729
* @Date: 2019-06-08 22:14:06
* @Last Modified by: czy0729
* @Last Modified time: 2019-06-09 02:34:38
* @Last Modified time: 2019-06-18 20:31:33
*/
import React from 'react'
import { StyleSheet, View } from 'react-native'
Expand Down Expand Up @@ -100,7 +100,8 @@ const styles = StyleSheet.create({
width: 40
},
input: {
width: 80
width: 80,
height: 34
},
btn: {
width: 80,
Expand Down
7 changes: 4 additions & 3 deletions screens/subject/tags.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author: czy0729
* @Date: 2019-03-25 05:52:24
* @Last Modified by: czy0729
* @Last Modified time: 2019-06-08 05:14:56
* @Last Modified time: 2019-06-18 20:33:01
*/
import React from 'react'
import { StyleSheet, View } from 'react-native'
Expand All @@ -25,9 +25,10 @@ const Tags = ({ style }, { $, navigation }) => {
<Flex wrap='wrap'>
{tags
.filter(item => !!item.name)
.map(({ name, count }) => (
.map(({ name, count }, index) => (
<Touchable
key={name}
// eslint-disable-next-line react/no-array-index-key
key={index}
style={[styles.item, tag.includes(name) && styles.selected]}
onPress={() => {
navigation.push('Tag', {
Expand Down
2 changes: 1 addition & 1 deletion screens/topic/item.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author: czy0729
* @Date: 2019-04-30 18:47:12
* @Last Modified by: czy0729
* @Last Modified time: 2019-06-18 00:38:17
* @Last Modified time: 2019-06-18 20:25:01
*/
import React from 'react'
import { StyleSheet, View } from 'react-native'
Expand Down
18 changes: 17 additions & 1 deletion stores/system.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @Author: czy0729
* @Date: 2019-05-17 21:53:14
* @Last Modified by: czy0729
* @Last Modified time: 2019-06-18 11:04:08
* @Last Modified time: 2019-06-18 20:04:59
*/
import { NetInfo } from 'react-native'
import { observable, computed } from 'mobx'
Expand All @@ -17,6 +17,7 @@ const initSetting = {
quality: MODEL_SETTING_QUALITY.getValue('默认'), // 图片质量
cnFirst: true, // 是否中文优先
autoFetch: true, // 切换页面自动请求
quote: true, // 帖子展开引用
speech: true // Bangumi娘话语
}
const initRelease = {
Expand Down Expand Up @@ -172,6 +173,21 @@ class System extends store {
this.setStorage(key, undefined, namespace)
}

/**
* 切换`帖子展开引用`
*/
switchQuote = () => {
const { quote } = this.setting
const key = 'setting'
this.setState({
[key]: {
...this.setting,
quote: !quote
}
})
this.setStorage(key, undefined, namespace)
}

/**
* 切换`Bangumi娘话语`
*/
Expand Down
4 changes: 2 additions & 2 deletions styles/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @Author: czy0729
* @Date: 2019-03-14 06:02:03
* @Last Modified by: czy0729
* @Last Modified time: 2019-06-17 01:26:39
* @Last Modified time: 2019-06-18 19:53:29
*/
import { Dimensions, StyleSheet } from 'react-native'
import Constants from 'expo-constants'
Expand Down Expand Up @@ -53,7 +53,7 @@ export const colorDanger = 'rgb(232, 8, 13)'
export const colorWait = 'rgb(200, 200, 200)'
export const colorDisabled = 'rgb(150, 150, 150)'
export const colorBorder = 'rgb(222, 222, 222)'
export const colorBg = 'rgb(248, 248, 248)'
export const colorBg = 'rgb(240, 240, 240)'
export const colorPlaceholder = 'rgb(250, 250, 250)'
export const colorHighLight = 'rgba(0, 0, 0, 0.16)'
export const colorShadow = 'rgb(0, 0, 0)'
Expand Down

0 comments on commit b7e2fb6

Please sign in to comment.