mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
chore: return username in user response
This commit is contained in:
@ -1,3 +1,4 @@
|
||||
import { Button } from "@mui/joy";
|
||||
import { isEqual } from "lodash-es";
|
||||
import { useEffect, useState } from "react";
|
||||
import { toast } from "react-hot-toast";
|
||||
@ -110,8 +111,8 @@ const UpdateAccountDialog: React.FC<Props> = ({ destroy }: Props) => {
|
||||
}
|
||||
await userStore.updateUser(
|
||||
UserPb.fromPartial({
|
||||
name: `${UserNamePrefix}${state.username}`,
|
||||
id: currentUser.id,
|
||||
name: currentUser.name,
|
||||
username: state.username,
|
||||
nickname: state.nickname,
|
||||
email: state.email,
|
||||
avatarUrl: state.avatarUrl,
|
||||
@ -167,13 +168,13 @@ const UpdateAccountDialog: React.FC<Props> = ({ destroy }: Props) => {
|
||||
<span className="text-sm text-gray-400 ml-1">{t("setting.account-section.email-note")}</span>
|
||||
</p>
|
||||
<input type="text" className="input-text" value={state.email} onChange={handleEmailChanged} />
|
||||
<div className="pt-2 w-full flex flex-row justify-end items-center space-x-2">
|
||||
<span className="btn-text" onClick={handleCloseBtnClick}>
|
||||
<div className="w-full flex flex-row justify-end items-center pt-4 space-x-2">
|
||||
<Button color="neutral" variant="plain" onClick={handleCloseBtnClick}>
|
||||
{t("common.cancel")}
|
||||
</span>
|
||||
<span className="btn-primary" onClick={handleSaveBtnClick}>
|
||||
</Button>
|
||||
<Button color="primary" onClick={handleSaveBtnClick}>
|
||||
{t("common.save")}
|
||||
</span>
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
|
Reference in New Issue
Block a user