Форма с правами приложения

This commit is contained in:
SleepWalker 2016-01-09 17:47:21 +02:00
parent 4acc48cbea
commit 37339e6b04
5 changed files with 118 additions and 31 deletions

View File

@ -5,7 +5,7 @@ import classNames from 'classnames';
import buttons from 'components/ui/buttons.scss'; import buttons from 'components/ui/buttons.scss';
import icons from 'components/ui/icons.scss'; import icons from 'components/ui/icons.scss';
import { Panel, PanelBody, PanelFooter, PanelError } from 'components/ui/Panel'; import { Panel, PanelBody, PanelFooter, PanelBodyHeader } from 'components/ui/Panel';
import { Input, Checkbox } from 'components/ui/Form'; import { Input, Checkbox } from 'components/ui/Form';
import styles from './signIn.scss'; import styles from './signIn.scss';
@ -56,19 +56,17 @@ export default class SignIn extends Component {
<div className={styles.signIn}> <div className={styles.signIn}>
<Panel icon="arrowLeft" title={<Message {...messages.enterPassword} />}> <Panel icon="arrowLeft" title={<Message {...messages.enterPassword} />}>
<PanelBody> <PanelBody>
<PanelError message={ <PanelBodyHeader type="error">
<span> <Message {...messages.invalidPassword} />
<Message {...messages.invalidPassword} /> <br/>
<br/> <Message {...messages.suggestResetPassword} values={{
<Message {...messages.suggestResetPassword} values={{ link: (
link: ( <a href="#">
<a href="#"> <Message {...messages.forgotYourPassword} />
<Message {...messages.forgotYourPassword} /> </a>
</a> )
) }} />
}} /> </PanelBodyHeader>
</span>
} />
<div className={styles.miniProfile}> <div className={styles.miniProfile}>
<div className={styles.avatar}> <div className={styles.avatar}>
{/*<img src="//lorempixel.com/g/90/90" />*/} {/*<img src="//lorempixel.com/g/90/90" />*/}
@ -101,17 +99,20 @@ export default class SignIn extends Component {
<div className={styles.signIn}> <div className={styles.signIn}>
<Panel title={<Message {...messages.permissionsTitle} />}> <Panel title={<Message {...messages.permissionsTitle} />}>
<PanelBody> <PanelBody>
<div className={styles.authInfo}> <PanelBodyHeader>
<div className={styles.avatar}> <div className={styles.authInfo}>
<img src="//lorempixel.com/g/90/90" /> <div className={styles.authInfoAvatar}>
{/*<img src="//lorempixel.com/g/90/90" />*/}
<span className={icons.user} />
</div>
<div className={styles.authInfoTitle}>
<Message {...messages.youAuthorizedAs} />
</div>
<div className={styles.authInfoEmail}>
erickskrauch@yandex.ru
</div>
</div> </div>
<div className={styles.email}> </PanelBodyHeader>
<Message {...messages.youAuthorizedAs} />
</div>
<div className={styles.email}>
erickskrauch@yandex.ru
</div>
</div>
<div className={styles.disclaimer}> <div className={styles.disclaimer}>
<Message {...messages.theAppNeedsAccess} /> <Message {...messages.theAppNeedsAccess} />
</div> </div>

View File

@ -37,7 +37,7 @@
width: 90px; width: 90px;
height: 90px; height: 90px;
font-size: 90px; font-size: 90px;
line-height: 90px; line-height: 1;
margin: 0 auto; margin: 0 auto;
img { img {
@ -70,3 +70,62 @@
font-size: 16px; font-size: 16px;
line-height: 1.2; line-height: 1.2;
} }
// app permissions
.authInfo {
padding: 0 5px;
overflow: hidden;
text-align: left;
}
.authInfoAvatar {
float: left;
height: 40px;
width: 40px;
font-size: 40px;
line-height: 1;
margin-right: 10px;
color: #aaa;
img {
width: 100%;
}
}
.authInfoTitle {
font-size: 14px;
color: #666;
}
.authInfoEmail {
font-family: $font-family-title;
font-size: 20px;
color: #fff;
}
.disclaimer {
font-family: $font-family-title;
font-size: 18px;
color: #dd8650;
}
.permissionsList {
text-align: left;
list-style: none;
margin: 10px 0;
li {
color: #a9a9a9;
&:before {
content: "";
color: lighter($light_violet);
font-size: 30px;
line-height: 20px;
display: inline-block;
height: 20px;
vertical-align: middle;
margin-right: 5px;
}
}
}

View File

@ -56,13 +56,21 @@ export function PanelFooter(props) {
); );
} }
export function PanelError(props) { export function PanelBodyHeader(props) {
var { message } = props; var { type = 'default' } = props;
var close;
if (type === 'error') {
close = (
<span className={styles.close} />
);
}
return ( return (
<div className={styles.error}> <div className={styles[`${type}BodyHeader`]}>
<span className={styles.close} /> {close}
{message} {props.children}
</div> </div>
); );
} }

View File

@ -61,11 +61,15 @@
} }
} }
.error { .bodyHeader {
position: relative; position: relative;
padding: 10px; padding: 10px;
margin: -15px; margin: -15px;
margin-bottom: 15px; margin-bottom: 15px;
}
.errorBodyHeader {
composes: bodyHeader;
background: #e66c69; background: #e66c69;
border: 1px #e15457 solid; border: 1px #e15457 solid;
@ -75,6 +79,19 @@
color: #fff; color: #fff;
} }
.defaultBodyHeader {
composes: bodyHeader;
background: darker($black);
border: lighter($black) solid;
border-bottom-width: 5px;
border-top-width: 4px;
font-size: 14px;
line-height: 1.3;
color: #fff;
}
.close { .close {
composes: close from './icons.scss'; composes: close from './icons.scss';

View File

@ -18,6 +18,8 @@ a {
text-decoration: none; text-decoration: none;
} }
ul,
li,
h1, h1,
h2, h2,