Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Drip
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
backup
Drip
Commits
a4deb360
Commit
a4deb360
authored
6 years ago
by
Julia Friesel
Browse files
Options
Downloads
Patches
Plain Diff
Make header and menu labels lowercase
parent
04512e5b
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
components/app.js
+18
-3
18 additions, 3 deletions
components/app.js
components/labels.js
+8
-0
8 additions, 0 deletions
components/labels.js
components/menu.js
+6
-5
6 additions, 5 deletions
components/menu.js
with
32 additions
and
8 deletions
components/app.js
+
18
−
3
View file @
a4deb360
...
@@ -9,9 +9,20 @@ import symptomViews from './cycle-day/symptoms'
...
@@ -9,9 +9,20 @@ import symptomViews from './cycle-day/symptoms'
import
Chart
from
'
./chart/chart
'
import
Chart
from
'
./chart/chart
'
import
Settings
from
'
./settings
'
import
Settings
from
'
./settings
'
import
Stats
from
'
./stats
'
import
Stats
from
'
./stats
'
import
{
headerTitles
as
t
itles
}
from
'
./labels
'
import
{
headerTitles
,
menuT
itles
}
from
'
./labels
'
import
setupNotifications
from
'
../lib/notifications
'
import
setupNotifications
from
'
../lib/notifications
'
// design wants everyhting lowercased, but we don't
// have CSS pseudo properties
const
headerTitlesLowerCase
=
Object
.
keys
(
headerTitles
).
reduce
((
acc
,
curr
)
=>
{
acc
[
curr
]
=
headerTitles
[
curr
].
toLowerCase
()
return
acc
},
{})
const
menuTitlesLowerCase
=
Object
.
keys
(
menuTitles
).
reduce
((
acc
,
curr
)
=>
{
acc
[
curr
]
=
menuTitles
[
curr
].
toLowerCase
()
return
acc
},
{})
const
isSymptomView
=
name
=>
Object
.
keys
(
symptomViews
).
indexOf
(
name
)
>
-
1
const
isSymptomView
=
name
=>
Object
.
keys
(
symptomViews
).
indexOf
(
name
)
>
-
1
export
default
class
App
extends
Component
{
export
default
class
App
extends
Component
{
...
@@ -56,7 +67,8 @@ export default class App extends Component {
...
@@ -56,7 +67,8 @@ export default class App extends Component {
return
(
return
(
<
View
style
=
{{
flex
:
1
}}
>
<
View
style
=
{{
flex
:
1
}}
>
{
this
.
state
.
currentPage
!=
'
CycleDay
'
&&
<
Header
title
=
{
titles
[
this
.
state
.
currentPage
]}
/>
}
{
this
.
state
.
currentPage
!=
'
CycleDay
'
&&
<
Header
title
=
{
headerTitlesLowerCase
[
this
.
state
.
currentPage
]}
/>
}
{
React
.
createElement
(
page
,
{
{
React
.
createElement
(
page
,
{
navigate
:
this
.
navigate
,
navigate
:
this
.
navigate
,
...
@@ -64,7 +76,10 @@ export default class App extends Component {
...
@@ -64,7 +76,10 @@ export default class App extends Component {
})}
})}
{
!
isSymptomView
(
this
.
state
.
currentPage
)
&&
{
!
isSymptomView
(
this
.
state
.
currentPage
)
&&
<
Menu
navigate
=
{
this
.
navigate
}
/
>
<
Menu
navigate
=
{
this
.
navigate
}
titles
=
{
menuTitlesLowerCase
}
/
>
}
}
<
/View
>
<
/View
>
)
)
...
...
This diff is collapsed.
Click to expand it.
components/labels.js
+
8
−
0
View file @
a4deb360
...
@@ -94,6 +94,14 @@ export const headerTitles = {
...
@@ -94,6 +94,14 @@ export const headerTitles = {
PainEditView
:
'
Pain
'
PainEditView
:
'
Pain
'
}
}
export
const
menuTitles
=
{
Home
:
'
Home
'
,
Calendar
:
'
Calendar
'
,
Chart
:
'
Chart
'
,
Stats
:
'
Stats
'
,
Settings
:
'
Settings
'
,
}
export
const
stats
=
{
export
const
stats
=
{
cycleLengthTitle
:
'
Cycle length
'
,
cycleLengthTitle
:
'
Cycle length
'
,
cycleLengthExplainer
:
'
Basic statistics about the length of your cycles.
'
,
cycleLengthExplainer
:
'
Basic statistics about the length of your cycles.
'
,
...
...
This diff is collapsed.
Click to expand it.
components/menu.js
+
6
−
5
View file @
a4deb360
...
@@ -28,14 +28,15 @@ export default class Menu extends Component {
...
@@ -28,14 +28,15 @@ export default class Menu extends Component {
}
}
render
()
{
render
()
{
const
t
=
this
.
props
.
titles
return
(
return
(
<
View
style
=
{
styles
.
menu
}
>
<
View
style
=
{
styles
.
menu
}
>
{[
{[
{
title
:
'
Home
'
,
icon
:
'
home
'
,
onPress
:
()
=>
this
.
goTo
(
'
Home
'
)
},
{
title
:
t
.
Home
,
icon
:
'
home
'
,
onPress
:
()
=>
this
.
goTo
(
'
Home
'
)
},
{
title
:
'
Calendar
'
,
icon
:
'
calendar-range
'
,
onPress
:
()
=>
this
.
goTo
(
'
Calendar
'
)
},
{
title
:
t
.
Calendar
,
icon
:
'
calendar-range
'
,
onPress
:
()
=>
this
.
goTo
(
'
Calendar
'
)
},
{
title
:
'
Chart
'
,
icon
:
'
chart-line
'
,
onPress
:
()
=>
this
.
goTo
(
'
Chart
'
)
},
{
title
:
t
.
Chart
,
icon
:
'
chart-line
'
,
onPress
:
()
=>
this
.
goTo
(
'
Chart
'
)
},
{
title
:
'
Stats
'
,
icon
:
'
chart-pie
'
,
onPress
:
()
=>
this
.
goTo
(
'
Stats
'
)
},
{
title
:
t
.
Stats
,
icon
:
'
chart-pie
'
,
onPress
:
()
=>
this
.
goTo
(
'
Stats
'
)
},
{
title
:
'
Settings
'
,
icon
:
'
settings
'
,
onPress
:
()
=>
this
.
goTo
(
'
Settings
'
)
},
{
title
:
t
.
Settings
,
icon
:
'
settings
'
,
onPress
:
()
=>
this
.
goTo
(
'
Settings
'
)
},
].
map
(
this
.
makeMenuItem
)}
].
map
(
this
.
makeMenuItem
)}
<
/View
>
<
/View
>
)
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment