Skip to content

feat(portal): 网页补充商店信息 + 320×170 截图(无 LFS,存 GitHub Release + git PNG)#10

Merged
eggfly merged 1 commit into
fix/portal-frontend-first-come-ownershipfrom
feat/portal-store-metadata
Jul 21, 2026
Merged

feat(portal): 网页补充商店信息 + 320×170 截图(无 LFS,存 GitHub Release + git PNG)#10
eggfly merged 1 commit into
fix/portal-frontend-first-come-ownershipfrom
feat/portal-store-metadata

Conversation

@eggfly

@eggfly eggfly commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

背景

网页上传只有一个「源码仓库」输入框:源码仓库里带 app-builder.jsonstore 段才能自动带入截图/商店信息,没有源码仓库的人无法在网页补充商店信息。本 PR 补齐「上传 deb 后直接在网页填商店信息」的能力,等价于 czdev。

存储(回答「存哪里 / 不用 LFS」)

  • .deb:一直在 GitHub Release 资产 + 阿里云 OSS 镜像,git 里只有 *.release.json(现状,不变)。
  • 截图/图标:网页上传的图片先传到同一个 buffer Release,Action 下载后作为普通小 PNG 提交进 pool/main/<pkg>/(和 source_repo 路径一致)。全程不走 Git LFS
  • 顺带删掉 packages/.gitattributes 里那行自相矛盾、实际失效的 *.deb filter=lfs(另一个仓库改)。

改动

  • site:上传流程里新增「商店信息」表单(应用名/简介/描述/分类/图标/截图,均可选)。截图工具用 canvas 把任意图片 cover 裁剪缩放到精确 320×170(CardputerZero 屏幕比例),图标归一化为正方形 PNG,最多 6 张截图。
  • worker/api/submit 接收元数据 + PNG,校验尺寸(截图 320×170、图标正方形 ≤512、单张 <512KB),上传到 buffer Release,store 结构随 repository_dispatch 下发。
  • workflowprocess-web-submission 新增最高优先级分支——有网页 store 时用它写 meta.json 并下载图片提交(校验 sha256 + 320×170),否则回退到 source_repo / deb。

说明

Made with Cursor

…enshots

Adds a store-info form to the upload flow so submitters without a source
repo can provide title/summary/description/categories, an optional square
icon, and up to 6 screenshots — equivalent to czdev's app-builder.json
`store` section, filled in right after picking the .deb.

- site: in-browser screenshot tool cover-fits any image to exactly 320x170
  (the CardputerZero LCD) via canvas; icon is normalized to a square PNG.
- worker: /api/submit accepts the metadata + PNGs, validates dimensions
  (screenshots 320x170, icon square <=512), uploads images to the same
  buffer Release as the .deb, and forwards a `store` client_payload.
- workflow: process-web-submission builds meta.json from the web `store`
  (highest priority over source_repo/deb fallback) and commits the images
  as ordinary small PNGs into pool/main/<pkg>/ — no Git LFS.

Co-authored-by: Cursor <cursoragent@cursor.com>
@eggfly
eggfly merged commit 270d8ac into fix/portal-frontend-first-come-ownership Jul 21, 2026
2 checks passed
@eggfly
eggfly deleted the feat/portal-store-metadata branch July 21, 2026 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant