Skip to content

Commit 8aea06b

Browse files
authored
Membership tab (#574)
* Template with api * Separate membership cards * Upload upload logo note * Update note text
1 parent 7fe923e commit 8aea06b

File tree

22 files changed

+442
-70
lines changed

22 files changed

+442
-70
lines changed

components/application/activities.js

+5
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,11 @@ const config = new RouteConfig([
7373
},
7474
],
7575
},
76+
{
77+
test: /\/membership/,
78+
path: 'membership',
79+
icon: 'account-group',
80+
},
7681
{
7782
test: /\/settings/,
7883
path: 'settings',

components/text-box/index.jsx

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import { classNames } from '@oacore/design/lib/utils'
2+
import React from 'react'
3+
import { Button } from '@oacore/design/lib/elements'
4+
5+
import Markdown from '../markdown'
6+
import styles from './styles.module.css'
7+
8+
const TextBox = ({
9+
className,
10+
onClick,
11+
description,
12+
buttonCaption,
13+
buttonUrl,
14+
}) => (
15+
<div className={classNames.use(styles.box).join(className)}>
16+
<Markdown className={styles.boxText}>{description}</Markdown>
17+
<div className={styles.boxButton}>
18+
<Button
19+
variant="outlined"
20+
onClick={onClick || null}
21+
href={buttonUrl || null}
22+
>
23+
{buttonCaption}
24+
</Button>
25+
</div>
26+
</div>
27+
)
28+
29+
export default TextBox

components/text-box/styles.module.css

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
.box {
2+
display: flex;
3+
flex-wrap: wrap;
4+
align-items: flex-end;
5+
padding: 1.5rem;
6+
background-color: var(--gray-100);
7+
}
8+
9+
.box-text {
10+
max-width: 80ch;
11+
line-height: 2;
12+
}
13+
14+
.box-button {
15+
flex: 1;
16+
text-align: right;
17+
}

design.config.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
const path = require('path')
22

33
const icons = [
4+
'account-group',
45
'alert',
56
'alert-outline',
67
'alert-circle',

design/drawer/styles.module.css

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
}
1919

2020
.item {
21-
display: block;
21+
display: flex;
22+
align-items: center;
2223
padding: var(--drawer-item-padding-y) var(--drawer-item-padding-x);
2324
margin: var(--drawer-item-spacing) 0;
2425
color: var(--gray-800);

package-lock.json

+23-57
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import React from 'react'
2+
3+
import MembershipPageTemplate from 'templates/membership'
4+
import { withGlobalStore } from 'store'
5+
6+
const MembershipPage = ({ store: { dataProvider }, ...props }) => (
7+
<MembershipPageTemplate
8+
membershipPlan={dataProvider.membershipPlan}
9+
{...props}
10+
/>
11+
)
12+
13+
export default withGlobalStore(MembershipPage)

pages/data-providers/[data-provider-id]/settings.jsx

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ const Settings = ({ store, ...restProps }) => (
1414
mappingSubmit={store.updateOaiSettings}
1515
updateLogo={store.updateLogo}
1616
dataProviderLogo={store.dataProvider.logo}
17+
membershipPlan={store.dataProvider.membershipPlan}
1718
{...restProps}
1819
/>
1920
)

public/secure/login.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
<html lang="en">
33
<meta charset="UTF-8" />
44
<meta name="viewport" content="width=device-width, initial-scale=1" />
5-
<meta
5+
<!-- <meta
66
http-equiv="Content-Security-Policy"
77
content="default-src 'self' *.core.ac.uk;"
8-
/>
9-
<!-- <meta
8+
/> -->
9+
<meta
1010
http-equiv="Content-Security-Policy"
1111
content="default-src * self blob: data: gap:; style-src * self 'unsafe-inline' blob: data: gap:; script-src * 'self' 'unsafe-eval' 'unsafe-inline' blob: data: gap:; object-src * 'self' blob: data: gap:; img-src * self 'unsafe-inline' blob: data: gap:; connect-src self * 'unsafe-inline' blob: data: gap:; frame-src * self blob: data: gap:;"
12-
/> -->
12+
/>
1313
<title>Login into CORE Dashboard</title>
1414

1515
<link href="/sanitize.css" rel="stylesheet" />

store/activities.js

+5
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ const config = [
3939
},
4040
],
4141
},
42+
{
43+
id: 'membership',
44+
path: 'membership',
45+
icon: 'account-group',
46+
},
4247
{
4348
id: 'settings',
4449
path: 'settings',

0 commit comments

Comments
 (0)