Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make visibility icon right #1792

Merged
merged 4 commits into from Jan 15, 2019
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
25 changes: 18 additions & 7 deletions src/foam/u2/view/PasswordView.js
Expand Up @@ -36,10 +36,23 @@ foam.CLASS({
}
`,

constants: [
{
type: 'String',
name: 'VISIBILITY',
value: '/foam2/src/foam/u2/images/visibility.svg'
},
{
type: 'String',
name: 'VISIBILITY_OFF',
value: '/foam2/src/foam/u2/images/visibility-off.svg'
}
],

properties: [
{
name: 'visibilityIcon',
value: '/foam2/src/foam/u2/images/visibility.svg'
value: '/foam2/src/foam/u2/images/visibility-off.svg'
Henry0422 marked this conversation as resolved.
Show resolved Hide resolved
},
{
class: 'Boolean',
Expand Down Expand Up @@ -87,13 +100,11 @@ foam.CLASS({
listeners: [
function visible() {
if ( this.passwordInvisible ) {
// Password visible
this.visibleIcon('/foam2/src/foam/u2/images/visibility-off.svg',
'text');
// Make password visible
this.visibleIcon(this.VISIBILITY, 'text');
} else {
// Password invisible
this.visibleIcon('/foam2/src/foam/u2/images/visibility.svg',
'password');
// Make password invisible
this.visibleIcon(this.VISIBILITY_OFF, 'password');
}
}
]
Expand Down