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:
1 parent
d4b2d3f034
commit
88c220634d
2 files changed
+4
-32
No files matched your search
@@ -1096,7 +1096,6 @@ onUnmounted(() => {
|
||||
v-show="route.section === 'agent/general'"
|
||||
:identity="identity"
|
||||
:avatar-url="identityAvatarUrl"
|
||||
:logo-url="identityLogoUrl"
|
||||
:saving="savingIdentity"
|
||||
:mutating="mutatingIdentity"
|
||||
@save="saveIdentity"
|
||||
|
||||
@@ -9,7 +9,6 @@ import type { AgentIdentity, AgentImageKind, IdentityTexts } from '~/composables
|
||||
const props = defineProps<{
|
||||
identity: AgentIdentity | null
|
||||
avatarUrl: string | null
|
||||
logoUrl: string | null
|
||||
/** An image upload or clear is in flight. */
|
||||
mutating: boolean
|
||||
saving: boolean
|
||||
@@ -76,10 +75,9 @@ function save(): void {
|
||||
|
||||
// --- the images -------------------------------------------------------
|
||||
const avatarInput = ref<HTMLInputElement | null>(null)
|
||||
const logoInput = ref<HTMLInputElement | null>(null)
|
||||
|
||||
function pickImage(kind: AgentImageKind): void {
|
||||
;(kind === 'avatar' ? avatarInput : logoInput).value?.click()
|
||||
function pickImage(): void {
|
||||
avatarInput.value?.click()
|
||||
}
|
||||
|
||||
function onImageChosen(kind: AgentImageKind, event: Event): void {
|
||||
@@ -166,7 +164,7 @@ const CAPS: Record<keyof EditableTexts, number> = {
|
||||
|
||||
<SettingCard
|
||||
v-if="identity"
|
||||
title="Avatar & logo"
|
||||
title="Avatar"
|
||||
meta="png, jpeg, or webp, up to 2 MiB. Uploads apply immediately."
|
||||
>
|
||||
<SettingRow
|
||||
@@ -175,7 +173,7 @@ const CAPS: Record<keyof EditableTexts, number> = {
|
||||
>
|
||||
<div class="image-control">
|
||||
<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')">
|
||||
Clear
|
||||
</button>
|
||||
@@ -187,24 +185,6 @@ const CAPS: Record<keyof EditableTexts, number> = {
|
||||
/>
|
||||
</div>
|
||||
</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>
|
||||
</div>
|
||||
</div>
|
||||
@@ -257,11 +237,4 @@ const CAPS: Record<keyof EditableTexts, number> = {
|
||||
.image-control input[type='file'] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.logo-preview {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
object-fit: contain;
|
||||
flex: none;
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user