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
a5c1ac96
"...composable_kernel_onnxruntime.git" did not exist on "c20a75b07da6053cbbd07451d4ff27a95e30212e"
Commit
a5c1ac96
authored
Mar 03, 2024
by
Carlos Daniel Vilaseca
Browse files
rf: dom queries in Account component
parent
0fc76d46
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
src/lib/components/chat/Settings/Account.svelte
src/lib/components/chat/Settings/Account.svelte
+5
-5
No files found.
src/lib/components/chat/Settings/Account.svelte
View file @
a5c1ac96
...
...
@@ -15,6 +15,7 @@
let name = '';
let showJWTToken = false;
let JWTTokenCopied = false;
let profileImageInputElement: HTMLInputElement;
const submitHandler = async () => {
const updatedUser = await updateUserProfile(localStorage.token, name, profileImageUrl).catch(
...
...
@@ -40,11 +41,12 @@
<div class=" space-y-3 pr-1.5 overflow-y-scroll max-h-80">
<input
id="profile-image-input"
bind:this={profileImageInputElement}
type="file"
hidden
accept="image/*"
on:change={(e) => {
const files =
e?.target?
.files ?? [];
const files =
profileImageInputElement
.files ?? [];
let reader = new FileReader();
reader.onload = (event) => {
let originalImageUrl = `${event.target.result}`;
...
...
@@ -86,7 +88,7 @@
// Display the compressed image
profileImageUrl = compressedSrc;
e.targe
t.files = null;
profileImageInputElemen
t.files = null;
};
};
...
...
@@ -107,9 +109,7 @@
<button
class="relative rounded-full dark:bg-gray-700"
type="button"
on:click={() => {
document.getElementById('profile-image-input')?.click();
}}
on:click={profileImageInputElement.click}
>
<img
src={profileImageUrl !== '' ? profileImageUrl : '/user.png'}
...
...
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