Compare commits

...

4 Commits

Author SHA1 Message Date
6037f37b87 feat: add default token format for built-in app 2024-03-17 20:46:01 +08:00
1b478903d8 feat: fix login page error cannot show bug 2024-03-17 11:39:12 +08:00
4f5ac7a10b Fix Face IDs label 2024-03-17 09:56:24 +08:00
e81ba62234 Improve Face ID signin method UI 2024-03-17 09:56:23 +08:00
31 changed files with 49 additions and 29 deletions

View File

@ -110,6 +110,11 @@
"name": "WebAuthn",
"displayName": "WebAuthn",
"rule": "None"
},
{
"name": "Face ID",
"displayName": "Face ID",
"rule": "None"
}
],
"signupItems": [
@ -179,8 +184,10 @@
"refresh_token"
],
"redirectUris": [
""
"http://localhost:9000/callback"
],
"tokenFormat": "JWT",
"tokenFields": [],
"expireInHours": 168,
"failedSigninLimit": 5,
"failedSigninFrozenTime": 15

View File

@ -311,6 +311,9 @@ func extendApplicationWithSigninMethods(application *Application) (err error) {
signinMethod := &SigninMethod{Name: "WebAuthn", DisplayName: "WebAuthn", Rule: "None"}
application.SigninMethods = append(application.SigninMethods, signinMethod)
}
signinMethod := &SigninMethod{Name: "Face ID", DisplayName: "Face ID", Rule: "None"}
application.SigninMethods = append(application.SigninMethods, signinMethod)
}
if len(application.SigninMethods) == 0 {

View File

@ -184,6 +184,7 @@ func initBuiltInApplication() {
{Name: "Password", DisplayName: "Password", Rule: "All"},
{Name: "Verification code", DisplayName: "Verification code", Rule: "All"},
{Name: "WebAuthn", DisplayName: "WebAuthn", Rule: "None"},
{Name: "Face ID", DisplayName: "Face ID", Rule: "None"},
},
SignupItems: []*SignupItem{
{Name: "ID", Visible: false, Required: true, Prompted: false, Rule: "Random"},
@ -197,6 +198,7 @@ func initBuiltInApplication() {
},
Tags: []string{},
RedirectUris: []string{},
TokenFormat: "JWT",
TokenFields: []string{},
ExpireInHours: 168,
FormOffset: 2,

View File

@ -50,6 +50,7 @@ class ApplicationListPage extends BaseListPage {
{name: "Password", displayName: "Password", rule: "All"},
{name: "Verification code", displayName: "Verification code", rule: "All"},
{name: "WebAuthn", displayName: "WebAuthn", rule: "None"},
{name: "Face ID", displayName: "Face ID", rule: "None"},
],
signupItems: [
{name: "ID", visible: false, required: true, rule: "Random"},

View File

@ -71,7 +71,9 @@ class EntryPage extends React.Component {
this.props.updataThemeData(themeData);
this.props.updateApplication(application);
localStorage.setItem("applicationName", application.name);
if (application) {
localStorage.setItem("applicationName", application.name);
}
};
const onUpdatePricing = (pricing) => {

View File

@ -980,11 +980,11 @@ class UserEditPage extends React.Component {
return (
<Row style={{marginTop: "20px"}} >
<Col style={{marginTop: "5px"}} span={(Setting.isMobile()) ? 22 : 2}>
{Setting.getLabel(i18next.t("user:Face ids"), i18next.t("user:Face ids"))} :
{Setting.getLabel(i18next.t("user:Face IDs"), i18next.t("user:Face IDs"))} :
</Col>
<Col span={22} >
<FaceIdTable
title={i18next.t("user:Face ids")}
title={i18next.t("user:Face IDs")}
table={this.state.user.faceIds}
onUpdateTable={(table) => {this.updateUserField("faceIds", table);}}
/>

View File

@ -1066,7 +1066,12 @@ class LoginPage extends React.Component {
application?.signinMethods?.forEach((signinMethod) => {
const item = itemsMap.get(generateItemKey(signinMethod.name, signinMethod.rule));
if (item) {
const label = signinMethod.name === signinMethod.displayName ? item.label : signinMethod.displayName;
let label = signinMethod.name === signinMethod.displayName ? item.label : signinMethod.displayName;
if (application?.signinMethods?.length >= 4 && label === "Verification code") {
label = "Code";
}
items.push({label: label, key: item.key});
}
});

View File

@ -1081,7 +1081,7 @@
"Email/phone reset successfully": "Email/phone reset successfully",
"Empty input!": "Empty input!",
"Face ID": "Face ID",
"Face ids": "Face ids",
"Face IDs": "Face IDs",
"Gender": "Gender",
"Gender - Tooltip": "Gender - Tooltip",
"Homepage": "Homepage",

View File

@ -1081,7 +1081,7 @@
"Email/phone reset successfully": "E-Mail-/Telefon-Zurücksetzung erfolgreich durchgeführt",
"Empty input!": "Leere Eingabe!",
"Face ID": "Face ID",
"Face ids": "Face ids",
"Face IDs": "Face IDs",
"Gender": "Gender",
"Gender - Tooltip": "Gender - Tooltip",
"Homepage": "Startseite des Benutzers",

View File

@ -1081,7 +1081,7 @@
"Email/phone reset successfully": "Email/phone reset successfully",
"Empty input!": "Empty input!",
"Face ID": "Face ID",
"Face ids": "Face ids",
"Face IDs": "Face IDs",
"Gender": "Gender",
"Gender - Tooltip": "Gender - Tooltip",
"Homepage": "Homepage",

View File

@ -1081,7 +1081,7 @@
"Email/phone reset successfully": "Restablecimiento de correo electrónico/teléfono exitoso",
"Empty input!": "¡Entrada vacía!",
"Face ID": "Face ID",
"Face ids": "Face ids",
"Face IDs": "Face IDs",
"Gender": "Gender",
"Gender - Tooltip": "Gender - Tooltip",
"Homepage": "Página de inicio del usuario",

View File

@ -1081,7 +1081,7 @@
"Email/phone reset successfully": "Email/phone reset successfully",
"Empty input!": "Empty input!",
"Face ID": "Face ID",
"Face ids": "Face ids",
"Face IDs": "Face IDs",
"Gender": "Gender",
"Gender - Tooltip": "Gender - Tooltip",
"Homepage": "Homepage",

View File

@ -1081,7 +1081,7 @@
"Email/phone reset successfully": "Email/phone reset successfully",
"Empty input!": "Empty input!",
"Face ID": "Face ID",
"Face ids": "Face ids",
"Face IDs": "Face IDs",
"Gender": "Gender",
"Gender - Tooltip": "Gender - Tooltip",
"Homepage": "Homepage",

View File

@ -1081,7 +1081,7 @@
"Email/phone reset successfully": "E-mail ou téléphone réinitialisé avec succès",
"Empty input!": "Champ vide !",
"Face ID": "Face ID",
"Face ids": "Face ids",
"Face IDs": "Face IDs",
"Gender": "Genre",
"Gender - Tooltip": "Genre - Infobulle",
"Homepage": "Site web",

View File

@ -1081,7 +1081,7 @@
"Email/phone reset successfully": "Email/phone reset successfully",
"Empty input!": "Empty input!",
"Face ID": "Face ID",
"Face ids": "Face ids",
"Face IDs": "Face IDs",
"Gender": "Gender",
"Gender - Tooltip": "Gender - Tooltip",
"Homepage": "Homepage",

View File

@ -1081,7 +1081,7 @@
"Email/phone reset successfully": "Email/telepon berhasil diatur ulang",
"Empty input!": "Masukan kosong!",
"Face ID": "Face ID",
"Face ids": "Face ids",
"Face IDs": "Face IDs",
"Gender": "Gender",
"Gender - Tooltip": "Gender - Tooltip",
"Homepage": "Homepage",

View File

@ -1081,7 +1081,7 @@
"Email/phone reset successfully": "Email/phone reset successfully",
"Empty input!": "Empty input!",
"Face ID": "Face ID",
"Face ids": "Face ids",
"Face IDs": "Face IDs",
"Gender": "Gender",
"Gender - Tooltip": "Gender - Tooltip",
"Homepage": "Homepage",

View File

@ -1081,7 +1081,7 @@
"Email/phone reset successfully": "メール/電話のリセットが成功しました",
"Empty input!": "空の入力!",
"Face ID": "Face ID",
"Face ids": "Face ids",
"Face IDs": "Face IDs",
"Gender": "Gender",
"Gender - Tooltip": "Gender - Tooltip",
"Homepage": "ユーザーのホームページ",

View File

@ -1081,7 +1081,7 @@
"Email/phone reset successfully": "Email/phone reset successfully",
"Empty input!": "Empty input!",
"Face ID": "Face ID",
"Face ids": "Face ids",
"Face IDs": "Face IDs",
"Gender": "Gender",
"Gender - Tooltip": "Gender - Tooltip",
"Homepage": "Homepage",

View File

@ -1081,7 +1081,7 @@
"Email/phone reset successfully": "이메일/전화 초기화가 성공적으로 완료되었습니다",
"Empty input!": "빈 입력!",
"Face ID": "Face ID",
"Face ids": "Face ids",
"Face IDs": "Face IDs",
"Gender": "Gender",
"Gender - Tooltip": "Gender - Tooltip",
"Homepage": "사용자의 홈페이지",

View File

@ -1081,7 +1081,7 @@
"Email/phone reset successfully": "Email/phone reset successfully",
"Empty input!": "Empty input!",
"Face ID": "Face ID",
"Face ids": "Face ids",
"Face IDs": "Face IDs",
"Gender": "Gender",
"Gender - Tooltip": "Gender - Tooltip",
"Homepage": "Homepage",

View File

@ -1081,7 +1081,7 @@
"Email/phone reset successfully": "Email/phone reset successfully",
"Empty input!": "Empty input!",
"Face ID": "Face ID",
"Face ids": "Face ids",
"Face IDs": "Face IDs",
"Gender": "Gender",
"Gender - Tooltip": "Gender - Tooltip",
"Homepage": "Homepage",

View File

@ -1081,7 +1081,7 @@
"Email/phone reset successfully": "Email/phone reset successfully",
"Empty input!": "Empty input!",
"Face ID": "Face ID",
"Face ids": "Face ids",
"Face IDs": "Face IDs",
"Gender": "Gender",
"Gender - Tooltip": "Gender - Tooltip",
"Homepage": "Homepage",

View File

@ -1081,7 +1081,7 @@
"Email/phone reset successfully": "Redefinição de e-mail/telefone com sucesso",
"Empty input!": "Entrada vazia!",
"Face ID": "Face ID",
"Face ids": "Face ids",
"Face IDs": "Face IDs",
"Gender": "Gênero",
"Gender - Tooltip": "Gênero - Tooltip",
"Homepage": "Página inicial",

View File

@ -1081,7 +1081,7 @@
"Email/phone reset successfully": "Электронная почта / номер телефона успешно сброшены",
"Empty input!": "Пустой ввод!",
"Face ID": "Face ID",
"Face ids": "Face ids",
"Face IDs": "Face IDs",
"Gender": "Gender",
"Gender - Tooltip": "Gender - Tooltip",
"Homepage": "Главная страница пользователя",

View File

@ -1081,7 +1081,7 @@
"Email/phone reset successfully": "Email/phone reset successfully",
"Empty input!": "Empty input!",
"Face ID": "Face ID",
"Face ids": "Face ids",
"Face IDs": "Face IDs",
"Gender": "Gender",
"Gender - Tooltip": "Gender - Tooltip",
"Homepage": "Homepage",

View File

@ -1081,7 +1081,7 @@
"Email/phone reset successfully": "Email/phone reset successfully",
"Empty input!": "Empty input!",
"Face ID": "Face ID",
"Face ids": "Face ids",
"Face IDs": "Face IDs",
"Gender": "Gender",
"Gender - Tooltip": "Gender - Tooltip",
"Homepage": "Homepage",

View File

@ -1081,7 +1081,7 @@
"Email/phone reset successfully": "Email/phone reset successfully",
"Empty input!": "Empty input!",
"Face ID": "Face ID",
"Face ids": "Face ids",
"Face IDs": "Face IDs",
"Gender": "Gender",
"Gender - Tooltip": "Gender - Tooltip",
"Homepage": "Homepage",

View File

@ -1081,7 +1081,7 @@
"Email/phone reset successfully": "Đặt lại email/điện thoại thành công",
"Empty input!": "Đầu vào trống!",
"Face ID": "Face ID",
"Face ids": "Face ids",
"Face IDs": "Face IDs",
"Gender": "Gender",
"Gender - Tooltip": "Gender - Tooltip",
"Homepage": "Trang chủ của người dùng",

View File

@ -1081,7 +1081,7 @@
"Email/phone reset successfully": "邮箱或手机号重置成功",
"Empty input!": "输入为空!",
"Face ID": "Face ID",
"Face ids": "Face ids",
"Face IDs": "Face IDs",
"Gender": "性别",
"Gender - Tooltip": "性别 - Tooltip",
"Homepage": "个人主页",

View File

@ -96,7 +96,7 @@ class FaceIdTable extends React.Component {
<Table scroll={{x: "max-content"}} columns={columns} dataSource={this.props.table} size="middle" bordered pagination={false}
title={() => (
<div>
{i18next.t("user:Face ids")}&nbsp;&nbsp;&nbsp;&nbsp;
{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})}>
{i18next.t("general:Add Face Id")}
</Button>