Widget customization: upload a logo (Pro)

未关闭
#72 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
28/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
typescript

调研方向

Start with CONTRIBUTING.md in the upstream answerLoops repository for local setup and pull request rules, then look at the Widget appearance page from #347, which this work depends on and which is where the upload control and saved settings belong. The work spans upload validation, image re-encoding, database storage and a cached serving route, so it is not a first-timer task. Done means a Pro owner can upload, replace and remove a logo, bad files are rejected with clear messages, and tests cover those checks.

由索引模型根据 Issue 内容生成。

描述

backend enhancement frontend help wanted

Copied from DeadantCo/answerLoops#62 · originally opened by sethr07 on 2026-11-20

Copied from https://github.com/answerLoops/answerLoops/issues/349 — originally opened by @NathanTarbert on 2026-10-08

The problem today

The widget shows the answerLoops logo. A business wants its own.

What to build

A logo upload on the Widget appearance page (#347). The logo shows in the chat header, next to every reply and on the chat bubble.

  • Accepts a small 1:1 aspect ratio (square) image: PNG, JPEG or WebP, under 1 MB. SVG is not accepted because it carries scripts.
  • We crop it square, shrink it, and re-encode it, then store the small result in the database we already use. No new storage service, and it works for self-hosted installs too.
  • Served from a fast, cached address so the chat doesn't slow down.
  • Bad uploads (wrong type, too large, corrupted) are rejected with a clear message. Removing the logo goes back to the default.
  • Pro and above only.

Done when

  • A Pro owner can upload, replace and remove a logo and see it on the live widget
  • Wrong type, too large and corrupted files are rejected with clear messages
  • The stored image is the re-encoded small version, never the original upload
  • The logo address is cached and only serves a business's own logo
  • Looks right at 375 pixels wide; tests cover the checks above

Depends on

  • #347 (the page and where settings are saved)

Start here: new to the project? Read CONTRIBUTING.md first. It covers the ground rules, running answerLoops locally, and how to open a pull request.

主要语言
TypeScript
星标
0
派生
0
PR 合并指标
30 天内没有已合并 PR

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

DeadantCo/answerLoopsdev 的其他 Issue

查看 DeadantCo/answerLoopsdev 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。