mirror of
https://gitee.com/openharmony/useriam_user_auth_framework
synced 2024-11-23 15:49:52 +00:00
commit
9ddc8f2f2f
@ -27,7 +27,7 @@ const FINGERPRINT_ICON_RESOURCE = 'sys.media.ohos_user_auth_icon_fingerprint';
|
||||
export class UserAuthIcon extends ViewPU {
|
||||
constructor(b1, c1, d1, e1 = -1, f1 = undefined, g1) {
|
||||
super(b1, d1, e1, g1);
|
||||
if (typeof f1 === "function") {
|
||||
if (typeof f1 === 'function') {
|
||||
this.paramsGenerator_ = f1;
|
||||
}
|
||||
this.authParam = {
|
||||
@ -39,9 +39,9 @@ export class UserAuthIcon extends ViewPU {
|
||||
title: ''
|
||||
};
|
||||
this.iconHeight = 64;
|
||||
this.iconColor = { "id": -1, "type": 10001, params: ['sys.color.ohos_id_color_activated'], "bundleName": "__harDefaultBundleName__", "moduleName": "__harDefaultModuleName__" };
|
||||
this.iconColor = { 'id': -1, 'type': 10001, params: ['sys.color.ohos_id_color_activated'], 'bundleName': '__harDefaultBundleName__', 'moduleName': '__harDefaultModuleName__' };
|
||||
this.authFlag = ICON_UNAVAILABLE;
|
||||
this.__imageSource = new ObservedPropertySimplePU('', this, "imageSource");
|
||||
this.__imageSource = new ObservedPropertySimplePU('', this, 'imageSource');
|
||||
this.onAuthResult = (j1) => { };
|
||||
this.onIconClick = () => { };
|
||||
this.setInitiallyProvidedValue(c1);
|
||||
@ -164,7 +164,7 @@ export class UserAuthIcon extends ViewPU {
|
||||
Column.create();
|
||||
}, Column);
|
||||
this.observeComponentCreation2((d, e) => {
|
||||
Image.create({ "id": this.imageSource, params: [], "bundleName": "__harDefaultBundleName__", "moduleName": "__harDefaultModuleName__" });
|
||||
Image.create({ 'id': this.imageSource, params: [], 'bundleName': '__harDefaultBundleName__', 'moduleName': '__harDefaultModuleName__' });
|
||||
Image.width(this.iconHeight);
|
||||
Image.height(this.iconHeight);
|
||||
Image.fillColor(this.iconColor);
|
||||
|
@ -14,7 +14,7 @@
|
||||
*/
|
||||
|
||||
export default class BuildProfile {
|
||||
static readonly HAR_VERSION = '1.0.0';
|
||||
static readonly BUILD_MODE_NAME = 'release';
|
||||
static readonly DEBUG = false;
|
||||
public static readonly HAR_VERSION = '1.0.0';
|
||||
public static readonly BUILD_MODE_NAME = 'release';
|
||||
public static readonly DEBUG = false;
|
||||
}
|
@ -107,7 +107,7 @@ export struct UserAuthIcon {
|
||||
return;
|
||||
}
|
||||
if ((!authTypes.includes(userAuth.UserAuthType.FACE)) &&
|
||||
authTypes.includes(userAuth.UserAuthType.FINGERPRINT)){
|
||||
authTypes.includes(userAuth.UserAuthType.FINGERPRINT)) {
|
||||
// Handle the situation where the authTypes parameter contains fingerprint type but not contains face type.
|
||||
this.authFlag = ICON_AVAILABLE;
|
||||
this.imageSource = FINGERPRINT_ICON_RESOURCE;
|
||||
@ -115,7 +115,7 @@ export struct UserAuthIcon {
|
||||
}
|
||||
if (authTypes.includes(userAuth.UserAuthType.FACE) &&
|
||||
authTypes.includes(userAuth.UserAuthType.FINGERPRINT) &&
|
||||
authTypes.includes(userAuth.UserAuthType.PIN)){
|
||||
authTypes.includes(userAuth.UserAuthType.PIN)) {
|
||||
// Handle the situation where the authTypes parameter contains face, fingerprint, and PIN types at the same time.
|
||||
this.handleAllAuthTypeCase(authTrustLevel);
|
||||
return;
|
||||
@ -186,13 +186,14 @@ export struct UserAuthIcon {
|
||||
.fillColor(this.iconColor)
|
||||
.onClick(() => {
|
||||
this.info('start handle click event.');
|
||||
if(this.onIconClick !== undefined){
|
||||
if(this.onIconClick !== undefined) {
|
||||
this.info('click event has response.');
|
||||
this.onIconClick();
|
||||
}
|
||||
if (this.authFlag === ICON_AVAILABLE) {
|
||||
try {
|
||||
let userAuthInstance: userAuth.UserAuthInstance = userAuth.getUserAuthInstance(this.authParam,this.widgetParam);
|
||||
let userAuthInstance: userAuth.UserAuthInstance =
|
||||
userAuth.getUserAuthInstance(this.authParam,this.widgetParam);
|
||||
let timer: number = setTimeout(() => {
|
||||
this.error('auth timeout.');
|
||||
userAuthInstance.cancel();
|
||||
|
Loading…
Reference in New Issue
Block a user