Thanks to visit codestin.com
Credit goes to github.com

Skip to content

LEFapps/lef-userui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lef-userui

Creates a dropdown menu to be used in a Bootstrap navbar for user actions (login, logout, forgot password, register).

Installation

  1. Add this repo as a git submodule in the /packages repository
  2. $ meteor add lef:userui
  3. Make sure the following icons are in your fontawesome library: faUser, faEye, faEyeSlash
    (Using an icons helper file* is recommended.)

Usage

Optionally set the profileUrl, userNamePath and the registerUrl (defaults to /register). Put a route in your app to handle the /reset-password request and a route to handle the /verify-email request.

import UserMenu, { ResetPasswordForm, VerifyEmailRoute } from 'meteor/lef:userui'

<UserMenu profileUrl='/profile' registerUrl='/register' userNamePath='profile.name' />

<Route exact path='/reset-password/:token' component={ResetPasswordForm} />
<Route exact path='/verify-email/:token' component={VerifyEmailRoute} />

Set Meteor.settings.public.url, this is used by userui and systemmailing to send email verification mails and the password reset mail.

Icons helper file

Import a file with this structure on startup:

import { library } from '@fortawesome/fontawesome-svg-core'
import { faUser } from '@fortawesome/free-solid-svg-icons/faUser'
import { faEye } from '@fortawesome/free-solid-svg-icons/faEye'
import { faEyeSlash } from '@fortawesome/free-solid-svg-icons/faEyeSlash'
library.add(faUser, faEye, faEyeSlash)

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published