diff --git a/panel.js b/panel.js index 492cce3..bf787ad 100644 --- a/panel.js +++ b/panel.js @@ -3489,21 +3489,6 @@ async function _handleTaskProfileWorkspaceClick(event) { actionEl.dataset.taskTab || currentTaskProfileTabId; _refreshTaskProfileWorkspace(); return; - case "select-profile": { - const profileId = actionEl.dataset.profileId; - if (profileId) { - const settings = _getSettings?.() || {}; - const nextTaskProfiles = setActiveTaskProfileId( - settings.taskProfiles || {}, - currentTaskProfileTaskType, - profileId, - ); - currentTaskProfileBlockId = ""; - currentTaskProfileRuleId = ""; - _patchTaskProfiles(nextTaskProfiles); - } - return; - } case "refresh-task-debug": if (typeof _getRuntimeDebugSnapshot === "function") { _getRuntimeDebugSnapshot({ refreshHost: true }); @@ -3727,11 +3712,10 @@ function _renderTaskProfileWorkspace(state) {
-
-
- ${_escHtml(taskMeta?.label || state.taskType)} -
- ${state.bucket.profiles .map( (profile) => ` @@ -3739,28 +3723,12 @@ function _renderTaskProfileWorkspace(state) { value="${_escAttr(profile.id)}" ${profile.id === state.profile.id ? "selected" : ""} > - ${_escHtml(profile.name)}${profile.builtin ? " · 内置" : ""} + ${_escHtml(profile.name)}${profile.builtin ? "(内置)" : ""} `, ) .join("")} -
- ${state.bucket.profiles - .map( - (profile) => ` -
-
${_escHtml(profile.name)}
- ${profile.builtin ? '内置' : ""} -
- `, - ) - .join("")} -
diff --git a/style.css b/style.css index 5c18c12..7164aee 100644 --- a/style.css +++ b/style.css @@ -1916,64 +1916,41 @@ background: var(--bme-surface-container); } -.bme-task-profile-list { - width: 220px; +/* 左栏:紧凑「任务 + 下拉」切换预设,避免大块列表卡片占宽 */ +.bme-task-profile-nav { + width: 168px; flex-shrink: 0; border-right: 1px solid var(--bme-border); display: flex; flex-direction: column; + gap: 6px; + padding: 10px 10px 12px; background: var(--bme-surface); } -.bme-task-profile-list-header { - padding: 14px 16px 10px; - font-size: 11px; - font-weight: 700; - text-transform: uppercase; - letter-spacing: 0.06em; - color: var(--bme-on-surface-dim); - border-bottom: 1px solid var(--bme-border); -} - -.bme-task-profile-items { - flex: 1; - overflow-y: auto; - padding: 6px; -} - -.bme-task-profile-list-item { - display: flex; - align-items: center; - gap: 8px; - padding: 10px 12px; - border-radius: 8px; - cursor: pointer; - transition: background 0.15s; - font-size: 13px; - color: var(--bme-on-surface-dim); -} - -.bme-task-profile-list-item:hover { - background: var(--bme-surface-high); -} - -.bme-task-profile-list-item.active { - background: var(--bme-primary-dim); - color: var(--bme-primary); - border-left: 3px solid var(--bme-primary); - font-weight: 600; -} - -.bme-task-profile-list-item-name { - flex: 1; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - -.bme-task-profile-list-item .bme-task-pill { +.bme-task-profile-nav-kicker { font-size: 10px; - padding: 2px 6px; + font-weight: 700; + letter-spacing: 0.04em; + text-transform: uppercase; + color: var(--bme-on-surface-dim); + line-height: 1.2; + word-break: break-all; +} + +.bme-task-profile-nav-label { + font-size: 11px; + font-weight: 600; + color: var(--bme-on-surface-dim); + margin: 2px 0 0; +} + +.bme-task-profile-nav-select { + width: 100%; + min-height: 32px; + font-size: 12px; + padding: 4px 28px 4px 8px; + line-height: 1.35; } .bme-task-profile-editor { @@ -4087,11 +4064,31 @@ min-height: auto; } - .bme-task-profile-list { + .bme-task-profile-nav { width: 100%; border-right: none; border-bottom: 1px solid var(--bme-border); - max-height: 200px; + flex-direction: row; + flex-wrap: wrap; + align-items: flex-end; + gap: 8px 12px; + padding: 10px 12px; + } + + .bme-task-profile-nav-kicker { + width: 100%; + flex-basis: 100%; + } + + .bme-task-profile-nav-label { + flex: 0 0 auto; + margin: 0; + align-self: center; + } + + .bme-task-profile-nav-select { + flex: 1; + min-width: 140px; } .bme-task-segmented-control {