chore: 统一为简体中文
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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)
|
||||
})
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user