chore: 统一为简体中文

This commit is contained in:
CrescentLeaf
2025-10-06 15:36:12 +08:00
parent bd857b840b
commit dced175d7a
23 changed files with 131 additions and 175 deletions

View File

@@ -35,8 +35,8 @@ export default function AddContactDialog({
}
return (
<mdui-dialog close-on-overlay-click close-on-esc headline="添加對話" ref={addContactDialogRef}>
<mdui-text-field clearable label="对话 ID / 用 ID / 用名" ref={inputTargetRef as any} onKeyDown={(event) => {
<mdui-dialog close-on-overlay-click close-on-esc headline="添加对话" ref={addContactDialogRef}>
<mdui-text-field clearable label="对话 ID / 用 ID / 用名" ref={inputTargetRef as any} onKeyDown={(event) => {
if (event.key == 'Enter')
addContact()
}}></mdui-text-field>

View File

@@ -26,7 +26,7 @@ export default function ChatInfoDialog({ chat, chatInfoDialogRef, openChatFragme
target: chat.id,
})
if (re.code != 200)
return checkApiSuccessOrSncakbar(re, '獲取對話訊息失')
return checkApiSuccessOrSncakbar(re, '获取对话信息失')
setChatInfo(re.data!.chat_info as Chat)
})

View File

@@ -32,20 +32,20 @@ export default function LoginDialog({
password: CryptoJS.SHA256(password).toString(CryptoJS.enc.Hex),
})
if (checkApiSuccessOrSncakbar(re, "登錄失敗")) return
if (checkApiSuccessOrSncakbar(re, "登录失败")) return
data.access_token = re.data!.access_token as string
data.apply()
location.reload()
})
return (
<mdui-dialog headline="登" ref={loginDialogRef}>
<mdui-dialog headline="登" ref={loginDialogRef}>
<mdui-text-field label="用 ID / 用名" ref={loginInputAccountRef as any}></mdui-text-field>
<mdui-text-field label="用 ID / 用名" ref={loginInputAccountRef as any}></mdui-text-field>
<div style={{
height: "10px",
}}></div>
<mdui-text-field label="密" type="password" toggle-password ref={loginInputPasswordRef as any}></mdui-text-field>
<mdui-text-field label="密" type="password" toggle-password ref={loginInputPasswordRef as any}></mdui-text-field>
<mdui-button slot="action" variant="text" ref={registerButtonRef}></mdui-button>
<mdui-button slot="action" variant="text" ref={loginButtonRef}></mdui-button>

View File

@@ -30,9 +30,9 @@ export default function MyProfileDialog({
avatar: file
})
if (checkApiSuccessOrSncakbar(re, "修改失")) return
if (checkApiSuccessOrSncakbar(re, "修改失")) return
snackbar({
message: "修改成功 (刷新面以更新)",
message: "修改成功 (刷新面以更新)",
placement: "top",
})
})
@@ -74,8 +74,8 @@ export default function MyProfileDialog({
marginBottom: "10px",
}}></mdui-divider>
<mdui-list-item icon="logout" rounded onClick={() => dialog({
headline: "退出登",
description: "確定要退出登錄嗎? (若您的賬號未設定 用戶名, 請無務必複製 用戶 ID, 以免丟失賬號!)",
headline: "退出登",
description: "请确保在退出登录前, 设定了用户名或者已经记录下了用户 ID, 以免无法登录账号",
actions: [
{
text: "取消",
@@ -84,7 +84,7 @@ export default function MyProfileDialog({
},
},
{
text: "定",
text: "定",
onClick: () => {
data.access_token = ''
data.apply()
@@ -93,7 +93,7 @@ export default function MyProfileDialog({
},
}
],
})}>退</mdui-list-item>
})}>退</mdui-list-item>
</mdui-list>
</mdui-dialog>
{
@@ -103,7 +103,7 @@ export default function MyProfileDialog({
<div style={{
display: "none"
}}>
<input type="file" name="選擇頭像" ref={chooseAvatarFileRef}
<input type="file" name="选择头像" ref={chooseAvatarFileRef}
accept="image/*" />
</div>
@@ -115,7 +115,7 @@ export default function MyProfileDialog({
width: '50px',
height: '50px',
}} />
<mdui-text-field variant="outlined" placeholder="昵" ref={editNickNameRef as any} style={{
<mdui-text-field variant="outlined" placeholder="昵" ref={editNickNameRef as any} style={{
marginLeft: "15px",
}} value={user?.nickname}></mdui-text-field>
</div>
@@ -123,12 +123,12 @@ export default function MyProfileDialog({
marginTop: "10px",
}}></mdui-divider>
<mdui-text-field style={{ marginTop: "10px", }} variant="outlined" label="用 ID" value={user?.id || ''} readonly onClick={(e) => {
<mdui-text-field style={{ marginTop: "10px", }} variant="outlined" label="用 ID" value={user?.id || ''} readonly onClick={(e) => {
const input = e.target as HTMLInputElement
input.select()
input.setSelectionRange(0, 1145141919810)
}}></mdui-text-field>
<mdui-text-field style={{ marginTop: "20px", }} variant="outlined" label="用名" value={user?.username || ''} ref={editUserNameRef as any}></mdui-text-field>
<mdui-text-field style={{ marginTop: "20px", }} variant="outlined" label="用名" value={user?.username || ''} ref={editUserNameRef as any}></mdui-text-field>
<mdui-button slot="action" variant="text" onClick={() => userProfileEditDialogRef.current!.open = false}></mdui-button>
<mdui-button slot="action" variant="text" onClick={async () => {
@@ -138,9 +138,9 @@ export default function MyProfileDialog({
username: editUserNameRef.current?.value,
})
if (checkApiSuccessOrSncakbar(re, "修改失")) return
if (checkApiSuccessOrSncakbar(re, "修改失")) return
snackbar({
message: "修改成功 (刷新面以更新)",
message: "修改成功 (刷新面以更新)",
placement: "top",
})
userProfileEditDialogRef.current!.open = false

View File

@@ -34,7 +34,7 @@ export default function RegisterDialog({
password: CryptoJS.SHA256(registerInputPasswordRef.current!.value).toString(CryptoJS.enc.Hex),
})
if (checkApiSuccessOrSncakbar(re, "注冊失敗")) return
if (checkApiSuccessOrSncakbar(re, "注册失败")) return
loginInputAccountRef.current!.value = username == "" ? re.data!.userid as string : username
loginInputPasswordRef.current!.value = registerInputPasswordRef.current!.value
@@ -43,25 +43,25 @@ export default function RegisterDialog({
registerInputPasswordRef.current!.value = ""
registerDialogRef.current!.open = false
snackbar({
message: "注成功!",
message: "注成功!",
placement: "top",
})
})
return (
<mdui-dialog headline="注" ref={registerDialogRef}>
<mdui-dialog headline="注" ref={registerDialogRef}>
<mdui-text-field label="用名 (可)" ref={registerInputUserNameRef as any}></mdui-text-field>
<mdui-text-field label="用名 (可)" ref={registerInputUserNameRef as any}></mdui-text-field>
<div style={{
height: "10px",
}}></div>
<mdui-text-field label="昵" ref={registerInputNickNameRef as any}></mdui-text-field>
<mdui-text-field label="昵" ref={registerInputNickNameRef as any}></mdui-text-field>
<div style={{
height: "10px",
}}></div>
<mdui-text-field label="密码" type="password" toggle-password ref={registerInputPasswordRef as any}></mdui-text-field>
<mdui-button slot="action" variant="text" ref={registerBackButtonRef}></mdui-button>
<mdui-button slot="action" variant="text" ref={doRegisterButtonRef}></mdui-button>
<mdui-button slot="action" variant="text" ref={doRegisterButtonRef}></mdui-button>
</mdui-dialog>
)
}