npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ngx-gesture-password

v10.0.0

Published

A smart gesture password locker for angular

Downloads

502

Readme

ngx-gesture-password

A smart gesture password locker for angular (mobile browser)

来源于 如何用原生 JS 实现手势解锁组件,有兴趣可以深入阅读!

NPM version Ci

Demo

Online(only mobile mode)

screenshot

qr

Ionic

ionic

Usage

1. Install

npm install ngx-gesture-password --save

import GesturePasswordModule

import { GesturePasswordModule } from 'ngx-gesture-password';

@NgModule({
    imports: [ BrowserModule, GesturePasswordModule ],
    declarations: [AppComponent],
    bootstrap: [AppComponent]
})
export class AppModule { }

2、Template

<gesture-password style="height: 350px;"
        [(ngModel)]="pwd" [type]="type" [options]="options"
        (error)="onError($event)"
        (checked)="onChecked($event)"
        (beforeRepeat)="onBeforeRepeat($event)"
        (afterRepeat)="onAfterRepeat($event)"></gesture-password>

| Name | Type | Default | Summary | | ------- | ------------- | ----- | ----- | | type | 'check','recorder' | 'check' | check 检查手势密码,recorder 设置手势密码 | | options | Options | | 配置项 | | error | Function(res: Result) | | | | checked | Function(res: Result) | | 当 type==='check' 时每一次绘制完成后触发 | | beforeRepeat | Function(res: Result) | | 当 type==='recorder' 时第一次绘制完成后触发 | | afterRepeat | Function(res: Result) | | 当 type==='recorder' 时第二次绘制完成后触发 |

Options

| Name | Type | Default | Summary | | ------- | ------------- | ----- | ----- | | num | number | 3 | 圆点的数量 | | focusColor | string | #e06555 | 当前选中的圆的颜色 | | fgColor | string | #d6dae5 | 未选中的圆的颜色 | | bgColor | string | #fff | 背景颜色 | | innerRadius | number | 20 | 圆点的内半径 | | outerRadius | number | 50 | 圆点的外半径,focus 的时候显示 | | touchRadius | number | 70 | 判定touch事件的圆半径 | | render | boolean | true | 自动渲染 | | min | number | 3 | 最小允许的点数 | | passwords | string[] | | 密码编码,数量必须是 num*num,否则会产生Error;默认值:[ '1', '2', '3', '4', '5', '6', '7', '8', '9'] |

Enum ERR

  • SUCCESS、null、undefined 密码属于有效值。
  • NOT_ENOUGH_POINTS 不足最少节点
  • PASSWORD_MISMATCH 密码不匹配
  • USER_CANCELED 用户主动取消

Result

| Name | Type | Default | Summary | | ------- | ------------- | ----- | ----- | | err | ERR | | 错误状态,见 enum ERR | | result | string | | 根据密码编码解析后的真实密码值 | | records | Array | | 路径数据,只有成功状态才会返回 |

Troubleshooting

Please follow this guidelines when reporting bugs and feature requests:

  1. Use GitHub Issues board to report bugs and feature requests (not our email address)
  2. Please always write steps to reproduce the error. That way we can focus on fixing the bug, not scratching our heads trying to reproduce it.

Thanks for understanding!

License

The MIT License (see the LICENSE file for the full text)