-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
replace login information page with React/Material-UI
- Loading branch information
Showing
5 changed files
with
59 additions
and
9 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,49 @@ | ||
/* | ||
* login - login.js | ||
* | ||
* Copyright (C) 2016 by The wasam@s production | ||
* You can modify and/or distribute this under GPL. | ||
*/ | ||
import 'babel-polyfill'; | ||
import 'whatwg-fetch'; | ||
import * as React from 'react'; | ||
import {render} from 'react-dom'; | ||
import {Flux} from 'flumpt'; | ||
import injectTapEventPlugin from 'react-tap-event-plugin'; | ||
import {MuiThemeProvider, RaisedButton} from 'material-ui'; | ||
import ImageNavigateNext from 'material-ui/svg-icons/image/navigate-next'; | ||
import Footer from './component/footer'; | ||
import muiTheme from './theme'; | ||
|
||
require('../css/default.css'); | ||
injectTapEventPlugin(); | ||
|
||
const main = document.querySelector('#main'); | ||
const state = { | ||
}; | ||
|
||
class Login extends Flux { | ||
render(state) { | ||
return( | ||
<div> | ||
<MuiThemeProvider muiTheme={muiTheme}> | ||
<RaisedButton label="Login with Twitter" | ||
onTouchTap={e => {location.href = "/auth/twitter"}} | ||
primary={true} | ||
icon={<ImageNavigateNext/>} | ||
/> | ||
</MuiThemeProvider> | ||
<Footer/> | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
const app = new Login({ | ||
renderer: el => { | ||
render(el, main); | ||
}, | ||
initialState: state | ||
}); | ||
app.update(_initialState => (state)); | ||
|
Empty file.
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