Commit d2e1298251284bb2c8e3802ccd0f45762e03f70d
1 parent
878ca8a152
Exists in
master
added reactstrap
Showing
2 changed files
with
37 additions
and
7 deletions
Show diff stats
imports/client/views/nonOrg/app/module/AppLayout.js
... | ... | @@ -9,13 +9,28 @@ import classNames from 'classnames'; |
9 | 9 | import { logout } from '/imports/client/app/utils/loginMethods'; |
10 | 10 | |
11 | 11 | import Signup from '/imports/client/views/nonOrg/enter/SignupView'; |
12 | -import { VerifyModule } from '/imports/client/views/verify/module/index'; | |
13 | -import ReactSVG from 'react-svg' | |
12 | +import { Collapse, Navbar, NavbarToggler, | |
13 | + NavbarBrand, Nav, NavItem, NavLink } from 'reactstrap'; | |
14 | + | |
14 | 15 | |
15 | 16 | export class AppLayout extends Component { |
17 | + constructor(props) { | |
18 | + super(props); | |
19 | + | |
20 | + this.toggle = this.toggle.bind(this); | |
21 | + this.state = { | |
22 | + isOpen: false | |
23 | + }; | |
24 | + } | |
25 | + toggle() { | |
26 | + this.setState({ | |
27 | + isOpen: !this.state.isOpen | |
28 | + }); | |
29 | + } | |
16 | 30 | render() { |
17 | 31 | const {user, org} = this.props.data; |
18 | 32 | console.log(user); |
33 | + console.log(org); | |
19 | 34 | if(!user) { |
20 | 35 | return ( |
21 | 36 | <Signup |
... | ... | @@ -31,17 +46,32 @@ export class AppLayout extends Component { |
31 | 46 | /> |
32 | 47 | ); |
33 | 48 | } |
34 | - | |
35 | - | |
49 | + const theUrl = Meteor.absoluteUrl(); | |
50 | + OrgUrl = theUrl.replace("http://","http://"+org.slug+"."); | |
36 | 51 | return ( |
37 | 52 | <div className = "appLayout-box"> |
53 | + <Navbar color="faded" light toggleable> | |
54 | + <NavbarToggler right onClick={this.toggle} /> | |
55 | + <NavbarBrand href="/">reactstrap</NavbarBrand> | |
56 | + <Collapse isOpen={this.state.isOpen} navbar> | |
57 | + <Nav className="ml-auto" navbar> | |
58 | + <NavItem> | |
59 | + <NavLink href="/components/">Components</NavLink> | |
60 | + </NavItem> | |
61 | + <NavItem> | |
62 | + <NavLink href="https://github.com/reactstrap/reactstrap">Github</NavLink> | |
63 | + </NavItem> | |
64 | + </Nav> | |
65 | + </Collapse> | |
66 | + </Navbar> | |
38 | 67 | <div className = "appLayout-wrapOuter"> |
39 | 68 | <div className = "appLayout-wrapInner"> |
40 | 69 | <div className = "appLayout-menuWrap"> |
41 | 70 | </div> |
42 | 71 | <div className = "appLayout-contentWrap"> |
43 | 72 | <div className = "appLayout-content"> |
44 | - | |
73 | + Hi, {user.getFullName()}, | |
74 | + Please visit your organization page by <a href={OrgUrl}>clicking here </a> and login using your credentials! | |
45 | 75 | </div> |
46 | 76 | </div> |
47 | 77 | </div> | ... | ... |
package.json
... | ... | @@ -64,7 +64,7 @@ |
64 | 64 | "dependencies": { |
65 | 65 | "babel-runtime": "^6.18.0", |
66 | 66 | "bcrypt": "^0.8.7", |
67 | - "bootstrap": "^3.3.7", | |
67 | + "bootstrap": "^4.0.0-alpha.6", | |
68 | 68 | "jquery": "^2.2.4", |
69 | 69 | "jquery-validation": "^1.15.1", |
70 | 70 | "moment": "^2.18.0", |
... | ... | @@ -80,7 +80,7 @@ |
80 | 80 | "react-router": "^2.6.1", |
81 | 81 | "react-router-bootstrap": "^0.23.1", |
82 | 82 | "react-svg": "^2.1.19", |
83 | - "reactstrap": "^4.2.0", | |
83 | + "reactstrap": "^4.3.0", | |
84 | 84 | "velocity-animate": "^1.4.3", |
85 | 85 | "velocity-react": "^1.2.1" |
86 | 86 | } | ... | ... |