Skip to content

12 个视觉参考图库与浏览器无限画布 AI 创作台(5,700+ 素材、中英提示词、多图对比、ComfyUI & MCP)· Visual reference library & infinite-canvas AI studio in the browser

polish: 终轮上线前细节精修(取色算法、速写防跳帧与回顾居中、铃铛公告与三语补齐)

atuizz38baa3e84cb8
diff --git a/src/app.js b/src/app.js
index 16ca608..95fe745 100644
--- a/src/app.js
+++ b/src/app.js
@@ -704,18 +704,20 @@ function lbResetView(hideTools=false){
function extractPalette(img){
if(!img||!img.complete||!img.naturalWidth)return[];
try{
- const cv=document.createElement('canvas');cv.width=48;cv.height=48;
+ const S=48,cv=document.createElement('canvas');cv.width=S;cv.height=S;
const ctx=cv.getContext('2d',{willReadFrequently:true});
- ctx.drawImage(img,0,0,48,48);
- const d=ctx.getImageData(0,0,48,48).data;
+ ctx.drawImage(img,0,0,S,S);
+ const d=ctx.getImageData(0,0,S,S).data;
const map=new Map();
- for(let i=0;i<d.length;i+=4){
- const r=d[i],g=d[i+1],b=d[i+2],a=d[i+3];
+ for(let p=0;p<S*S;p++){
+ const i=p*4,r=d[i],g=d[i+1],b=d[i+2],a=d[i+3];
if(a<200)continue;
if(r>242&&g>242&&b>242)continue;
+ const x=p%S,y=(p/S)|0;
+ const center=(x>=7&&x<=40&&y>=4&&y<=44)?1.8:0.25;
const qr=Math.min(240,Math.round(r/16)*16),qg=Math.min(240,Math.round(g/16)*16),qb=Math.min(240,Math.round(b/16)*16);
const max=Math.max(r,g,b),min=Math.min(r,g,b),sat=max?(max-min)/max:0;
- const w=1+sat*2.2;
+ const w=(0.35+sat*4.5)*center;
const key=(qr<<16)|(qg<<8)|qb;
const cur=map.get(key);
if(cur){cur.w+=w;cur.r+=r*w;cur.g+=g*w;cur.b+=b*w}
@@ -735,7 +737,7 @@ function lbDrawPalette(it){
const box=$('#lbPal'),img=$('#lbImg');
if(!box||!it||it.type==='pose'||it.type==='depth'||it.ext){if(box)box.hidden=true;return}
const paint=()=>{
- if(!box.isConnected||$('#lb').hidden||previewItem()!==it)return;
+ if(!box.isConnected||$('#lb').hidden||previewItem()!==it||img.classList.contains('lo'))return;
const cols=extractPalette(img);
if(cols.length<2){box.hidden=true;return}
box.innerHTML=`<div class="lb-pal-h"><small>提取配色</small><small class="mu">点击复制</small></div><div class="lb-pal-sw">${cols.map(h=>`<button type="button" class="pal-sw" data-hex="${h}" style="--sw:${h}" title="复制 ${h}"><i></i><span>${h}</span></button>`).join('')}</div>`;
@@ -886,7 +888,7 @@ const step=d=>{li=(li+d+st.list.length)%st.list.length;lbVariant=null;lbResetVie
$('.lb-bg').onclick=lbClose;$('.lb-x').onclick=lbClose;$('.prev').onclick=()=>step(-1);$('.next').onclick=()=>step(1);
// ---------- 速写定时练习(Gesture Drawing Studio) ----------
-const SK={open:false,dur:60,total:10,deck:[],i:0,seen:[],rem:60,last:0,paused:false,sound:false,flip:false,grid:0,gray:false,pair:false,timer:null,actx:null,beeped:0,prevFocus:null};
+const SK={open:false,dur:60,total:10,pool:[],deck:[],i:0,seen:[],rem:60,last:0,paused:false,sound:false,flip:false,grid:0,gray:false,pair:false,timer:null,actx:null,beeped:0,prevFocus:null};
function skChime(freq=660,dur=.12){
if(!SK.sound)return;
try{
@@ -901,6 +903,7 @@ function skChime(freq=660,dur=.12){
}catch{}
}
function skFmt(sec){const s=Math.max(0,Math.ceil(sec));return `${String(Math.floor(s/60)).padStart(2,'0')}:${String(s%60).padStart(2,'0')}`}
+function skCap(){return SK.total?Math.min(SK.total,SK.deck.length):0}
function skRenderTools(){
const it=SK.deck[SK.i],frame=$('#skFrame'),gridEl=$('#skGrid');
if(frame){
@@ -928,9 +931,10 @@ function skShowCard(){
$('#skDone').hidden=true;frame.hidden=false;
stage.dataset.imgType=shown.type;
img.referrerPolicy=shown.ref||'';img.src=src;img.alt=title(shown);
- const totLabel=SK.total?String(SK.total):'∞';
- $('#skStep').textContent=`${SK.i+1} / ${totLabel}`;
- $('#skName').textContent=title(it)+(it.angles?.[it.ai]?.zh?' · '+it.angles[it.ai].zh:'');
+ const cap=skCap();
+ $('#skStep').textContent=`${SK.i+1} / ${cap||'∞'}`;
+ const ang=it.angles?.[it.ai]?.zh,angLoc=ang?(window.PWLocale?window.PWLocale.t(ang):ang):'';
+ $('#skName').textContent=title(it)+(angLoc?' · '+angLoc:'');
SK.rem=SK.dur;SK.beeped=0;SK.last=performance.now();
$('#skTime').textContent=skFmt(SK.rem);
$('#skProg').style.transform='scaleX(1)';
@@ -950,13 +954,13 @@ function skStep(d){
const next=SK.i+d;
if(next<0)return;
if(SK.total&&next>=Math.min(SK.total,SK.deck.length))return skFinish();
- if(next>=SK.deck.length){SK.deck=SK.deck.concat(shuffle(st.list.filter(ok)));}
+ if(next>=SK.deck.length){const base=SK.pool.length?SK.pool:st.list.filter(ok);if(!base.length)return skFinish();SK.deck=SK.deck.concat(shuffle(base.slice()))}
SK.i=next;SK.pair=false;skShowCard();
if(d>0)skChime(659,.14);
}
function skTick(){
- if(!SK.open||SK.paused)return;
- const now=performance.now(),dt=(now-SK.last)/1000;SK.last=now;
+ if(!SK.open||SK.paused||document.hidden)return;
+ const now=performance.now(),dt=Math.min(.5,(now-SK.last)/1000);SK.last=now;
SK.rem=Math.max(0,SK.rem-dt);
$('#skTime').textContent=skFmt(SK.rem);
$('#skProg').style.transform=`scaleX(${Math.max(0,SK.rem/SK.dur)})`;
@@ -964,6 +968,7 @@ function skTick(){
if(ceil<=3&&ceil>=1&&SK.beeped!==ceil){SK.beeped=ceil;skChime(523,.07)}
if(SK.rem<=0)skStep(1);
}
+document.addEventListener('visibilitychange',()=>{if(SK.open&&!document.hidden)SK.last=performance.now()});
function skTogglePause(force){
SK.paused=force===undefined?!SK.paused:!!force;
SK.last=performance.now();
@@ -979,7 +984,7 @@ async function sketchOpen(opts={}){
}
if(!pool.length)return toast('当前没有可用于速写的素材');
SK.prevFocus=document.activeElement;
- SK.deck=shuffle(pool);SK.i=0;SK.seen=[];SK.flip=false;SK.grid=0;SK.gray=false;SK.pair=false;
+ SK.pool=pool.slice();SK.deck=shuffle(pool.slice());SK.i=0;SK.seen=[];SK.flip=false;SK.grid=0;SK.gray=false;SK.pair=false;
SK.open=true;SK.paused=false;
$('#sketch').hidden=false;document.body.style.overflow='hidden';
$$('#skDur button').forEach(b=>{const on=+b.dataset.sd===SK.dur;b.classList.toggle('on',on);b.setAttribute('aria-pressed',String(on))});
@@ -1008,13 +1013,13 @@ $('#skDur')?.addEventListener('click',e=>{
const b=e.target.closest('[data-sd]');if(!b)return;
SK.dur=+b.dataset.sd;SK.rem=SK.dur;SK.last=performance.now();SK.beeped=0;
$$('#skDur button').forEach(x=>{const on=x===b;x.classList.toggle('on',on);x.setAttribute('aria-pressed',String(on))});
- $('#skTime').textContent=skFmt(SK.rem);$('#skProg').style.transform='scaleX(1)';
+ if($('#skDone').hidden){$('#skTime').textContent=skFmt(SK.rem);$('#skProg').style.transform='scaleX(1)'}
});
$('#skTotal')?.addEventListener('click',e=>{
const b=e.target.closest('[data-sc]');if(!b)return;
SK.total=+b.dataset.sc;
$$('#skTotal button').forEach(x=>{const on=x===b;x.classList.toggle('on',on);x.setAttribute('aria-pressed',String(on))});
- $('#skStep').textContent=`${SK.i+1} / ${SK.total||'∞'}`;
+ if($('#skDone').hidden)$('#skStep').textContent=`${SK.i+1} / ${skCap()||'∞'}`;
});
$('#sketch')?.addEventListener('click',e=>{
const t=e.target.closest('[data-skt]');
@@ -1039,25 +1044,25 @@ $('#sketch')?.addEventListener('click',e=>{
let cmdPrevFocus=null,cmdIdx=0,cmdItems=[];
function cmdCatalog(){
const list=[
- {g:'快捷操作',id:'act:sketch',label:'开始速写定时练习(60s)',kw:'sketch gesture timer 速写 计时 练习',hint:'60s',run:()=>sketchOpen({dur:60})},
- {g:'快捷操作',id:'act:shuffle',label:'工作台 · 随机一组参考搭配',kw:'studio shuffle random 工作台 灵感 随机',run:async()=>{navigate('studio');await new Promise(r=>setTimeout(r,80));$('#wbShuffle')?.click()}},
- {g:'快捷操作',id:'act:dock',label:trayOpen?'收起悬浮创作台':'展开悬浮创作台',kw:'dock tray workspace 悬浮 创作台',run:()=>trayOpen?closeTray():openTray()},
- {g:'快捷操作',id:'act:theme',label:'切换深浅外观',kw:'theme dark light 外观 深色 浅色',hint:'T',run:()=>window.PoseWearTheme.toggle()},
- {g:'快捷操作',id:'act:lang',label:'切换素材描述语言(中 / 英)',kw:'language prompt en zh 语言 英文 中文',hint:'L',run:()=>setLang(st.lang==='zh'?'en':'zh')},
- {g:'快捷操作',id:'act:cfg',label:'打开 API 与本机引擎设置',kw:'api key comfyui sd.cpp settings 设置 配置',run:()=>window.WB?.cfgOpen?.()},
+ {g:'快捷操作',id:'act:sketch',label:'开始速写定时练习(60s)',kw:'sketch gesture timer croquis 速写 计时 练习 クロッキー',hint:'60s',run:()=>sketchOpen({dur:60})},
+ {g:'快捷操作',id:'act:shuffle',label:'工作台 · 随机一组参考搭配',kw:'studio shuffle random 工作台 灵感 随机 シャッフル スタジオ',run:async()=>{navigate('studio');await new Promise(r=>setTimeout(r,80));$('#wbShuffle')?.click()}},
+ {g:'快捷操作',id:'act:dock',label:trayOpen?'收起悬浮创作台':'展开悬浮创作台',kw:'dock tray workspace 悬浮 创作台 パネル',run:()=>trayOpen?closeTray():openTray()},
+ {g:'快捷操作',id:'act:theme',label:'切换深浅外观',kw:'theme dark light 外观 深色 浅色 ダーク ライト',hint:'T',run:()=>window.PoseWearTheme.toggle()},
+ {g:'快捷操作',id:'act:lang',label:'切换素材描述语言(中 / 英)',kw:'language prompt en zh 语言 英文 中文 言語',hint:'L',run:()=>setLang(st.lang==='zh'?'en':'zh')},
+ {g:'快捷操作',id:'act:cfg',label:'打开 API 与本机引擎设置',kw:'api key comfyui sd.cpp settings 设置 配置 ローカル',run:()=>window.WB?.cfgOpen?.()},
];
if(st.tab==='studio'&&!$('#wbExportBoard')?.hidden){
- list.splice(1,0,{g:'快捷操作',id:'act:export',label:'导出参考画板拼图 PNG',kw:'export board moodboard png 导出 拼图',run:()=>$('#wbExportBoard')?.click()});
+ list.splice(1,0,{g:'快捷操作',id:'act:export',label:'导出参考画板拼图 PNG',kw:'export board moodboard png 导出 拼图 書き出し',run:()=>$('#wbExportBoard')?.click()});
}
const tabMeta=[
- ['pose','姿势库','pose sketch line 姿态'],['depth','深度姿势','depth 3d map 深度'],
- ['portrait','人像库','portrait face model 人像'],['expr','表情库','expression emotion 表情'],
- ['hair','发型库','hairstyle hair 发型'],['costume','服装库','costume outfit dress 服装 穿搭'],
- ['anime','动画服装库','anime costume 动画 二次元'],['dyn','历代服饰','dynasty hanfu 历代 汉服'],
- ['scene','场景库','scene background 场景 背景'],['light','光影库','lighting light 光影 布光'],
- ['prop','道具库','prop item 道具'],['furn','家具库','furniture 家具'],
- ['studio','创作工作台','studio tryon generate 工作台 试穿 生图'],
- ['fav','我的收藏','favorite saved 收藏'],['recent','最近浏览','recent history 最近'],['history','生成记录','generation history 记录'],
+ ['pose','姿势库','pose sketch line 姿态 ポーズ'],['depth','深度姿势','depth 3d map 深度'],
+ ['portrait','人像库','portrait face model 人像 人物'],['expr','表情库','expression emotion 表情'],
+ ['hair','发型库','hairstyle hair 发型 髪型'],['costume','服装库','costume outfit dress 服装 穿搭 衣装'],
+ ['anime','动画服装库','anime costume outfit 动画 二次元 アニメ衣装'],['dyn','历代服饰','dynasty historical hanfu 历代 汉服 時代衣装'],
+ ['scene','场景库','scene background 场景 背景'],['light','光影库','lighting light 光影 布光 照明'],
+ ['prop','道具库','prop item 道具 小道具'],['furn','家具库','furniture 家具'],
+ ['studio','创作工作台','studio tryon generate 工作台 试穿 生图 スタジオ'],
+ ['fav','我的收藏','favorite saved 收藏 お気に入り'],['recent','最近浏览','recent history 最近 履歴'],['history','生成记录','generation history 记录 生成履歴'],
];
for(const [tab,label,kw] of tabMeta){
const n=tab==='fav'?st.fav.size:tab==='recent'?st.rec.length:tab==='history'?$('#nHist')?.textContent:($(`#libraryMenu [data-tab="${tab}"] [data-stat]`)?.textContent||'');
@@ -1067,8 +1072,8 @@ function cmdCatalog(){
}
function cmdDraw(){
const q=($('#cmdQ').value||'').trim().toLowerCase();
- const all=cmdCatalog();
- cmdItems=q?all.filter(x=>(x.label+' '+x.kw).toLowerCase().includes(q)):all;
+ const all=cmdCatalog(),tr=window.PWLocale?s=>window.PWLocale.t(s):s=>s;
+ cmdItems=q?all.filter(x=>(x.label+' '+tr(x.label)+' '+x.kw).toLowerCase().includes(q)):all;
if(q&&FDEF[st.tab]){
cmdItems.unshift({g:'当前图库搜索',id:'search',label:`搜索「${$('#cmdQ').value.trim()}」`,kw:q,hint:TNAME[st.tab],run:()=>{const v=$('#cmdQ').value.trim();$('#q').value=v;st.q=v;$('#qx').hidden=!v;apply()}});
}
diff --git a/src/i18n.js b/src/i18n.js
index cee651f..612ad36 100644
--- a/src/i18n.js
+++ b/src/i18n.js
@@ -114,6 +114,7 @@
'CC0 1.0,AI 生成的虚构人物,请勿用于冒充真人': ['CC0 1.0. Fictional AI-generated portrait. Please do not impersonate real people.','CC0 1.0。AI が生成した架空の人物です。実在の人物へのなりすましには使用しないでください。'],
'素材来源与许可': ['Sources and licenses','出典・ライセンス'], '更新已就绪,刷新页面': ['Update ready · Reload','更新を適用して再読み込み'],
'复制提示词可附参考图链接。': ['Prompts can include links to your reference images.','プロンプトに参照画像へのリンクを含められます。'],
+ '新增速写定时练习、大图灰度与实拍取色板、画板导出拼图 PNG 及 ⌘K 命令面板。': ['New: timed gesture practice, lightbox grayscale & color palette, reference board PNG export, and ⌘K command palette.','新機能:クロッキータイマー練習、グレースケール&自動配色抽出、参考ボード PNG 書き出し、⌘K コマンドパレット。'],
'。非官方整理。图片权利归原作者,转载或商用前请联系原作者。': ['. Unofficial collection. Images belong to their creators. Contact them before redistribution or commercial use.','。非公式の素材集です。画像の権利は原作者に帰属します。転載・商用利用の前に原作者へお問い合わせください。'],
'。人像为虚构人物。原作者希望避免原样批量转载。': ['. Portraits depict fictional people. The creator asks that the unmodified collection not be reposted in bulk.','。架空の人物です。原作者はそのままの一括転載を控えるよう求めています。'],
'。发型与部分动画服装使用原站图片,标签为 CC0,图片版权归原作者。': ['. Hairstyles and selected anime outfits use images hosted by the source. Tags are CC0. Image rights belong to the creator.','。髪型と一部のアニメ衣装は元サイトの画像を表示しています。タグは CC0、画像の権利は原作者に帰属します。'],
@@ -273,7 +274,7 @@
'添加到组合':['Add to set','組合せに追加'], '加入组合':['Add to set','組合せに追加'], '移出组合':['Remove from set','組合せから削除'],
'取消收藏':['Remove favorite','お気に入りを解除'], '已收藏':['Favorited','お気に入り済み'], '撤销':['Undo','元に戻す'], '移除':['Remove','削除'],
'从记录中移除':['Remove from history','履歴から削除'], '查看大图':['Open preview','拡大表示'], '复制中文':['Copy Chinese','中国語をコピー'],
- '复制英文':['Copy English','英語をコピー'], '分享':['Share','共有'], '分享链接':['Share link','リンクを共有'], '中文描述':['Chinese description','中国語の説明'],
+ '复制英文':['Copy English','英語をコピー'], '分享':['Share','共有'], '分享链接':['Share link','リンクを共有'], '中文描述':['Chinese description','中国語の説明'], '相似推荐':['Similar references','似た素材'],
'英文提示词 · PROMPT':['English prompt','英語プロンプト'], '英文提示词':['English prompt','英語プロンプト'], '提示词':['Prompt','プロンプト'],
'下载图片':['Download image','画像を保存'], '复制图片':['Copy image','画像をコピー'], '下载原图 PNG':['Download original PNG','元の PNG を保存'],
'下载原图 WebP':['Download original WebP','元の WebP を保存'], '下载原图':['Download original','元画像を保存'], '淘宝搜同款 ↗':['Find similar on Taobao ↗','淘宝で類似商品を検索 ↗'],
diff --git a/src/index.html b/src/index.html
index a2cf8c1..6d29734 100644
--- a/src/index.html
+++ b/src/index.html
@@ -27,7 +27,7 @@
<button type="button" data-theme-choice="dark" aria-pressed="false"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8z"/></svg><span>深色</span></button>
</div></details><details id="noticeMenu" class="shell-menu" name="header-popover"><summary class="icon" aria-label="通知" title="通知"><svg viewBox="0 0 24 24" aria-hidden="true" fill="none" stroke="currentColor" stroke-width="1.65" stroke-linecap="round" stroke-linejoin="round"><path d="M5 16c1.4-1.4 1.8-3.4 1.8-6a5.2 5.2 0 0 1 10.4 0c0 2.6.4 4.6 1.8 6l.6 1H4.4zM10 20a2.5 2.5 0 0 0 4 0"/></svg></summary>
<section class="shell-pop notice-pop" aria-label="通知"><h2>通知</h2><button id="noticeReload" class="sm" hidden>更新已就绪,刷新页面</button>
-<p id="noticeAction" hidden></p><article id="officialNotice"><strong>安全提醒</strong><p>唯一官网是 posewear.pages.dev,免费、无需注册账号、没有收费套餐。本项目没有 Windows / Android 客户端;冒充官网提供 exe / apk 下载、或要求登录付费的站点(如 posewear.cn、posewear.art)与本项目无关,请勿下载、登录、付款或在其中填写 API Key。</p></article><article id="releaseNotice"><strong>图库更新</strong><p>复制提示词可附参考图链接。</p></article>
+<p id="noticeAction" hidden></p><article id="officialNotice"><strong>安全提醒</strong><p>唯一官网是 posewear.pages.dev,免费、无需注册账号、没有收费套餐。本项目没有 Windows / Android 客户端;冒充官网提供 exe / apk 下载、或要求登录付费的站点(如 posewear.cn、posewear.art)与本项目无关,请勿下载、登录、付款或在其中填写 API Key。</p></article><article id="releaseNotice"><strong>图库更新</strong><p>新增速写定时练习、大图灰度与实拍取色板、画板导出拼图 PNG 及 ⌘K 命令面板。</p></article>
<button id="help" class="notice-help" type="button">快捷键</button></section></details></div>
</header>
<h1 class="vh" id="collectionTitle">姿势库</h1>
diff --git a/src/studio.js b/src/studio.js
index d312e28..9922d3a 100644
--- a/src/studio.js
+++ b/src/studio.js
@@ -240,7 +240,7 @@ function loadBoardImage(ref,item){
}
async function exportBoardPng(opts={}){
const chosen=[...W.persons.map(ref=>['portrait',ref]),...W.garments.map(ref=>['costume',ref]),
- ...W.poses.map(ref=>['pose',ref]),...W.exprs.map(ref=>['expr',ref]),...W.extraRefs.map(ref=>[A.ITEMS[ref.k].type,ref])];
+ ...W.poses.map(ref=>['pose',ref]),...W.exprs.map(ref=>['expr',ref]),...W.extraRefs.map(ref=>[A.ITEMS[ref.k]?.type||'other',ref])];
if(!chosen.length)return null;
const btn=$('#wbExportBoard');if(btn)btn.disabled=true;
const t=s=>window.PWLocale?window.PWLocale.t(s):s;
@@ -274,7 +274,7 @@ async function exportBoardPng(opts={}){
ctx.fillStyle=mu;ctx.font=`500 16px ${sans}`;
ctx.fillText('· '+t('参考画板'),padX+48+brandW,47);
const now=new Date(),stamp=`${now.getFullYear()}.${String(now.getMonth()+1).padStart(2,'0')}.${String(now.getDate()).padStart(2,'0')}`;
- const ar=$('#wbAR').value,metaParts=[`${n} ${t('张')}`,ar!=='auto'?ar:'',stamp].filter(Boolean).join(' · ');
+ const ar=$('#wbAR').value,unit=document.documentElement.lang==='en'&&n===1?'image':t('张'),metaParts=[`${n} ${unit}`,ar!=='auto'?ar:'',stamp].filter(Boolean).join(' · ');
ctx.textAlign='right';ctx.font=`500 14px ${sans}`;ctx.fillStyle=mu;
ctx.fillText(metaParts,Wpx-padX,47);ctx.textAlign='left';
let extSkipped=0;
@@ -301,9 +301,10 @@ async function exportBoardPng(opts={}){
ctx.globalCompositeOperation='source-over';
}else{
if(e.ext)extSkipped++;
- ctx.fillStyle=mu;ctx.font=`500 15px ${sans}`;ctx.textAlign='center';
- ctx.fillText(e.cat,ix+imgW/2,iy+imgH/2-12);
- ctx.font=`400 13px ${sans}`;ctx.fillText(clipText(ctx,e.title,imgW-36),ix+imgW/2,iy+imgH/2+14);
+ ctx.fillStyle=mu;ctx.font=`600 15px ${sans}`;ctx.textAlign='center';
+ ctx.fillText(e.cat,ix+imgW/2,iy+imgH/2-16);
+ ctx.font=`400 13px ${sans}`;ctx.fillText(clipText(ctx,e.title,imgW-36),ix+imgW/2,iy+imgH/2+8);
+ if(e.ext){ctx.font=`400 12px ${sans}`;ctx.fillText(t('在原站查看'),ix+imgW/2,iy+imgH/2+32)}
ctx.textAlign='left';
}
ctx.restore();
diff --git a/src/style.css b/src/style.css
index 16b7ff5..96cc418 100644
--- a/src/style.css
+++ b/src/style.css
@@ -1406,8 +1406,8 @@ body.none0 #sketchBtn{display:none!important}
#skSound.on .sk-snd-on{display:block}
#skSound.on .sk-snd-off{display:none}
.sk-stage{flex:1;min-height:0;display:grid;place-items:center;padding:18px 24px;overflow:auto;background:var(--sf);position:relative}
-.sk-stage[data-img-type=pose]{background:var(--phw)}
-.sk-stage[data-img-type=depth]{background:#141414}
+.sk-stage[data-img-type=pose],.sk-stage[data-img-type=pose] .sk-frame{background:var(--phw)}
+.sk-stage[data-img-type=depth],.sk-stage[data-img-type=depth] .sk-frame{background:#141414}
.sk-frame{position:relative;display:inline-grid;place-items:center;max-width:100%;max-height:100%;border-radius:12px;overflow:hidden}
.sk-frame img{display:block;max-width:min(92vw,1120px);max-height:calc(100dvh - 176px);width:auto;height:auto;object-fit:contain;transition:transform .22s var(--out),filter .22s}
.sk-stage[data-img-type=pose] .sk-frame img{mix-blend-mode:multiply}
@@ -1415,11 +1415,12 @@ body.none0 #sketchBtn{display:none!important}
.sk-done{text-align:center;max-width:680px;width:100%;padding:28px 24px;background:var(--bg2);border:1px solid var(--line2);border-radius:22px;box-shadow:var(--sh2)}
.sk-done h3{font-size:22px;margin-bottom:6px}
.sk-done p{margin:0 0 18px;color:var(--tx2);font-size:14px}
-.sk-recap{display:grid;grid-template-columns:repeat(auto-fill,minmax(84px,1fr));gap:8px;max-height:44vh;overflow:auto;margin-bottom:20px;padding:2px}
-.sk-recap button{padding:0;border-radius:10px;overflow:hidden;aspect-ratio:3/4;background:var(--ph);border:1px solid var(--line2)}
+.sk-recap{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;max-height:44vh;overflow:auto;margin-bottom:20px;padding:2px}
+.sk-recap button{width:92px;flex:none;padding:0;border-radius:10px;overflow:hidden;aspect-ratio:3/4;background:var(--ph);border:1px solid var(--line2)}
.sk-recap button:hover{border-color:var(--ac);transform:translateY(-2px)}
.sk-recap img{width:100%;height:100%;object-fit:cover;display:block}
.sk-done-act{display:flex;justify-content:center;gap:10px;flex-wrap:wrap}
+#sketch:has(#skDone:not([hidden])) .sk-foot{display:none}
.sk-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 20px calc(12px + env(safe-area-inset-bottom));border-top:1px solid var(--line);background:var(--bg);flex:none;flex-wrap:wrap}
.sk-ctrl{display:flex;align-items:center;gap:8px}
.sk-ctrl button{min-height:38px}
diff --git a/tests/polish-regressions.js b/tests/polish-regressions.js
index 1c5fcf0..1e572ed 100644
--- a/tests/polish-regressions.js
+++ b/tests/polish-regressions.js
@@ -105,7 +105,7 @@ async function run() {
await page.locator('#sketchBtn').waitFor({ state: 'visible' });
await page.locator('#sketchBtn').click();
await page.locator('#sketch').waitFor({ state: 'visible' });
- assert.equal(await page.locator('#skStep').textContent(), '1 / 10');
+ assert.equal(await page.locator('#skStep').textContent(), '1 / 2');
await page.keyboard.press('Space');
assert.equal(await page.locator('#skPause').textContent(), '继续');
await page.keyboard.press('h');
@@ -113,18 +113,20 @@ async function run() {
await page.keyboard.press('g');
assert.equal(await page.locator('#skGrid').getAttribute('data-mode'), 'thirds');
await page.keyboard.press('ArrowRight');
- assert.equal(await page.locator('#skStep').textContent(), '2 / 10');
+ assert.equal(await page.locator('#skStep').textContent(), '2 / 2');
await page.keyboard.press('ArrowRight'); // 2 poses in fixture -> completes session with recap sheet
await page.locator('#skDone').waitFor({ state: 'visible' });
assert.equal(await page.locator('#skRecap button').count(), 2, 'Recap sheet should display all practiced references');
await page.keyboard.press('Escape');
assert.ok(await page.locator('#sketch').isHidden());
- // Global Command Palette (Ctrl+K): fuzzy search & jump to library
+ // Global Command Palette (Ctrl+K): fuzzy search across ZH / EN / JA
await page.keyboard.press('Control+k');
await page.locator('#cmdPal').waitFor({ state: 'visible' });
await page.fill('#cmdQ', '服装');
assert.ok(await page.locator('#cmdList .cmd-it').count() >= 1);
+ await page.fill('#cmdQ', 'クロッキー');
+ assert.ok(await page.locator('#cmdList .cmd-it').count() >= 1);
await page.keyboard.press('Escape');
assert.ok(await page.locator('#cmdPal').isHidden());