-
Notifications
You must be signed in to change notification settings - Fork 9
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
1 parent
926cd27
commit f5f703d
Showing
56 changed files
with
1,064 additions
and
13,209 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,5 @@ npm-debug.log | |
node_modules | ||
.idea/ | ||
.env | ||
*.iml | ||
*.iml | ||
temp.* |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,18 @@ | ||
import React from 'react'; | ||
import * as authService from "../services/AuthService"; | ||
|
||
export default React.createClass({ | ||
getInitialState() { | ||
return { url: "" }; | ||
}, | ||
|
||
componentDidMount() { | ||
authService.oauthOrgURL().then(url => this.setState({url})); | ||
}, | ||
|
||
render() { | ||
return ( | ||
<a href={this.state.url}>Connect Org</a> | ||
); | ||
} | ||
}); |
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,30 @@ | ||
import React from 'react'; | ||
|
||
export default class PortalWindow extends React.Component { | ||
constructor(props) { | ||
super(props); | ||
// STEP 1: create a container <div> | ||
this.containerEl = document.createElement('div'); | ||
this.externalWindow = null; | ||
} | ||
|
||
render() { | ||
return ( | ||
<div/> | ||
); | ||
} | ||
|
||
componentDidMount() { | ||
// STEP 3: open a new browser window and store a reference to it | ||
this.externalWindow = window.open(this.props.url, '', 'width=700,height=700,left=200,top=200'); | ||
|
||
// STEP 4: append the container <div> (that has props.children appended to it) to the body of the new window | ||
// this.externalWindow.document.body.appendChild(this.containerEl); | ||
} | ||
|
||
componentWillUnmount() { | ||
// STEP 5: This will fire when this.state.showWindowPortal in the parent component becomes false | ||
// So we tidy up by closing the window | ||
this.externalWindow.close(); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.