fix: bind popup drop title, move unbind into row, toggle session list
This commit is contained in:
@@ -1963,7 +1963,6 @@ function buildCustomLayoutPrompt(req: string): string {
|
||||
{bindPick && <div className="dsh-wt_popBackdrop" style={{ zIndex: 83 }} onClick={() => { setBindPick(null); setBindListOpen(false) }} />}
|
||||
{bindPick && (
|
||||
<div className="dsh-wt_menu dsh-wt_pop dsh-wt_bindPop" style={{ position: 'fixed', left: bindPick.x, top: bindPick.y, width: 280, zIndex: 84 }}>
|
||||
<span className="dsh-wt_menuLabel">{t('bind.title')}</span>
|
||||
{/* 项目文件夹框(格式基准):第一行 emoji+标题,第二行路径;可随时更改 */}
|
||||
<div className="dsh-wt_bindFolderBox">
|
||||
<div className="dsh-wt_bindFolderRow">
|
||||
@@ -1974,23 +1973,26 @@ function buildCustomLayoutPrompt(req: string): string {
|
||||
{projects.folders[bindPick.id] ?? t('bind.folderNone')}
|
||||
</div>
|
||||
</div>
|
||||
{/* 绑定对话框(与项目文件夹同格式):第一行 💬+标题;第二行 分组 | 对话名(点击右侧弹列表);框内下方:说明 + 解绑 */}
|
||||
{/* 绑定对话框(与项目文件夹同格式):第一行 💬+标题(最右解绑);第二行 分组 | 对话名(点击右侧弹列表,再点反选收起);框内下方:说明 */}
|
||||
<div className="dsh-wt_bindFolderBox">
|
||||
<div className="dsh-wt_bindFolderRow">
|
||||
<span className="dsh-wt_bindFolderLabel">💬 {t('bind.title')}</span>
|
||||
{projects.bindings[bindPick.id] && (
|
||||
<button type="button" className="dsh-wt_bindUnbind" onClick={() => setProjectBinding(bindPick.id, null)}>{t('bind.unbind')} ✕</button>
|
||||
)}
|
||||
</div>
|
||||
{(() => {
|
||||
const sid = projects.bindings[bindPick.id]
|
||||
if (!sid) {
|
||||
return (
|
||||
<button type="button" className="dsh-wt_bindConvRow dsh-wt_bindConvRowNone" title={t('bind.tipUnbound')} onClick={() => setBindListOpen(true)}>
|
||||
<button type="button" className="dsh-wt_bindConvRow dsh-wt_bindConvRowNone" title={t('bind.tipUnbound')} onClick={() => setBindListOpen((v) => !v)}>
|
||||
<span className="dsh-wt_bindNoneText">{t('bind.unbound')} · {t('bind.clickPick')}</span>
|
||||
</button>
|
||||
)
|
||||
}
|
||||
const info = bindInfoOf(bindGroups, sid)
|
||||
return (
|
||||
<button type="button" className="dsh-wt_bindConvRow" title={t('bind.tipBound', { name: info.title })} onClick={() => setBindListOpen(true)}>
|
||||
<button type="button" className="dsh-wt_bindConvRow" title={t('bind.tipBound', { name: info.title })} onClick={() => setBindListOpen((v) => !v)}>
|
||||
<span className="dsh-wt_bindFolder" title={info.folder}>📂 {info.folder}</span>
|
||||
<span className="dsh-wt_bindSep" aria-hidden>|</span>
|
||||
<span className="dsh-wt_bindConvName" title={info.title}>{info.title}</span>
|
||||
@@ -1999,9 +2001,6 @@ function buildCustomLayoutPrompt(req: string): string {
|
||||
)
|
||||
})()}
|
||||
<p className="dsh-wt_bindHint">{t('bind.hint')}</p>
|
||||
{projects.bindings[bindPick.id] && (
|
||||
<button type="button" className="dsh-wt_bindUnbind" onClick={() => setProjectBinding(bindPick.id, null)}>{t('bind.unbind')} ✕</button>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -276,7 +276,7 @@ export const css = xtermCss + '\n' + [
|
||||
'.dsh-wt_bindHint{margin:6px 0 2px;font-size:11px;line-height:16px;color:var(--dsw-alias-label-secondary,#9aa4b2)}',
|
||||
// 自定义窗完成页:自动绑定提示
|
||||
'.dsh-wt_customDoneBind{margin:6px 0 0;font-size:11px;line-height:16px;color:var(--dsw-alias-state-accent-primary,#4f8ef7)}',
|
||||
'.dsh-wt_bindUnbind{display:inline-flex;align-items:center;gap:4px;margin:4px 0 0;padding:3px 8px;border:1px solid var(--dsw-alias-border-l1,#262b36);border-radius:6px;background:transparent;color:var(--dsw-alias-label-secondary,#9aa4b2);font:inherit;font-size:11px;line-height:16px;cursor:pointer}',
|
||||
'.dsh-wt_bindUnbind{flex:none;display:inline-flex;align-items:center;gap:4px;padding:1px 8px;border:1px solid var(--dsw-alias-border-l1,#262b36);border-radius:5px;background:transparent;color:var(--dsw-alias-label-secondary,#9aa4b2);font:inherit;font-size:11px;line-height:16px;cursor:pointer}',
|
||||
'.dsh-wt_bindUnbind:hover{color:var(--dsw-alias-state-danger,#f85149);border-color:var(--dsw-alias-state-danger,#f85149)}',
|
||||
'.dsh-wt_bindList{max-height:280px;overflow:auto;position:static}',
|
||||
'.dsh-wt_bindListPop{display:flex;flex-direction:column;padding:6px}',
|
||||
|
||||
Reference in New Issue
Block a user