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
6bb299ae
Commit
6bb299ae
authored
Apr 01, 2024
by
Danny Liu
Browse files
run npm run format
parent
a0a064f4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
21 deletions
+25
-21
src/lib/components/chat/Settings/Account.svelte
src/lib/components/chat/Settings/Account.svelte
+25
-21
No files found.
src/lib/components/chat/Settings/Account.svelte
View file @
6bb299ae
...
@@ -32,14 +32,18 @@
...
@@ -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);
}
}
...
...
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