diff --git a/index.js b/index.js index 37c5715..17fa06b 100644 --- a/index.js +++ b/index.js @@ -39,6 +39,10 @@ function loginByAccount() { // hide top bar for android drawBehind: true, animate: true + }, + statusBar: { + backgroundColor: 'white', + style: 'dark' } } } @@ -67,6 +71,10 @@ function loginByPassword() { // hide bottom tab for android drawBehind: true, animate: true + }, + statusBar: { + backgroundColor: 'white', + style: 'dark' } }, passProps: { @@ -109,11 +117,6 @@ Navigation.events().registerAppLaunchedListener(async () => { Push.init((msg) => { console.log("push init: " + msg); - Push.setAccount("12", (msg) => { - console.log("push setAccount:", JSON.stringify(msg)) - }) - - Push.addReceiveNotificationListener(() => {}); }) }); diff --git a/src/page/AboutPage.js b/src/page/AboutPage.js index c8a628f..e680f2c 100644 --- a/src/page/AboutPage.js +++ b/src/page/AboutPage.js @@ -31,6 +31,10 @@ export default class AboutPage extends Component { title: { text: '关于' } + }, + statusBar: { + backgroundColor: 'white', + style: 'dark' } }; } diff --git a/src/page/DiaryDetailPage.js b/src/page/DiaryDetailPage.js index edbcc40..289deb7 100644 --- a/src/page/DiaryDetailPage.js +++ b/src/page/DiaryDetailPage.js @@ -64,7 +64,11 @@ export default class DiaryDetailPage extends Component { } return { - topBar + topBar, + statusBar: { + backgroundColor: 'white', + style: 'dark' + } }; } diff --git a/src/page/EmptyPage.js b/src/page/EmptyPage.js index 9a2db8c..02951a1 100644 --- a/src/page/EmptyPage.js +++ b/src/page/EmptyPage.js @@ -12,6 +12,15 @@ export default class EmptyPage extends Component { } } + static options(passProps) { + return { + statusBar: { + backgroundColor: 'white', + style: 'dark' + } + }; + } + componentDidMount() { this.navigationEventListener = Navigation.events().bindComponent(this); } diff --git a/src/page/FeedbackPage.js b/src/page/FeedbackPage.js index 15aa8a0..b9aa9f9 100644 --- a/src/page/FeedbackPage.js +++ b/src/page/FeedbackPage.js @@ -30,6 +30,10 @@ export default class FeedbackPage extends Component { title: { text: '意见反馈' } + }, + statusBar: { + backgroundColor: 'white', + style: 'dark' } }; } diff --git a/src/page/FollowPage.js b/src/page/FollowPage.js index 494a98e..19d0074 100644 --- a/src/page/FollowPage.js +++ b/src/page/FollowPage.js @@ -31,6 +31,10 @@ export default class FollowPage extends Component { color: Color.primary // android }] + }, + statusBar: { + backgroundColor: 'white', + style: 'dark' } }; } diff --git a/src/page/FollowUserPage.js b/src/page/FollowUserPage.js index f9ff832..cd31998 100644 --- a/src/page/FollowUserPage.js +++ b/src/page/FollowUserPage.js @@ -36,6 +36,10 @@ export default class FollowUserPage extends Component { title: { text: '关注用户' } + }, + statusBar: { + backgroundColor: 'white', + style: 'dark' } }; } diff --git a/src/page/HomePage.js b/src/page/HomePage.js index 404b684..28ecb5e 100644 --- a/src/page/HomePage.js +++ b/src/page/HomePage.js @@ -8,7 +8,8 @@ import { Animated, Modal, TouchableWithoutFeedback, - InteractionManager + InteractionManager, + StatusBar } from 'react-native'; import {Navigation} from 'react-native-navigation'; import {Button} from 'react-native-elements'; @@ -24,6 +25,15 @@ import HomeDiaryData from '../dataLoader/homeDiaryData'; export default class HomePage extends Component { + static options(passProps) { + return { + statusBar: { + backgroundColor: 'white', + style: 'dark' + } + }; + } + constructor(props) { super(props); this.dataSource = new HomeDiaryData(); diff --git a/src/page/NotebookDetailPage.js b/src/page/NotebookDetailPage.js index ff3121c..d58d1e5 100644 --- a/src/page/NotebookDetailPage.js +++ b/src/page/NotebookDetailPage.js @@ -33,6 +33,11 @@ export default class NotebookDetailPage extends Component { return { topBar + , + statusBar: { + backgroundColor: 'white', + style: 'dark' + } }; } diff --git a/src/page/NotebookEditPage.js b/src/page/NotebookEditPage.js index 07ab44e..7db43d0 100644 --- a/src/page/NotebookEditPage.js +++ b/src/page/NotebookEditPage.js @@ -64,6 +64,10 @@ export default class NotebookEditPage extends Component { // hide bottom tab for android drawBehind: true, animate: true + }, + statusBar: { + backgroundColor: 'white', + style: 'dark' } }; } diff --git a/src/page/NotificationHistoryPage.js b/src/page/NotificationHistoryPage.js index 3204295..31c80fb 100644 --- a/src/page/NotificationHistoryPage.js +++ b/src/page/NotificationHistoryPage.js @@ -21,6 +21,10 @@ export default class NotificationHistoryPage extends Component { title: { text: '提醒历史' } + }, + statusBar: { + backgroundColor: 'white', + style: 'dark' } }; } diff --git a/src/page/NotificationPage.js b/src/page/NotificationPage.js index 7cf9be6..29f037f 100644 --- a/src/page/NotificationPage.js +++ b/src/page/NotificationPage.js @@ -30,6 +30,10 @@ export default class NotificationPage extends Component { color: Color.primary // android }] + }, + statusBar: { + backgroundColor: 'white', + style: 'dark' } }; } diff --git a/src/page/PasswordPage.js b/src/page/PasswordPage.js index 769b33b..259cb50 100644 --- a/src/page/PasswordPage.js +++ b/src/page/PasswordPage.js @@ -33,6 +33,15 @@ export default class PasswordPage extends Component { }; } + static options(passProps) { + return { + statusBar: { + backgroundColor: 'white', + style: 'dark' + } + }; + } + componentDidMount() { Token.getLoginPassword() .then(pwd => { diff --git a/src/page/SettingPage.js b/src/page/SettingPage.js index 2a7adf4..ceb612b 100644 --- a/src/page/SettingPage.js +++ b/src/page/SettingPage.js @@ -36,6 +36,10 @@ export default class SettingPage extends Component { title: { text: '设置' } + }, + statusBar: { + backgroundColor: 'white', + style: 'dark' } }; } diff --git a/src/page/TopicPage.js b/src/page/TopicPage.js index 8de38f2..3468a0c 100644 --- a/src/page/TopicPage.js +++ b/src/page/TopicPage.js @@ -30,6 +30,10 @@ export default class TopicPage extends Component { color: '#aaa' // android }] + }, + statusBar: { + backgroundColor: 'white', + style: 'dark' } }; } diff --git a/src/page/UserInfoEditPage.js b/src/page/UserInfoEditPage.js index 6bc022d..7d0d20b 100644 --- a/src/page/UserInfoEditPage.js +++ b/src/page/UserInfoEditPage.js @@ -31,6 +31,15 @@ export default class UserInfoEditPage extends Component { }; } + static options(passProps) { + return { + statusBar: { + backgroundColor: 'white', + style: 'dark' + } + }; + } + componentDidMount() { this.loadUser(); this.userInfoListener = DeviceEventEmitter.addListener(Event.userInfoUpdated, this.loadUser.bind(this)); diff --git a/src/page/UserIntroEditPage.js b/src/page/UserIntroEditPage.js index d209825..f9bbc8f 100644 --- a/src/page/UserIntroEditPage.js +++ b/src/page/UserIntroEditPage.js @@ -46,6 +46,10 @@ export default class EditIntroPage extends Component { // hide bottom tab for android drawBehind: true, animate: true + }, + statusBar: { + backgroundColor: 'white', + style: 'dark' } }; } diff --git a/src/page/UserNameEditPage.js b/src/page/UserNameEditPage.js index a1f9203..88e89c4 100644 --- a/src/page/UserNameEditPage.js +++ b/src/page/UserNameEditPage.js @@ -46,6 +46,10 @@ export default class UserNameEditPage extends Component { // hide bottom tab for android drawBehind: true, animate: true + }, + statusBar: { + backgroundColor: 'white', + style: 'dark' } }; } diff --git a/src/page/UserPage.js b/src/page/UserPage.js index ac227d9..73eadfe 100644 --- a/src/page/UserPage.js +++ b/src/page/UserPage.js @@ -51,6 +51,10 @@ export default class UserPage extends Component { id: 'followIcon', icon: Icon.followIcon }] + }, + statusBar: { + backgroundColor: 'white', + style: 'dark' } } : { topBar: { @@ -65,6 +69,10 @@ export default class UserPage extends Component { color: Color.primary }] + }, + statusBar: { + backgroundColor: 'white', + style: 'dark' } } } diff --git a/src/page/WebViewPage.js b/src/page/WebViewPage.js index 79c373b..331cb21 100644 --- a/src/page/WebViewPage.js +++ b/src/page/WebViewPage.js @@ -37,6 +37,10 @@ export default class WebViewPage extends Component { id: "open", icon: Icon.navButtonOpen }] + }, + statusBar: { + backgroundColor: 'white', + style: 'dark' } }; } diff --git a/src/page/WritePage.js b/src/page/WritePage.js index cc7fa97..33543be 100644 --- a/src/page/WritePage.js +++ b/src/page/WritePage.js @@ -67,6 +67,10 @@ export default class WritePage extends Component { id: 'save', icon: Icon.navButtonSave }] + }, + statusBar: { + backgroundColor: 'white', + style: 'dark' } }; }