feat: can add faceId by uploading images (#3641)

This commit is contained in:
DacongDA
2025-03-09 01:29:25 +08:00
committed by GitHub
parent a39a311d2f
commit 9610ce5b8c
2 changed files with 169 additions and 61 deletions

View File

@ -97,12 +97,16 @@ class FaceIdTable extends React.Component {
title={() => (
<div>
{i18next.t("user:Face IDs")}&nbsp;&nbsp;&nbsp;&nbsp;
<Button disabled={this.props.table?.length >= 5} style={{marginRight: "5px"}} type="primary" size="small" onClick={() => this.setState({openFaceRecognitionModal: true})}>
<Button disabled={this.props.table?.length >= 5} style={{marginRight: "5px"}} type="primary" size="small" onClick={() => this.setState({openFaceRecognitionModal: true, withImage: false})}>
{i18next.t("general:Add Face Id")}
</Button>
<Button disabled={this.props.table?.length >= 5} style={{marginRight: "5px"}} type="primary" size="small" onClick={() => this.setState({openFaceRecognitionModal: true, withImage: true})}>
{i18next.t("general:Add Face Id with image")}
</Button>
<Suspense fallback={null}>
<FaceRecognitionModal
visible={this.state.openFaceRecognitionModal}
withImage={this.state.withImage}
onOk={(faceIdData) => {
this.addFaceId(table, faceIdData);
this.setState({openFaceRecognitionModal: false});