Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
ac470e64
Commit
ac470e64
authored
Apr 04, 2024
by
Danny Liu
Browse files
npm run format
parent
c52cc46d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
src/lib/utils/index.ts
src/lib/utils/index.ts
+2
-2
No files found.
src/lib/utils/index.ts
View file @
ac470e64
...
...
@@ -111,8 +111,8 @@ export const generateInitialsImage = (name) => {
ctx
.
textBaseline
=
'
middle
'
;
const
firstNameInitial
=
name
[
0
];
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
);
return
canvas
.
toDataURL
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment