-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
40 changed files
with
760 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import {SET_AUTHENTICATION_STATUS} from "../constants/action-types"; | ||
|
||
const logout = (cookies, orgSlug) => { | ||
cookies.remove(`${orgSlug}_auth_token`, {path: "/"}); | ||
cookies.remove(`${orgSlug}_username`, {path: "/"}); | ||
|
||
return { | ||
type: SET_AUTHENTICATION_STATUS, | ||
payload: false, | ||
}; | ||
}; | ||
export default logout; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
/* eslint-disable camelcase */ | ||
import "./index.css"; | ||
|
||
import PropTypes from "prop-types"; | ||
import React from "react"; | ||
|
||
import getAssetPath from "../../utils/get-asset-path"; | ||
import getText from "../../utils/get-text"; | ||
|
||
export default class Contact extends React.Component { | ||
render() { | ||
const {contactPage, language, orgSlug} = this.props; | ||
const {email, helpdesk, social_links} = contactPage; | ||
return ( | ||
<React.Fragment> | ||
<div className="owisp-contact-container"> | ||
<div className="owisp-contact-inner"> | ||
<div className="owisp-contact-row"> | ||
<div className="owisp-contact-label"> | ||
{getText(email.label, language)}: | ||
</div> | ||
<a | ||
href={`mailto:${getText(email.value, language)}`} | ||
className="owisp-contact-text" | ||
> | ||
{getText(email.value, language)} | ||
</a> | ||
</div> | ||
<div className="owisp-contact-row"> | ||
<div className="owisp-contact-label"> | ||
{getText(helpdesk.label, language)}: | ||
</div> | ||
<a | ||
href={`tel:${getText(helpdesk.value, language)}`} | ||
className="owisp-contact-text" | ||
> | ||
{getText(helpdesk.value, language)} | ||
</a> | ||
</div> | ||
<div className="owisp-contact-links"> | ||
{social_links.map(link => { | ||
return ( | ||
<a | ||
href={link.url} | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
key={link.url} | ||
className={`owisp-contact-${getText( | ||
link.alt, | ||
language, | ||
)}-link owisp-contact-link`} | ||
> | ||
<img | ||
src={getAssetPath(orgSlug, link.icon)} | ||
alt={getText(link.alt, language)} | ||
className={`owisp-contact-${getText( | ||
link.alt, | ||
language, | ||
)}-image owisp-contact-image`} | ||
/> | ||
</a> | ||
); | ||
})} | ||
</div> | ||
<div className="owisp-contact-inner"></div> | ||
</div> | ||
</div> | ||
</React.Fragment> | ||
); | ||
} | ||
} | ||
|
||
Contact.propTypes = { | ||
language: PropTypes.string.isRequired, | ||
orgSlug: PropTypes.string.isRequired, | ||
contactPage: PropTypes.shape({ | ||
social_links: PropTypes.array, | ||
email: PropTypes.object, | ||
helpdesk: PropTypes.object, | ||
}).isRequired, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
.owisp-contact-container { | ||
background: rgb(74, 132, 86); | ||
padding: 30px; | ||
color: #ffffff; | ||
border-radius: 2px; | ||
width: 100%; | ||
box-sizing: border-box; | ||
} | ||
.owisp-contact-row { | ||
display: flex; | ||
flex-direction: row; | ||
flex-wrap: wrap; | ||
font-size: 14px; | ||
line-height: 1.8; | ||
} | ||
.owisp-contact-label { | ||
font-weight: 700; | ||
margin-right: 4px; | ||
} | ||
.owisp-contact-text { | ||
color: #ffffff; | ||
} | ||
.owisp-contact-text:hover { | ||
text-decoration: none; | ||
} | ||
.owisp-contact-links { | ||
display: flex; | ||
flex-direction: row; | ||
justify-content: flex-start; | ||
flex-wrap: wrap; | ||
width: 100%; | ||
} | ||
.owisp-contact-link { | ||
display: flex; | ||
flex-direction: row; | ||
justify-content: center; | ||
align-items: center; | ||
color: #ffffff; | ||
} | ||
.owisp-contact-link:hover { | ||
text-decoration: none; | ||
} | ||
.owisp-contact-image { | ||
width: 50px; | ||
height: auto; | ||
margin: 10px 15px 0 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import {connect} from "react-redux"; | ||
|
||
import Component from "./contact"; | ||
|
||
const mapStateToProps = state => { | ||
return { | ||
contactPage: state.organization.configuration.components.contact_page, | ||
language: state.language, | ||
orgSlug: state.organization.configuration.slug, | ||
}; | ||
}; | ||
export default connect( | ||
mapStateToProps, | ||
null, | ||
)(Component); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.