Compare commits

..

3 Commits

Author SHA1 Message Date
Attack825
0653353be1 feat: update social_osonsms.svg URL (#4082) 2025-08-14 20:35:39 +08:00
Robin Ye
d6778fb4e6 feat: improve inline captcha UI by increasing spacing (#4079) 2025-08-14 16:15:34 +08:00
DacongDA
fee7773839 feat: add First name and Last name to account items (#4077) 2025-08-14 08:41:18 +08:00
6 changed files with 72 additions and 2 deletions

View File

@@ -157,7 +157,7 @@ export const OtherProviderInfo = {
url: "https://control.msg91.com/app/",
},
"OSON SMS": {
logo: "https://osonsms.com/images/osonsms-logo.svg",
logo: `${StaticBaseUrl}/img/social_osonsms.svg`,
url: "https://osonsms.com/",
},
"Custom HTTP SMS": {

View File

@@ -1117,6 +1117,32 @@ class UserEditPage extends React.Component {
</Col>
</Row>
);
} else if (accountItem.name === "First name") {
return (
<Row style={{marginTop: "20px"}} >
<Col style={{marginTop: "5px"}} span={(Setting.isMobile()) ? 22 : 2}>
{Setting.getLabel(i18next.t("general:First name"), i18next.t("general:First name - Tooltip"))} :
</Col>
<Col span={22}>
<Input value={this.state.user.firstName} onChange={e => {
this.updateUserField("firstName", e.target.value);
}} />
</Col>
</Row>
);
} else if (accountItem.name === "Last name") {
return (
<Row style={{marginTop: "20px"}} >
<Col style={{marginTop: "5px"}} span={(Setting.isMobile()) ? 22 : 2}>
{Setting.getLabel(i18next.t("general:Last name"), i18next.t("general:Last name - Tooltip"))} :
</Col>
<Col span={22}>
<Input value={this.state.user.lastName} onChange={e => {
this.updateUserField("lastName", e.target.value);
}} />
</Col>
</Row>
);
}
}

View File

@@ -364,6 +364,40 @@ class SignupPage extends React.Component {
<Input className="signup-name-input" placeholder={signupItem.placeholder} />
</Form.Item>
);
} else if (signupItem.name === "First name" && this.state?.displayNameRule !== "First, last") {
return (
<Form.Item
name="firstName"
className="signup-first-name"
label={signupItem.label ? signupItem.label : i18next.t("general:First name")}
rules={[
{
required: required,
message: i18next.t("signup:Please input your first name!"),
whitespace: true,
},
]}
>
<Input className="signup-first-name-input" placeholder={signupItem.placeholder} />
</Form.Item>
);
} else if (signupItem.name === "Last name" && this.state?.displayNameRule !== "First, last") {
return (
<Form.Item
name="lastName"
className="signup-last-name"
label={signupItem.label ? signupItem.label : i18next.t("general:Last name")}
rules={[
{
required: required,
message: i18next.t("signup:Please input your last name!"),
whitespace: true,
},
]}
>
<Input className="signup-last-name-input" placeholder={signupItem.placeholder} />
</Form.Item>
);
} else if (signupItem.name === "Affiliation") {
return (
<Form.Item
@@ -776,6 +810,12 @@ class SignupPage extends React.Component {
this.form.current?.setFieldValue("invitationCode", this.state.invitationCode);
}
}
const displayNameItem = application.signupItems?.find(item => item.name === "Display name");
if (displayNameItem && !this.state.displayNameRule) {
this.setState({displayNameRule: displayNameItem.rule});
}
return (
<Form
{...formItemLayout}

View File

@@ -83,7 +83,7 @@ export const CaptchaModal = (props) => {
const renderDefaultCaptcha = () => {
if (noModal) {
return (
<Row style={{textAlign: "center"}}>
<Row style={{textAlign: "center"}} gutter={10}>
<Col
style={{flex: noModal ? "70%" : "100%"}}>
<Input

View File

@@ -67,6 +67,8 @@ class AccountTable extends React.Component {
{name: "ID", label: i18next.t("general:ID")},
{name: "Name", label: i18next.t("general:Name")},
{name: "Display name", label: i18next.t("general:Display name")},
{name: "First name", label: i18next.t("general:First name")},
{name: "Last name", label: i18next.t("general:Last name")},
{name: "Avatar", label: i18next.t("general:Avatar")},
{name: "User type", label: i18next.t("general:User type")},
{name: "Password", label: i18next.t("general:Password")},

View File

@@ -94,6 +94,8 @@ class SignupTable extends React.Component {
{name: "Username", displayName: i18next.t("signup:Username")},
{name: "ID", displayName: i18next.t("general:ID")},
{name: "Display name", displayName: i18next.t("general:Display name")},
{name: "First name", displayName: i18next.t("general:First name")},
{name: "Last name", displayName: i18next.t("general:Last name")},
{name: "Affiliation", displayName: i18next.t("user:Affiliation")},
{name: "Gender", displayName: i18next.t("user:Gender")},
{name: "Bio", displayName: i18next.t("user:Bio")},