Renames FramedSegment to Segment
This commit is contained in:
@@ -6,21 +6,20 @@ import AppText from './app-text'
|
|||||||
|
|
||||||
import { Containers, Typography } from '../../styles/redesign'
|
import { Containers, Typography } from '../../styles/redesign'
|
||||||
|
|
||||||
const FramedSegment = ({ children, last, style, title }) => {
|
const Segment = ({ children, last, title }) => {
|
||||||
const containerStyle = last ? styles.containerLast : styles.container
|
const containerStyle = last ? styles.containerLast : styles.container
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={[containerStyle, style]}>
|
<View style={containerStyle}>
|
||||||
{title && <AppText style={styles.title}>{title}</AppText>}
|
{title && <AppText style={styles.title}>{title}</AppText>}
|
||||||
{children}
|
{children}
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
FramedSegment.propTypes = {
|
Segment.propTypes = {
|
||||||
children: PropTypes.node,
|
children: PropTypes.node,
|
||||||
last: PropTypes.bool,
|
last: PropTypes.bool,
|
||||||
style: PropTypes.object,
|
|
||||||
title: PropTypes.string
|
title: PropTypes.string
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -38,4 +37,4 @@ const styles = StyleSheet.create({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
export default FramedSegment
|
export default Segment
|
||||||
@@ -2,7 +2,7 @@ import React from 'react'
|
|||||||
|
|
||||||
import AppPage from '../common/app-page'
|
import AppPage from '../common/app-page'
|
||||||
import AppText from '../common/app-text'
|
import AppText from '../common/app-text'
|
||||||
import FramedSegment from '../common/framed-segment'
|
import Segment from '../common/segment'
|
||||||
|
|
||||||
import labels from '../../i18n/en/settings'
|
import labels from '../../i18n/en/settings'
|
||||||
import links from '../../i18n/en/links'
|
import links from '../../i18n/en/links'
|
||||||
@@ -10,24 +10,24 @@ import links from '../../i18n/en/links'
|
|||||||
const AboutSection = () => {
|
const AboutSection = () => {
|
||||||
return (
|
return (
|
||||||
<AppPage title={labels.aboutSection.title} >
|
<AppPage title={labels.aboutSection.title} >
|
||||||
<FramedSegment>
|
<Segment>
|
||||||
<AppText>{labels.aboutSection.text}</AppText>
|
<AppText>{labels.aboutSection.text}</AppText>
|
||||||
</FramedSegment>
|
</Segment>
|
||||||
<FramedSegment title={labels.philosophy.title}>
|
<Segment title={labels.philosophy.title}>
|
||||||
<AppText>{labels.philosophy.text}</AppText>
|
<AppText>{labels.philosophy.text}</AppText>
|
||||||
</FramedSegment>
|
</Segment>
|
||||||
<FramedSegment title={labels.credits.title}>
|
<Segment title={labels.credits.title}>
|
||||||
<AppText>{labels.credits.note}</AppText>
|
<AppText>{labels.credits.note}</AppText>
|
||||||
</FramedSegment>
|
</Segment>
|
||||||
<FramedSegment title={labels.donate.title}>
|
<Segment title={labels.donate.title}>
|
||||||
<AppText>{labels.donate.note}</AppText>
|
<AppText>{labels.donate.note}</AppText>
|
||||||
</FramedSegment>
|
</Segment>
|
||||||
<FramedSegment title={labels.website.title}>
|
<Segment title={labels.website.title}>
|
||||||
<AppText>{links.website.url}</AppText>
|
<AppText>{links.website.url}</AppText>
|
||||||
</FramedSegment>
|
</Segment>
|
||||||
<FramedSegment title={labels.version.title} last>
|
<Segment title={labels.version.title} last>
|
||||||
<AppText>{require('../../package.json').version}</AppText>
|
<AppText>{require('../../package.json').version}</AppText>
|
||||||
</FramedSegment>
|
</Segment>
|
||||||
</AppPage>
|
</AppPage>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import React, { Component } from 'react'
|
import React, { Component } from 'react'
|
||||||
import { ScrollView, View } from 'react-native'
|
import { ScrollView, View } from 'react-native'
|
||||||
import AppText from '../../common/app-text'
|
import AppText from '../../common/app-text'
|
||||||
import FramedSegment from '../../common/framed-segment'
|
import Segment from '../../common/segment'
|
||||||
import AppLoadingView from '../../common/app-loading'
|
import AppLoadingView from '../../common/app-loading'
|
||||||
import SettingsButton from '../shared/settings-button'
|
import SettingsButton from '../shared/settings-button'
|
||||||
import { openImportDialog, getFileContent, importData } from './import-dialog'
|
import { openImportDialog, getFileContent, importData } from './import-dialog'
|
||||||
@@ -58,21 +58,21 @@ export default class DataManagement extends Component {
|
|||||||
{!this.state.isLoading &&
|
{!this.state.isLoading &&
|
||||||
<ScrollView>
|
<ScrollView>
|
||||||
<View>
|
<View>
|
||||||
<FramedSegment title={labels.export.button}>
|
<Segment title={labels.export.button}>
|
||||||
<AppText>{labels.export.segmentExplainer}</AppText>
|
<AppText>{labels.export.segmentExplainer}</AppText>
|
||||||
<SettingsButton onPress={this.startExport}>
|
<SettingsButton onPress={this.startExport}>
|
||||||
{labels.export.button}
|
{labels.export.button}
|
||||||
</SettingsButton>
|
</SettingsButton>
|
||||||
</FramedSegment>
|
</Segment>
|
||||||
<FramedSegment title={labels.import.button}>
|
<Segment title={labels.import.button}>
|
||||||
<AppText>{labels.import.segmentExplainer}</AppText>
|
<AppText>{labels.import.segmentExplainer}</AppText>
|
||||||
<SettingsButton
|
<SettingsButton
|
||||||
onPress= {this.startImport}
|
onPress= {this.startImport}
|
||||||
>
|
>
|
||||||
{labels.import.button}
|
{labels.import.button}
|
||||||
</SettingsButton>
|
</SettingsButton>
|
||||||
</FramedSegment>
|
</Segment>
|
||||||
<FramedSegment
|
<Segment
|
||||||
title={labels.deleteSegment.title}
|
title={labels.deleteSegment.title}
|
||||||
last
|
last
|
||||||
>
|
>
|
||||||
@@ -81,7 +81,7 @@ export default class DataManagement extends Component {
|
|||||||
isDeletingData = { currentAction === 'delete' }
|
isDeletingData = { currentAction === 'delete' }
|
||||||
onStartDeletion = {() => this.setCurrentAction('delete')}
|
onStartDeletion = {() => this.setCurrentAction('delete')}
|
||||||
/>
|
/>
|
||||||
</FramedSegment>
|
</Segment>
|
||||||
</View>
|
</View>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,16 +2,16 @@ import React from 'react'
|
|||||||
|
|
||||||
import AppPage from '../common/app-page'
|
import AppPage from '../common/app-page'
|
||||||
import AppText from '../common/app-text'
|
import AppText from '../common/app-text'
|
||||||
import FramedSegment from '../common/framed-segment'
|
import Segment from '../common/segment'
|
||||||
|
|
||||||
import labels from '../../i18n/en/settings'
|
import labels from '../../i18n/en/settings'
|
||||||
|
|
||||||
const License = () => {
|
const License = () => {
|
||||||
return (
|
return (
|
||||||
<AppPage title={labels.license.title} >
|
<AppPage title={labels.license.title} >
|
||||||
<FramedSegment last >
|
<Segment last >
|
||||||
<AppText>{labels.license.text}</AppText>
|
<AppText>{labels.license.text}</AppText>
|
||||||
</FramedSegment>
|
</Segment>
|
||||||
</AppPage>
|
</AppPage>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import {
|
|||||||
import styles from '../../../styles'
|
import styles from '../../../styles'
|
||||||
import labels from '../../../i18n/en/settings'
|
import labels from '../../../i18n/en/settings'
|
||||||
import AppText from '../../common/app-text'
|
import AppText from '../../common/app-text'
|
||||||
import FramedSegment from '../../common/framed-segment'
|
import Segment from '../../common/segment'
|
||||||
import TempSlider from './temp-slider'
|
import TempSlider from './temp-slider'
|
||||||
import UseCervixSetting from './use-cervix'
|
import UseCervixSetting from './use-cervix'
|
||||||
import Icon from 'react-native-vector-icons/Entypo'
|
import Icon from 'react-native-vector-icons/Entypo'
|
||||||
@@ -19,20 +19,20 @@ export default class Settings extends Component {
|
|||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<ScrollView>
|
<ScrollView>
|
||||||
<FramedSegment title={labels.useCervix.title}>
|
<Segment title={labels.useCervix.title}>
|
||||||
<UseCervixSetting/>
|
<UseCervixSetting/>
|
||||||
</FramedSegment>
|
</Segment>
|
||||||
<FramedSegment title={labels.tempScale.segmentTitle}>
|
<Segment title={labels.tempScale.segmentTitle}>
|
||||||
<AppText>{labels.tempScale.segmentExplainer}</AppText>
|
<AppText>{labels.tempScale.segmentExplainer}</AppText>
|
||||||
<TempSlider/>
|
<TempSlider/>
|
||||||
</FramedSegment>
|
</Segment>
|
||||||
<FramedSegment style={styles.framedSegmentLast} >
|
<Segment style={styles.framedSegmentLast} >
|
||||||
<View style={{flexDirection: 'row', alignItems: 'center'}}>
|
<View style={{flexDirection: 'row', alignItems: 'center'}}>
|
||||||
<Icon name="info-with-circle"/>
|
<Icon name="info-with-circle"/>
|
||||||
<AppText style={styles.framedSegmentTitle}>{` ${labels.preOvu.title} `}</AppText>
|
<AppText style={styles.framedSegmentTitle}>{` ${labels.preOvu.title} `}</AppText>
|
||||||
</View>
|
</View>
|
||||||
<AppText>{labels.preOvu.note}</AppText>
|
<AppText>{labels.preOvu.note}</AppText>
|
||||||
</FramedSegment>
|
</Segment>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { ScrollView } from 'react-native'
|
|||||||
import CreatePassword from './create'
|
import CreatePassword from './create'
|
||||||
import ChangePassword from './update'
|
import ChangePassword from './update'
|
||||||
import DeletePassword from './delete'
|
import DeletePassword from './delete'
|
||||||
import FramedSegment from '../../common/framed-segment'
|
import Segment from '../../common/segment'
|
||||||
import AppText from '../../common/app-text'
|
import AppText from '../../common/app-text'
|
||||||
import {
|
import {
|
||||||
hasEncryptionObservable
|
hasEncryptionObservable
|
||||||
@@ -52,7 +52,7 @@ export default class PasswordSetting extends Component {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<ScrollView>
|
<ScrollView>
|
||||||
<FramedSegment title={title}>
|
<Segment title={title}>
|
||||||
<AppText>
|
<AppText>
|
||||||
{ isPasswordSet ? explainerEnabled : explainerDisabled }
|
{ isPasswordSet ? explainerEnabled : explainerDisabled }
|
||||||
</AppText>
|
</AppText>
|
||||||
@@ -72,7 +72,7 @@ export default class PasswordSetting extends Component {
|
|||||||
onCancelDelete = {this.onCancelDeletingPassword}
|
onCancelDelete = {this.onCancelDeletingPassword}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</FramedSegment>
|
</Segment>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import React, { Component } from 'react'
|
|||||||
import {
|
import {
|
||||||
ScrollView,
|
ScrollView,
|
||||||
} from 'react-native'
|
} from 'react-native'
|
||||||
import FramedSegment from '../../common/framed-segment'
|
import Segment from '../../common/segment'
|
||||||
import TempReminderPicker from './temp-reminder-picker'
|
import TempReminderPicker from './temp-reminder-picker'
|
||||||
import PeriodReminderPicker from './period-reminder'
|
import PeriodReminderPicker from './period-reminder'
|
||||||
|
|
||||||
@@ -17,12 +17,12 @@ export default class Settings extends Component {
|
|||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<ScrollView>
|
<ScrollView>
|
||||||
<FramedSegment title={labels.tempReminder.title}>
|
<Segment title={labels.tempReminder.title}>
|
||||||
<TempReminderPicker/>
|
<TempReminderPicker/>
|
||||||
</FramedSegment>
|
</Segment>
|
||||||
<FramedSegment title={labels.periodReminder.title}>
|
<Segment title={labels.periodReminder.title}>
|
||||||
<PeriodReminderPicker/>
|
<PeriodReminderPicker/>
|
||||||
</FramedSegment>
|
</Segment>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -9,7 +9,7 @@ import cycleModule from '../lib/cycle'
|
|||||||
import {getCycleLengthStats as getCycleInfo} from '../lib/cycle-length'
|
import {getCycleLengthStats as getCycleInfo} from '../lib/cycle-length'
|
||||||
import {stats as labels} from '../i18n/en/labels'
|
import {stats as labels} from '../i18n/en/labels'
|
||||||
import AppText from './common/app-text'
|
import AppText from './common/app-text'
|
||||||
import FramedSegment from './common/framed-segment'
|
import Segment from './common/segment'
|
||||||
|
|
||||||
export default class Stats extends Component {
|
export default class Stats extends Component {
|
||||||
render() {
|
render() {
|
||||||
@@ -25,7 +25,7 @@ export default class Stats extends Component {
|
|||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<ScrollView>
|
<ScrollView>
|
||||||
<FramedSegment
|
<Segment
|
||||||
style={styles.framedSegmentLast}
|
style={styles.framedSegmentLast}
|
||||||
title={labels.cycleLengthTitle}
|
title={labels.cycleLengthTitle}
|
||||||
>
|
>
|
||||||
@@ -70,7 +70,7 @@ export default class Stats extends Component {
|
|||||||
<AppText>{labels.basisOfStatsEnd}</AppText>
|
<AppText>{labels.basisOfStatsEnd}</AppText>
|
||||||
</View>
|
</View>
|
||||||
</View>}
|
</View>}
|
||||||
</FramedSegment>
|
</Segment>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user