Skip to content

Commit 475842e

Browse files
committed
move version number back to settings page, fix vertically overflowing containers
1 parent b46f7ae commit 475842e

File tree

8 files changed

+36
-38
lines changed

8 files changed

+36
-38
lines changed

packages/client/src/App.tsx

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -76,26 +76,6 @@ const GlobalStyle = createGlobalStyle`
7676
}
7777
`
7878

79-
const Version = styled.div`
80-
color: ${({ theme }) => theme.colors.disabled};
81-
${({ theme }) => theme.fonts.smallButtonStyle};
82-
position: absolute;
83-
bottom: 1.5rem;
84-
left: 1rem;
85-
text-transform: none;
86-
span:last-child {
87-
display: none;
88-
}
89-
:hover {
90-
span:first-child {
91-
display: none;
92-
}
93-
span:last-child {
94-
display: inline;
95-
}
96-
}
97-
`
98-
9979
export class App extends React.Component<IAppProps> {
10080
public render() {
10181
return (
@@ -307,12 +287,6 @@ export class App extends React.Component<IAppProps> {
307287
}}
308288
/>
309289
</ProtectedPage>
310-
<Version>
311-
<span>OpenCRVS v1.1.0</span>
312-
<span>
313-
{process.env.REACT_APP_VERSION || 'development'}
314-
</span>
315-
</Version>
316290
</MainSection>
317291
</Page>
318292
</NotificationComponent>

packages/client/src/components/Page.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ const languageFromProps = ({ language }: IPageProps) => language
3737
const StyledPage = styled.div<IPageProps>`
3838
background: ${({ theme }) => theme.colors.background};
3939
min-height: 100vh;
40-
margin-bottom: 80px;
40+
box-sizing: border-box;
41+
padding-bottom: 80px;
4142
justify-content: space-between;
4243
display: flex;
4344
flex-direction: column;

packages/client/src/views/PIN/CreatePin.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const Container = styled.div`
2626
align-items: center;
2727
justify-content: center;
2828
${({ theme }) => theme.gradients.gradientNightshade};
29-
height: calc(100vh + 80px);
29+
height: 100vh;
3030
width: 100%;
3131
position: absolute;
3232
overflow-y: hidden;

packages/client/src/views/SecureAccount/SecureAccountView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import { CreatePin } from '@client/views/PIN/CreatePin'
1818
const SecurePageContainer = styled.div`
1919
${({ theme }) => theme.fonts.bigBodyStyle};
2020
${({ theme }) => theme.gradients.gradientNightshade};
21-
height: calc(100vh + 80px);
21+
height: 100vh;
2222
text-align: center;
2323
width: 100%;
2424
position: absolute;

packages/client/src/views/SelectVitalEvent/SelectVitalEvent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ from {
5656
`
5757
const StyledContainer = styled.div`
5858
top: 0;
59-
min-height: calc(100vh - 40px);
59+
min-height: calc(100vh);
6060
width: 100%;
6161
&.${PAGE_TRANSITIONS_CLASSNAME}-enter {
6262
animation: ${fadeFromBottom} ${PAGE_TRANSITIONS_ENTER_TIME}ms

packages/client/src/views/Settings/SettingsPage.tsx

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,23 @@ const Right = styled.div`
9898
}
9999
}
100100
`
101-
101+
const Version = styled.div`
102+
color: ${({ theme }) => theme.colors.disabled};
103+
${({ theme }) => theme.fonts.smallButtonStyle};
104+
text-transform: none;
105+
margin-top: 2rem;
106+
span:last-child {
107+
display: none;
108+
}
109+
:hover {
110+
span:first-child {
111+
display: none;
112+
}
113+
span:last-child {
114+
display: inline;
115+
}
116+
}
117+
`
102118
const Message = styled.div`
103119
margin-bottom: 16px;
104120
`
@@ -310,6 +326,10 @@ class SettingsView extends React.Component<IProps, IState> {
310326
{sections.map((sec, index: number) => (
311327
<DataSection key={index} {...sec} />
312328
))}
329+
<Version>
330+
<span>OpenCRVS v1.1.0</span>
331+
<span>{process.env.REACT_APP_VERSION || 'development'}</span>
332+
</Version>
313333
</Left>
314334
<Right>
315335
<Avatar className="tablet" />

packages/client/src/views/Unlock/Unlock.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const PageWrapper = styled.div`
3737
${window.config.COUNTRY === 'zmb'
3838
? `background: url(${zambiaBackground});`
3939
: ''}
40-
height: calc(100vh + 80px);
40+
height: 100vh;
4141
display: flex;
4242
flex-direction: column;
4343
justify-content: center;

packages/components/src/components/interface/SubPage.tsx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,25 @@
1212
import * as React from 'react'
1313
import styled from 'styled-components'
1414
import { BackArrow } from '../icons'
15-
import { Button, CircleButton } from '../buttons'
15+
import { CircleButton } from '../buttons'
1616
import { Box } from './Box'
1717

1818
const SubPageContainer = styled.div`
1919
width: 100%;
20-
height: 100vh;
20+
height: calc(100vh - 80px);
2121
${({ theme }) => theme.fonts.bodyStyle};
2222
background: ${({ theme }) => theme.colors.white};
2323
color: ${({ theme }) => theme.colors.copy};
24+
display: flex;
25+
flex-direction: column;
26+
align-items: center;
2427
`
2528

2629
const HeaderBlock = styled.div`
2730
box-shadow: 0px 2px 6px rgba(53, 67, 93, 0.32);
2831
height: 64px;
32+
width: 100%;
2933
max-width: 940px;
30-
margin: auto;
3134
padding: 20px 10px;
3235
display: flex;
3336
flex-flow: row nowrap;
@@ -46,9 +49,9 @@ const EmptyTitle = styled(MenuTitle)`
4649
color: ${({ theme }) => theme.colors.error};
4750
`
4851
const BodyContainer = styled(Box)`
52+
width: 100%;
4953
max-width: 940px;
50-
height: inherit;
51-
margin: auto;
54+
flex-grow: 1;
5255
`
5356
interface IProps {
5457
title?: string
@@ -70,7 +73,7 @@ export class SubPage extends React.Component<IProps> {
7073
<EmptyTitle>{emptyTitle}</EmptyTitle>
7174
)}
7275
</HeaderBlock>
73-
<BodyContainer>{this.props.children}</BodyContainer>π{' '}
76+
<BodyContainer>{this.props.children}</BodyContainer>
7477
</SubPageContainer>
7578
)
7679
}

0 commit comments

Comments
 (0)