mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-31 17:10:32 +08:00
Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
2c4b1093ed | ||
![]() |
d1c55d5aa7 | ||
![]() |
c8aa35c9c6 | ||
![]() |
6037f37b87 | ||
![]() |
1b478903d8 | ||
![]() |
4f5ac7a10b | ||
![]() |
e81ba62234 |
@@ -307,6 +307,7 @@ func (c *ApiController) Logout() {
|
||||
}
|
||||
|
||||
c.ClearUserSession()
|
||||
c.ClearTokenSession()
|
||||
owner, username := util.GetOwnerAndNameFromId(user)
|
||||
_, err := object.DeleteSessionId(util.GetSessionId(owner, username, object.CasdoorApplication), c.Ctx.Input.CruSession.SessionID())
|
||||
if err != nil {
|
||||
@@ -353,6 +354,7 @@ func (c *ApiController) Logout() {
|
||||
}
|
||||
|
||||
c.ClearUserSession()
|
||||
c.ClearTokenSession()
|
||||
// TODO https://github.com/casdoor/casdoor/pull/1494#discussion_r1095675265
|
||||
owner, username := util.GetOwnerAndNameFromId(user)
|
||||
|
||||
@@ -433,6 +435,17 @@ func (c *ApiController) GetAccount() {
|
||||
return
|
||||
}
|
||||
|
||||
token := c.GetSessionToken()
|
||||
if token == nil {
|
||||
token, err = object.GetTokenForExtension(user, c.Ctx.Request.Host)
|
||||
if err != nil {
|
||||
c.ResponseError(err.Error())
|
||||
return
|
||||
}
|
||||
c.SetSessionToken(token)
|
||||
}
|
||||
u.AccessToken = token.AccessToken
|
||||
|
||||
resp := Response{
|
||||
Status: "ok",
|
||||
Sub: user.Id,
|
||||
|
@@ -122,6 +122,17 @@ func (c *ApiController) GetSessionUsername() string {
|
||||
return user.(string)
|
||||
}
|
||||
|
||||
func (c *ApiController) GetSessionToken() *object.Token {
|
||||
tokenValue := c.GetSession("token")
|
||||
var token *object.Token
|
||||
var ok bool
|
||||
if token, ok = tokenValue.(*object.Token); !ok {
|
||||
token = nil
|
||||
}
|
||||
|
||||
return token
|
||||
}
|
||||
|
||||
func (c *ApiController) GetSessionApplication() *object.Application {
|
||||
clientId := c.GetSession("aud")
|
||||
if clientId == nil {
|
||||
@@ -141,6 +152,10 @@ func (c *ApiController) ClearUserSession() {
|
||||
c.SetSessionData(nil)
|
||||
}
|
||||
|
||||
func (c *ApiController) ClearTokenSession() {
|
||||
c.SetSessionToken(nil)
|
||||
}
|
||||
|
||||
func (c *ApiController) GetSessionOidc() (string, string) {
|
||||
sessionData := c.GetSessionData()
|
||||
if sessionData != nil &&
|
||||
@@ -167,6 +182,10 @@ func (c *ApiController) SetSessionUsername(user string) {
|
||||
c.SetSession("username", user)
|
||||
}
|
||||
|
||||
func (c *ApiController) SetSessionToken(token *object.Token) {
|
||||
c.SetSession("token", token)
|
||||
}
|
||||
|
||||
// GetSessionData ...
|
||||
func (c *ApiController) GetSessionData() *SessionData {
|
||||
session := c.GetSession("SessionData")
|
||||
|
@@ -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
|
||||
|
@@ -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 {
|
||||
|
@@ -45,6 +45,7 @@ func InitDb() {
|
||||
}
|
||||
|
||||
initWebAuthn()
|
||||
initToken()
|
||||
}
|
||||
|
||||
func getBuiltInAccountItems() []*AccountItem {
|
||||
@@ -184,6 +185,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 +199,7 @@ func initBuiltInApplication() {
|
||||
},
|
||||
Tags: []string{},
|
||||
RedirectUris: []string{},
|
||||
TokenFormat: "JWT",
|
||||
TokenFields: []string{},
|
||||
ExpireInHours: 168,
|
||||
FormOffset: 2,
|
||||
@@ -307,6 +310,10 @@ func initWebAuthn() {
|
||||
gob.Register(webauthn.SessionData{})
|
||||
}
|
||||
|
||||
func initToken() {
|
||||
gob.Register(&Token{})
|
||||
}
|
||||
|
||||
func initBuiltInUserModel() {
|
||||
model, err := GetModel("built-in/user-model-built-in")
|
||||
if err != nil {
|
||||
|
@@ -261,7 +261,7 @@ func GetValidationBySaml(samlRequest string, host string) (string, string, error
|
||||
|
||||
ok, _, service, userId := GetCasTokenByTicket(ticket)
|
||||
if !ok {
|
||||
return "", "", fmt.Errorf("ticket %s found", ticket)
|
||||
return "", "", fmt.Errorf("the CAS token for ticket %s is not found", ticket)
|
||||
}
|
||||
|
||||
user, err := GetUser(userId)
|
||||
@@ -270,7 +270,7 @@ func GetValidationBySaml(samlRequest string, host string) (string, string, error
|
||||
}
|
||||
|
||||
if user == nil {
|
||||
return "", "", fmt.Errorf("user %s found", userId)
|
||||
return "", "", fmt.Errorf("the user %s is not found", userId)
|
||||
}
|
||||
|
||||
application, err := GetApplicationByUser(user)
|
||||
@@ -279,7 +279,7 @@ func GetValidationBySaml(samlRequest string, host string) (string, string, error
|
||||
}
|
||||
|
||||
if application == nil {
|
||||
return "", "", fmt.Errorf("application for user %s found", userId)
|
||||
return "", "", fmt.Errorf("the application for user %s is not found", userId)
|
||||
}
|
||||
|
||||
samlResponse, err := NewSamlResponse11(user, request.RequestID, host)
|
||||
|
@@ -715,7 +715,7 @@ func GetWechatMiniProgramToken(application *Application, code string, host strin
|
||||
Code: session.SessionKey, // a trick, because miniprogram does not use the code, so use the code field to save the session_key
|
||||
AccessToken: accessToken,
|
||||
RefreshToken: refreshToken,
|
||||
ExpiresIn: application.ExpireInHours * 60,
|
||||
ExpiresIn: application.ExpireInHours * hourSeconds,
|
||||
Scope: "",
|
||||
TokenType: "Bearer",
|
||||
CodeIsUsed: true,
|
||||
@@ -726,3 +726,19 @@ func GetWechatMiniProgramToken(application *Application, code string, host strin
|
||||
}
|
||||
return token, nil, nil
|
||||
}
|
||||
|
||||
func GetTokenForExtension(user *User, host string) (*Token, error) {
|
||||
application, err := GetApplicationByUser(user)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if application == nil {
|
||||
return nil, fmt.Errorf("the application for user %s is not found", user.Id)
|
||||
}
|
||||
|
||||
token, err := GetTokenByUser(application, user, "profile", "", host)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return token, nil
|
||||
}
|
||||
|
@@ -98,6 +98,7 @@ type User struct {
|
||||
PreHash string `xorm:"varchar(100)" json:"preHash"`
|
||||
AccessKey string `xorm:"varchar(100)" json:"accessKey"`
|
||||
AccessSecret string `xorm:"varchar(100)" json:"accessSecret"`
|
||||
AccessToken string `xorm:"mediumtext" json:"accessToken"`
|
||||
|
||||
CreatedIp string `xorm:"varchar(100)" json:"createdIp"`
|
||||
LastSigninTime string `xorm:"varchar(100)" json:"lastSigninTime"`
|
||||
|
@@ -51,6 +51,7 @@ class App extends Component {
|
||||
classes: props,
|
||||
selectedMenuKey: 0,
|
||||
account: undefined,
|
||||
accessToken: undefined,
|
||||
uri: null,
|
||||
themeAlgorithm: storageThemeAlgorithm,
|
||||
themeData: Conf.ThemeDefault,
|
||||
@@ -228,9 +229,11 @@ class App extends Component {
|
||||
AuthBackend.getAccount(query)
|
||||
.then((res) => {
|
||||
let account = null;
|
||||
let accessToken = null;
|
||||
if (res.status === "ok") {
|
||||
account = res.data;
|
||||
account.organization = res.data2;
|
||||
accessToken = res.data.accessToken;
|
||||
|
||||
this.setLanguage(account);
|
||||
this.setTheme(Setting.getThemeData(account.organization), Conf.InitThemeAlgorithm);
|
||||
@@ -242,6 +245,7 @@ class App extends Component {
|
||||
|
||||
this.setState({
|
||||
account: account,
|
||||
accessToken: accessToken,
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -256,6 +260,7 @@ class App extends Component {
|
||||
return (
|
||||
<React.Fragment>
|
||||
{!this.state.account ? null : <div style={{display: "none"}} id="CasdoorApplicationName" value={this.state.account.signupApplication} />}
|
||||
{!this.state.account ? null : <div style={{display: "none"}} id="CasdoorAccessToken" value={this.state.accessToken} />}
|
||||
<Footer id="footer" style={
|
||||
{
|
||||
textAlign: "center",
|
||||
|
@@ -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"},
|
||||
|
@@ -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) => {
|
||||
|
@@ -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);}}
|
||||
/>
|
||||
|
@@ -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});
|
||||
}
|
||||
});
|
||||
|
@@ -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",
|
||||
|
@@ -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",
|
||||
|
@@ -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",
|
||||
|
@@ -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",
|
||||
|
@@ -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",
|
||||
|
@@ -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",
|
||||
|
@@ -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",
|
||||
|
@@ -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",
|
||||
|
@@ -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",
|
||||
|
@@ -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",
|
||||
|
@@ -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": "ユーザーのホームページ",
|
||||
|
@@ -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",
|
||||
|
@@ -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": "사용자의 홈페이지",
|
||||
|
@@ -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",
|
||||
|
@@ -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",
|
||||
|
@@ -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",
|
||||
|
@@ -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",
|
||||
|
@@ -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": "Главная страница пользователя",
|
||||
|
@@ -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",
|
||||
|
@@ -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",
|
||||
|
@@ -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",
|
||||
|
@@ -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",
|
||||
|
@@ -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": "个人主页",
|
||||
|
@@ -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")}
|
||||
{i18next.t("user:Face IDs")}
|
||||
<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>
|
||||
|
Reference in New Issue
Block a user