mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-16 11:57:51 +01:00
npm run format
This commit is contained in:
@@ -111,8 +111,8 @@ export const generateInitialsImage = (name) => {
|
|||||||
ctx.textBaseline = 'middle';
|
ctx.textBaseline = 'middle';
|
||||||
const firstNameInitial = name[0];
|
const firstNameInitial = name[0];
|
||||||
const lastNameInitial = name.lastIndexOf(' ') > -1 ? name[name.lastIndexOf(' ') + 1] : '';
|
const lastNameInitial = name.lastIndexOf(' ') > -1 ? name[name.lastIndexOf(' ') + 1] : '';
|
||||||
const initials = `${firstNameInitial}${lastNameInitial}`.toUpperCase()
|
const initials = `${firstNameInitial}${lastNameInitial}`.toUpperCase();
|
||||||
|
|
||||||
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();
|
||||||
|
|||||||
Reference in New Issue
Block a user