mirror of
https://github.com/documize/community.git
synced 2025-07-24 15:49:44 +02:00
responsive login, profile new UX
This commit is contained in:
parent
2ba948bc82
commit
68f5008a52
7 changed files with 32 additions and 47 deletions
|
@ -20,7 +20,10 @@ export default Component.extend(AuthProvider, {
|
|||
password: { password: "", confirmation: "" },
|
||||
hasFirstnameError: empty('model.firstname'),
|
||||
hasLastnameError: empty('model.lastname'),
|
||||
hasEmailError: empty('model.email'),
|
||||
hasEmailError: computed('model.email', function() {
|
||||
let email = this.get('model.email');
|
||||
return isEmpty(email) || is.not.email(email);
|
||||
}),
|
||||
hasPasswordError: computed('passwordError', 'password.password', {
|
||||
get() {
|
||||
if (isPresent(this.get('passwordError'))) {
|
||||
|
@ -35,10 +38,10 @@ export default Component.extend(AuthProvider, {
|
|||
hasConfirmPasswordError: computed('confirmPasswordError', {
|
||||
get() {
|
||||
if (isPresent(this.get("confirmPasswordError"))) {
|
||||
return `error`;
|
||||
return `is-invalid`;
|
||||
}
|
||||
|
||||
return;
|
||||
return '';
|
||||
}
|
||||
}),
|
||||
|
||||
|
|
|
@ -1,15 +1,5 @@
|
|||
{{#layout/zone-container}}
|
||||
{{#layout/zone-sidebar}}
|
||||
<div class="sidebar-common">
|
||||
{{layout/sidebar-intro title="Profile" message="Your user profile"}}
|
||||
</div>
|
||||
<div class="sidebar-wrapper">
|
||||
<div class="sidebar-menu">
|
||||
<div class="avatar-large">{{session.user.initials}}</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/layout/zone-sidebar}}
|
||||
{{#layout/zone-content}}
|
||||
{{user-profile model=model save=(action 'save')}}
|
||||
{{/layout/zone-content}}
|
||||
{{/layout/zone-container}}
|
||||
{{layout/nav-bar}}
|
||||
|
||||
<div class="container">
|
||||
{{user-profile model=model save=(action 'save')}}
|
||||
</div>
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
@import "widget/widget.scss";
|
||||
@import "view/layout.scss"; // junk?
|
||||
@import "view/page-search.scss";
|
||||
@import "view/page-profile.scss";
|
||||
@import "view/page-customize.scss";
|
||||
@import "view/page-auth.scss";
|
||||
@import "view/page-onboard.scss";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
.auth-box {
|
||||
display: inline-block;
|
||||
height: 500px;
|
||||
width: 500px;
|
||||
max-width: 500px;
|
||||
padding: 20px 50px;
|
||||
background-color: $color-white;
|
||||
color: $color-off-black;
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
.page-profile {
|
||||
@include content-container();
|
||||
}
|
|
@ -42,7 +42,7 @@
|
|||
<i class="material-icons">edit</i>
|
||||
</div>
|
||||
<div class="button-icon-gap" />
|
||||
<div id="{{concat 'delete-category-' cat.id}}" class="button-icon-red align-middle" data-toggle="tooltip" data-placement="top" title="Delete" {{action 'onShowDelete' cat.id}}>
|
||||
<div id="{{concat 'delete-category-' cat.id}}" class="button-icon-danger align-middle" data-toggle="tooltip" data-placement="top" title="Delete" {{action 'onShowDelete' cat.id}}>
|
||||
<i class="material-icons">delete</i>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
|
|
@ -1,31 +1,27 @@
|
|||
<div class="page-profile">
|
||||
<div class="form-header">
|
||||
<div class="title">About You</div>
|
||||
<div class="tip"></div>
|
||||
</div>
|
||||
<div class="input-control">
|
||||
<label>Firstname</label>
|
||||
{{focus-input id="firstname" type="text" value=model.firstname class=(if hasFirstnameError 'error')}}
|
||||
<div class="view-profile my-5">
|
||||
<div class="avatar-large">{{session.user.initials}}</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="firstname">Firstname</label>
|
||||
{{focus-input id="firstname" type="text" value=model.firstname class=(if hasFirstnameError 'form-control is-invalid' 'form-control')}}
|
||||
</div>
|
||||
<div class="input-control">
|
||||
<label>Lastname</label>
|
||||
{{input id="lastname" type="text" value=model.lastname class=(if hasLastnameError 'error')}}
|
||||
<div class="form-group">
|
||||
<label for="lastname">Lastname</label>
|
||||
{{input id="lastname" type="text" value=model.lastname class=(if hasLastnameError 'form-control is-invalid' 'form-control')}}
|
||||
</div>
|
||||
<div class="input-control">
|
||||
<label>Email</label>
|
||||
{{input id="email" type="text" value=model.email class=(if hasEmailError 'error')}}
|
||||
<div class="form-group">
|
||||
<label for="email">Email</label>
|
||||
{{input id="email" type="email" value=model.email class=(if hasEmailError 'form-control is-invalid' 'form-control')}}
|
||||
</div>
|
||||
{{#if isAuthProviderDocumize}}
|
||||
<div class="input-control">
|
||||
<label>Password</label>
|
||||
<div class="tip">New password</div>
|
||||
{{input id="password" type="password" value=password.password class=hasPasswordError}}
|
||||
<div class="form-group">
|
||||
<label for="password">Password</label>
|
||||
{{input id="password" type="password" value=password.password class=(if hasPasswordError 'form-control is-invalid' 'form-control')}}
|
||||
</div>
|
||||
<div class="input-control">
|
||||
<label>Confirm Password</label>
|
||||
<div class="tip">Confirm your new password</div>
|
||||
{{input id="confirmPassword" type="password" value=password.confirmation class=hasConfirmPasswordError}}
|
||||
<div class="form-group">
|
||||
<label for="confirmPassword">Confirm Password</label>
|
||||
{{input id="confirmPassword" type="password" value=password.confirmation class=(if hasConfirmPasswordError 'form-control is-invalid' 'form-control')}}
|
||||
</div>
|
||||
{{/if}}
|
||||
<div class="regular-button button-blue" {{ action 'save' }}>save</div>
|
||||
<div class="btn btn-success" {{ action 'save' }}>save</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue