Skip to content

v0.1.7

Choose a tag to compare

@github-actions github-actions released this 29 Jun 06:46

更新日志

新增

  • 角色市场:新增顶层「市场」板块(角色标签页),可搜索开源的 character-tavern 目录,一键把卡片加入卡组。后端是按需直连其公开 JSON API 的轻代理(hub 跑在你自己机器上,无需托管中转);导入会把外部 V2/V3 ST 卡映射到我们的卡片结构、写进卡组。导入对外部卡的缺失很宽容——没有理想就省略、没有主题色就按卡确定性地推导一个(绝不留下会让卡组崩溃的「无主色」主题)、{{char}}/{{user}} 宏原样保留、世界书(character_book)透传到内嵌世界;NSFW 有门控,失败给出真实错误而非空白。(8d8ef67)
  • 封面随卡过来:导入市场卡时真正把图带进卡组——网页客户端在导入后抓取封面字节并上传(card.asset_save 主视觉 + 头像),得到一份本地副本(离线可用,存在即优先);若被 CORS 拦截,仍保留封面 URL,由卡面 <img> 浏览器侧加载兜底。封面在你于市场里看得见的时候就一定跟着卡走。(31270f8)

修复

  • 封面优雅降级:character-tavern 的图床对非浏览器请求做防盗链(403),服务器侧抓不到——网格缩略图改为浏览器侧 <img>,加载失败干净地退回字母组合图(monogram),市场永不显示破图;封面 URL 保存在导入的卡上以便浏览器侧展示。服务器侧附图仍尽力而为(带浏览器式请求头 + 真实图片格式探测),并在跳过时记录原因而非静默。(38e27c1)
  • 卡片路径编码:卡片路径可能含空格 / unicode(如 bmboster/Yae Miko),之前未编码会让 URL 出错——现对每段做百分号编码,同时保留原始路径作为存储身份。(9963d1f)
  • 导入回归收口:封面失败状态改由 React state 驱动(重复搜索同一张卡不再永久隐藏后来可加载的封面);刷新 toast 移出导入 try(导入成功后不再误报红色错误);路径在任何抓取前先拒绝 ./.. 段;NSFW 门控再加一层标签匹配,按路径直接导入也无法绕过。(be09116)

Changelog

Added

  • Character Market: a new top-level Market section (Characters tab) — search the open character-tavern catalog and add a card to your deck in one click. The backend is a thin, on-demand proxy to its public JSON API (the hub runs on your own machine — no hosted relay); import maps a foreign V2/V3 ST card onto our card shape and writes it into the deck. Import is tolerant of what a foreign card lacks — no aspiration → omitted, no theme color → a deterministic per-card color (never a primary-less theme, which used to crash the deck), {{char}}/{{user}} macros left intact, the lorebook (character_book) passed through to the embedded world; NSFW is gated and a failure surfaces a real error, never a blank. (8d8ef67)
  • The cover follows the card on import: importing a market card now actually carries its image into the deck — the web client fetches the cover bytes after import and uploads them (card.asset_save keyvisual + avatar) for a local, offline-safe copy (wins when present); if that's CORS-blocked, the stored cover URL still renders browser-side via the card-face <img>. The cover follows the card whenever you could see it in the market. (31270f8)

Fixes

  • Graceful card covers: character-tavern's image CDN hotlink-protects non-browser fetches (HTTP 403), so the hub can't download covers server-side — the grid thumbnails are browser-loaded <img> that degrade to a clean monogram on error, so the market never looks broken; the cover URL is preserved on the imported card for browser-side display. The server-side attach stays best-effort (browser-like headers + real image-format detection) and now logs WHY it skipped instead of failing silently. (38e27c1)
  • URL-encode card paths: a card path can contain spaces / unicode (e.g. bmboster/Yae Miko), which we passed unencoded into URLs (urllib would choke) — now each path segment is percent-encoded while the raw path stays as the stored identity. (9963d1f)
  • Import regressions closed: cover-load failure is now driven by React state (re-searching the same card no longer leaves a now-loadable cover hidden forever); the refresh toast moved out of the import try (no red error after a successful import); paths reject ./.. segments before any fetch; the NSFW gate is backed by a tag match so a direct import-by-path can't slip past the search-side exclude. (be09116)