fix(frontend): hide card checkbox when not selecting

Card grid showed a faded checkbox at all times after multi-select was
added, which felt visually noisy and misaligned the title column. Hide
the checkbox column by default and let it expand on hover / when any
card is selected / when this card itself is selected. Drop
:focus-within so a cleared selection doesn't get stuck visible due to
the retained input focus.
This commit is contained in:
wizardchen
2026-04-29 20:17:06 +08:00
committed by lyingbug
parent 679e40de82
commit 5ff11dce38
+13 -7
View File
@@ -3824,20 +3824,23 @@ async function createNewSession(value: string): Promise<void> {
cursor: pointer;
transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
/* 初始态略可见,悬停/多选/已选时再强调,避免「凭空多一列」的突兀感 */
/* 默认折叠不占位,悬停/多选/已选时展开,避免非选择态左侧错位 */
.card-nav-check {
flex-shrink: 0;
display: inline-flex;
align-items: center;
justify-content: center;
width: 22px;
width: 0;
height: 29px;
opacity: 0.4;
transition: opacity 0.2s ease;
margin-right: 0;
opacity: 0;
overflow: hidden;
transition: width 0.2s ease, margin-right 0.2s ease, opacity 0.2s ease;
cursor: pointer;
&.active,
&:focus-within {
&.active {
width: 22px;
margin-right: 8px;
opacity: 1;
}
@@ -3869,6 +3872,8 @@ async function createNewSession(value: string): Promise<void> {
&:hover .card-nav-check,
&.has-selection .card-nav-check {
width: 22px;
margin-right: 8px;
opacity: 1;
}
@@ -3908,7 +3913,7 @@ async function createNewSession(value: string): Promise<void> {
flex-shrink: 0;
display: flex;
align-items: flex-start;
gap: 8px;
gap: 0;
margin-bottom: 8px;
}
@@ -3926,6 +3931,7 @@ async function createNewSession(value: string): Promise<void> {
font-size: 15px;
font-weight: 600;
letter-spacing: 0.01em;
margin-right: 8px;
}
.more-wrap {