Visually separate global regex navigation

This commit is contained in:
Hao19911125
2026-04-09 10:39:27 +08:00
parent beb77fb5a2
commit 1a987fbcae
2 changed files with 39 additions and 20 deletions

View File

@@ -2414,6 +2414,13 @@
gap: 6px;
}
.bme-task-nav-groups {
display: inline-flex;
align-items: center;
gap: 10px;
flex-wrap: wrap;
}
.bme-task-segmented-control {
display: inline-flex;
background: var(--bme-surface-container);
@@ -2445,6 +2452,10 @@
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}
.bme-task-segmented-control--solo {
box-shadow: 0 0 0 1px rgba(255, 183, 0, 0.16);
}
.bme-task-master-detail {
display: flex;
gap: 0;
@@ -4692,6 +4703,10 @@
flex-wrap: wrap;
}
.bme-task-nav-groups {
width: 100%;
}
.bme-task-action-bar {
flex-direction: column;
align-items: stretch;

View File

@@ -6006,26 +6006,30 @@ function _renderTaskProfileWorkspace(state) {
return `
<div class="bme-task-shell">
<div class="bme-task-action-bar">
<div class="bme-task-segmented-control">
${state.taskTypeOptions
.map(
(item) => `
<button
class="bme-task-type-btn ${item.id === state.taskType && !state.showGlobalRegex ? "active" : ""}"
data-task-action="switch-task-type"
data-task-type="${_escAttr(item.id)}"
type="button"
>${_escHtml(item.label)}</button>
`,
)
.join("")}
<button
class="bme-task-type-btn ${state.showGlobalRegex ? "active" : ""}"
data-task-action="switch-global-regex"
type="button"
>
通用正则
</button>
<div class="bme-task-nav-groups">
<div class="bme-task-segmented-control">
${state.taskTypeOptions
.map(
(item) => `
<button
class="bme-task-type-btn ${item.id === state.taskType && !state.showGlobalRegex ? "active" : ""}"
data-task-action="switch-task-type"
data-task-type="${_escAttr(item.id)}"
type="button"
>${_escHtml(item.label)}</button>
`,
)
.join("")}
</div>
<div class="bme-task-segmented-control bme-task-segmented-control--solo">
<button
class="bme-task-type-btn ${state.showGlobalRegex ? "active" : ""}"
data-task-action="switch-global-regex"
type="button"
>
通用正则
</button>
</div>
</div>
<div class="bme-task-action-bar-right">
<button class="bme-config-secondary-btn bme-bulk-profile-btn bme-task-btn-danger" data-task-action="restore-all-profiles" type="button" title="恢复全部 6 个任务的默认预设">