Skip to content

Commit c4b7c66

Browse files
committed
switch to avatar URL
1 parent 05df18f commit c4b7c66

1 file changed

Lines changed: 4 additions & 10 deletions

File tree

llms/ui/modules/layout.mjs

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ const Welcome = {
2929

3030
const Avatar = {
3131
template: `
32-
<div v-if="$ai.auth?.profileUrl && showComponents.length" class="relative" ref="avatarContainer">
32+
<div v-if="$ai.auth && showComponents.length" class="relative" ref="avatarContainer">
3333
<img
3434
@click.stop="toggleMenu"
35-
:src="$ai.auth.profileUrl"
35+
:src="$ctx.getUserAvatar()"
3636
:title="authTitle"
3737
class="mr-1 size-6 rounded-full cursor-pointer hover:ring-2 hover:ring-[var(--assistant-border)]"
3838
/>
@@ -200,8 +200,7 @@ const SettingsPage = {
200200
<h2 class="text-lg font-semibold mb-4" :class="[$styles.heading]">User Avatar</h2>
201201
<div class="flex items-center gap-6">
202202
<label for="userAvatarInput" class="relative group cursor-pointer">
203-
<img
204-
:src="userAvatarUrl"
203+
<img :src="$ctx.getUserAvatar()"
205204
class="w-20 h-20 rounded-full object-cover border-2 shadow-md" :class="[$styles.messageUser]"
206205
alt="User Avatar"
207206
/>
@@ -246,7 +245,7 @@ const SettingsPage = {
246245
<div class="flex items-center gap-6">
247246
<label for="agentAvatarInput" class="relative group cursor-pointer">
248247
<img
249-
:src="agentAvatarUrl"
248+
:src="$ctx.getAgentAvatar()"
250249
class="w-20 h-20 rounded-full object-cover border-2 shadow-md" :class="[$styles.messageUser]"
251250
alt="Agent Avatar"
252251
/>
@@ -296,9 +295,6 @@ const SettingsPage = {
296295
setup() {
297296
const ctx = inject('ctx')
298297

299-
const userAvatarUrl = computed(() => ctx.getUserAvatar())
300-
const agentAvatarUrl = computed(() => ctx.getAgentAvatar())
301-
302298
const userUploading = ref(false)
303299
const userSuccess = ref(false)
304300
const userError = ref('')
@@ -367,8 +363,6 @@ const SettingsPage = {
367363
}
368364

369365
return {
370-
userAvatarUrl,
371-
agentAvatarUrl,
372366
userUploading,
373367
userSuccess,
374368
userError,

0 commit comments

Comments
 (0)