Commit ad69864f3b813fbc9b5bb2d856b9da4fd7ca5f8d
1 parent
8093641bf4
Exists in
master
added ydapp.in support
Showing
2 changed files
with
13 additions
and
5 deletions
Show diff stats
imports/client/app/routes.js
... | ... | @@ -98,10 +98,18 @@ const authenticate = (nextState, replace) => { |
98 | 98 | const detectOrg = () => { |
99 | 99 | orgSlug = ""; |
100 | 100 | var hostnameArray = document.location.hostname.split( "." ); |
101 | - if(hostnameArray[1]=='localhost'){ | |
102 | - orgSlug = hostnameArray[0]; | |
101 | + if(hostnameArray[0] !== "www"){ | |
102 | + if((hostnameArray[1]==='localhost'||hostnameArray[1]==='ydapp')){ | |
103 | + orgSlug = hostnameArray[0]; | |
104 | + } | |
105 | + }else{ | |
106 | + if((hostnameArray[2]==='localhost'||hostnameArray[2]==='ydapp')){ | |
107 | + orgSlug = hostnameArray[1]; | |
108 | + } | |
103 | 109 | } |
104 | - if(orgSlug!=""){ | |
110 | + | |
111 | + if(orgSlug!==""){ | |
112 | + console.log(orgSlug); | |
105 | 113 | Meteor.call('checkExistingOrg', {slug:orgSlug}, function(err, res) { |
106 | 114 | if(res){ |
107 | 115 | Session.set('orgId', res._id); | ... | ... |
imports/client/views/nonOrg/enter/SignupView.js
... | ... | @@ -4,7 +4,7 @@ import { Icon } from '/imports/client/components/Icon' |
4 | 4 | import { LinkContainer } from 'react-router-bootstrap'; |
5 | 5 | import { Row, Col, FormGroup, |
6 | 6 | ControlLabel, FormControl, |
7 | - InputGroup, Button, | |
7 | + InputGroup, Button, | |
8 | 8 | Navbar,Modal, Nav, NavItem, |
9 | 9 | Glyphicon, Collapse, |
10 | 10 | NavbarToggler, NavbarBrand, |
... | ... | @@ -34,7 +34,7 @@ export default class Signup extends React.Component { |
34 | 34 | this.setState({ orgSlug: e.target.value }); |
35 | 35 | } |
36 | 36 | handleSubmit(event) { |
37 | - event.preventDeult(); | |
37 | + event.preventDefault(); | |
38 | 38 | } |
39 | 39 | checkExistingOrgSlug() { |
40 | 40 | if(this.state.orgSlug==""){return null} | ... | ... |