fix(web/claw): drop the logo upload from the identity editor

The logo only ever showed on the About page, and General put a second
image control beside the avatar for it. The row, its clear button, and
the logoUrl prop that only fed them are gone. A logo already stored
still renders on About, which reads the same identity field.

npm run typecheck passes.
This commit is contained in:
vhaudiquet committed 2026-12-02 18:13:16 +01:00
1 parent d4b2d3f034
commit 88c220634d
2 files changed
+4 -32

No files matched your search

-1
View File
@@ -1096,7 +1096,6 @@ onUnmounted(() => {
v-show="route.section === 'agent/general'" v-show="route.section === 'agent/general'"
:identity="identity" :identity="identity"
:avatar-url="identityAvatarUrl" :avatar-url="identityAvatarUrl"
:logo-url="identityLogoUrl"
:saving="savingIdentity" :saving="savingIdentity"
:mutating="mutatingIdentity" :mutating="mutatingIdentity"
@save="saveIdentity" @save="saveIdentity"
@@ -9,7 +9,6 @@ import type { AgentIdentity, AgentImageKind, IdentityTexts } from '~/composables
const props = defineProps<{ const props = defineProps<{
identity: AgentIdentity | null identity: AgentIdentity | null
avatarUrl: string | null avatarUrl: string | null
logoUrl: string | null
/** An image upload or clear is in flight. */ /** An image upload or clear is in flight. */
mutating: boolean mutating: boolean
saving: boolean saving: boolean
@@ -76,10 +75,9 @@ function save(): void {
// --- the images ------------------------------------------------------- // --- the images -------------------------------------------------------
const avatarInput = ref<HTMLInputElement | null>(null) const avatarInput = ref<HTMLInputElement | null>(null)
const logoInput = ref<HTMLInputElement | null>(null)
function pickImage(kind: AgentImageKind): void { function pickImage(): void {
;(kind === 'avatar' ? avatarInput : logoInput).value?.click() avatarInput.value?.click()
} }
function onImageChosen(kind: AgentImageKind, event: Event): void { function onImageChosen(kind: AgentImageKind, event: Event): void {
@@ -166,7 +164,7 @@ const CAPS: Record<keyof EditableTexts, number> = {
<SettingCard <SettingCard
v-if="identity" v-if="identity"
title="Avatar & logo" title="Avatar"
meta="png, jpeg, or webp, up to 2 MiB. Uploads apply immediately." meta="png, jpeg, or webp, up to 2 MiB. Uploads apply immediately."
> >
<SettingRow <SettingRow
@@ -175,7 +173,7 @@ const CAPS: Record<keyof EditableTexts, number> = {
> >
<div class="image-control"> <div class="image-control">
<AgentAvatar :avatar-url="avatarUrl" :initials="identity.name?.slice(0, 1)" :size="40" /> <AgentAvatar :avatar-url="avatarUrl" :initials="identity.name?.slice(0, 1)" :size="40" />
<button :disabled="mutating" @click="pickImage('avatar')">Upload…</button> <button :disabled="mutating" @click="pickImage()">Upload…</button>
<button v-if="identity.avatar" class="ghost" :disabled="mutating" @click="emit('clearImage', 'avatar')"> <button v-if="identity.avatar" class="ghost" :disabled="mutating" @click="emit('clearImage', 'avatar')">
Clear Clear
</button> </button>
@@ -187,24 +185,6 @@ const CAPS: Record<keyof EditableTexts, number> = {
/> />
</div> </div>
</SettingRow> </SettingRow>
<SettingRow
title="Logo"
description="Shown on the About page. Falls back to the Rhema mark."
>
<div class="image-control">
<img class="logo-preview" :src="logoUrl ?? '/rhema-logo.png'" alt="" />
<button :disabled="mutating" @click="pickImage('logo')">Upload…</button>
<button v-if="identity.logo" class="ghost" :disabled="mutating" @click="emit('clearImage', 'logo')">
Clear
</button>
<input
ref="logoInput"
type="file"
accept="image/png,image/jpeg,image/webp"
@change="onImageChosen('logo', $event)"
/>
</div>
</SettingRow>
</SettingCard> </SettingCard>
</div> </div>
</div> </div>
@@ -257,11 +237,4 @@ const CAPS: Record<keyof EditableTexts, number> = {
.image-control input[type='file'] { .image-control input[type='file'] {
display: none; display: none;
} }
.logo-preview {
width: 40px;
height: 40px;
object-fit: contain;
flex: none;
}
</style> </style>