mirror of
https://github.com/open-webui/open-webui
synced 2024-11-26 14:02:29 +00:00
run npm run format
This commit is contained in:
parent
a0a064f4c8
commit
6bb299ae25
@ -32,14 +32,18 @@
|
|||||||
ctx.font = '40px Helvetica';
|
ctx.font = '40px Helvetica';
|
||||||
ctx.textAlign = 'center';
|
ctx.textAlign = 'center';
|
||||||
ctx.textBaseline = 'middle';
|
ctx.textBaseline = 'middle';
|
||||||
const initials = name.split(' ').map(word => word[0]).join('');
|
const initials = name
|
||||||
|
.split(' ')
|
||||||
|
.map((word) => word[0])
|
||||||
|
.join('');
|
||||||
ctx.fillText(initials.toUpperCase(), canvas.width / 2, canvas.height / 2);
|
ctx.fillText(initials.toUpperCase(), canvas.width / 2, canvas.height / 2);
|
||||||
|
|
||||||
return canvas.toDataURL();
|
return canvas.toDataURL();
|
||||||
};
|
};
|
||||||
|
|
||||||
const submitHandler = async () => {
|
const submitHandler = async () => {
|
||||||
const isInitialsImage: boolean = profileImageUrl === generateInitialsImage($user.name) || profileImageUrl === '';
|
const isInitialsImage: boolean =
|
||||||
|
profileImageUrl === generateInitialsImage($user.name) || profileImageUrl === '';
|
||||||
if (isInitialsImage && name !== $user.name) {
|
if (isInitialsImage && name !== $user.name) {
|
||||||
profileImageUrl = generateInitialsImage(name);
|
profileImageUrl = generateInitialsImage(name);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user