Giter Site home page Giter Site logo

spikef / react-native-gesture-password Goto Github PK

View Code? Open in Web Editor NEW
549.0 549.0 122.0 119 KB

A gesture password component for React Native. It supports both iOS and Android since it's written in pure JavaScript.

License: MIT License

JavaScript 100.00%
gesture-password interval javascript react react-native

react-native-gesture-password's People

Contributors

caledhwa avatar chasonhgg avatar corey-phillips avatar fuadarradhi avatar hexueguo avatar hosseinmd avatar leecade avatar mokto avatar sm2017 avatar spikef avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

react-native-gesture-password's Issues

Change width-height of PasswordGesture component

Hi, even if we can override the styles of the component, we can't override height or width as they are fixed const. And they are used everywhere in file to set layout's height/width.
For example, by:

 <PasswordGesture
          style={{width:400, height:680}}
          ref="pg"
          status={this.state.status}
          message={this.state.message}
          onStart={() => this.onStart()}
          onEnd={password => this.onEnd(password)}
        />

Absolutely nothing happens.
Is there any option to alter it's height/width?
In fact, i want to enter the password-gesture inside a popup window, but i need to override Width = Dimensions.get('window').width and Height = Dimensions.get('window').height with parent's height/width, which is the size of the window popup .
So to sum up, my question is:
Is there any way to make the GesturePassword inherit height/width from parent view?
This issue was also referenced in #16 but closed without fix.

在react16版本上不兼容

React.PropTypes在react16版本中无法使用,因为在React15.5版本以后PropTypes已经迁移到另一个库里去了,新的调用方式如下:
import PropTypes from 'prop-types';

计算crossChar 时的bug

96c366d4-56d7-42aa-b0e7-bed7d2537227

计算crossChar时,中间的五个点被认为是不可能有crossChar的,但1和7,3和5是可能的,所以即使allowCross为false仍可以跳过中间的点

image

不知道是不是有意这样的,但与allowCross的直观理解不太相符。。

password is not get from onEnd function.

OnEnd function does not return the password and I have checked inside the library there is also "const password = helper.getRealPassword(this. sequence);" not getting anything in the password variable, and there is one more problem that line is not visible and not inner circle is visible can anyone help me in this.

Please update /source/index.js

File: /source/index.js

This line no longer valid in the latest version of RN.
let Dimensions=require("Dimensions");

Recommended:
import { Dimensions } from 'react-native'

Thank you!

allowCross为false的时候,正中间的点依旧可以从上下或者左右跨过

问题出在这段代码:

index文件;
getCrossChar(char) {
let middles = '13457', last = String(this.lastIndex);
// if ( middles.indexOf(char) > -1 || middles.indexOf(last) > -1 ) return false;
let point = helper.getMiddlePoint(this.state.circles[last], this.state.circles[char]);
for (let i=0; i < middles.length; i++) {
let index = middles[i];
if ( helper.isEquals(point, this.state.circles[index]) ) {
return String(index);
}
}
return false;
}
这个方法的 // if ( middles.indexOf(char) > -1 || middles.indexOf(last) > -1 ) return false;这一句话放错的地方,应该放在最后或者直接注释。

How to use the PasswordGesture as a subview in my Component

In my page Component, I have some other views, I have left an empty area for the PasswordGesture to display.
But when I layout the PasswordGesture in the area , the full screen was occupied by the PasswordGesture.

What's the better way to use PasswordGesture as a subview?

Thanks.

Warning function componentWillReceiveProps

This is from react :

This lifecycle was previously named componentWillReceiveProps. That name will continue to work until version 17. Use the rename-unsafe-lifecycles codemod to automatically update your components.

I think admin should update this function. Thanks

Increase circles hit area

The gesture is working very well, but is very sensitive about the touched position, especially as you test on a real device where the finger touches "lower" than expected.

Is there a way to increase the hit area of circles, or at least to increase the size of circles?

Thanks!

【iOS】缩略小图及圈变成点

作者您好,我使用您的这个组件集成在我的项目里面,但是目前遇到了两个问题:
1、请问这个组件有缩略图thumbnails功能吗?
2、目前组件是3个点即可设置成功,请问如何设置为最少4个点才能设置成功?
非常感谢~!!!

控制circle颜色

您好,如果要控制手势轨迹的显示和隐藏有办法做到吗,好像目前提供的属性中无法设置

Set pattern programmatically.

Can i show pattern by setting value programmatically. If so can you guide me how ? Because i don't see any method for this.

How to add lock component to Lock Screen

Hello dude, I like your library. I want to make an pattern lock app which shows on home screen. My components are ready, now I don't know how to put it on home screen ? Plz help..

about children

if I want to render two buttons in children of props. what should I do ? I try to render fullScreen view that contains all buttons. it will show that PasswordGesture is covered .

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.