From b57b64fc3633d819f92042142659b4ac1873f1f9 Mon Sep 17 00:00:00 2001 From: IZUMI-Zu <274620705z@gmail.com> Date: Sun, 29 Dec 2024 22:51:21 +0800 Subject: [PATCH] feat: add origin field for mfaAccountTable (#3463) --- object/user.go | 1 + web/src/table/MfaAccountTable.js | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/object/user.go b/object/user.go index 90530eb4..fcd6482c 100644 --- a/object/user.go +++ b/object/user.go @@ -237,6 +237,7 @@ type MfaAccount struct { AccountName string `xorm:"varchar(100)" json:"accountName"` Issuer string `xorm:"varchar(100)" json:"issuer"` SecretKey string `xorm:"varchar(100)" json:"secretKey"` + Origin string `xorm:"varchar(100)" json:"origin"` } type FaceId struct { diff --git a/web/src/table/MfaAccountTable.js b/web/src/table/MfaAccountTable.js index 5e94dba4..34074e47 100644 --- a/web/src/table/MfaAccountTable.js +++ b/web/src/table/MfaAccountTable.js @@ -105,6 +105,18 @@ class MfaAccountTable extends React.Component { ); }, }, + { + title: i18next.t("mfaAccount:Origin"), + dataIndex: "origin", + key: "origin", + render: (text, record, index) => { + return ( + { + this.updateField(table, index, "origin", e.target.value); + }} /> + ); + }, + }, { title: i18next.t("mfaAccount:Secret Key"), dataIndex: "secretKey",